Mail Archives: djgpp/1997/05/16/16:21:35
oml1 AT Ra DOT MsState DOT Edu (Owen LaGarde) wrote:
> Here's a fragment of code passed to me in response to a request for
> a start-timer asm example. What is this? Why the funky jump-to-label-
> immediately-following, and why the doubled-up second call? It goes
> something like this ...
>
[snip]
> outportb( 0x43, 0x34 );
> asm jmp __1;
> __1:
[snip]
> Is this a funky way to force alignment?
No that's a VERY OLD trick to access devices that aren't enough faster to
support 2 consecutive outs at the bus speed. In this case you are accessing to
the 8254 integrated in your motherboard so isn't necesary at all. Even more, as
DJGPP programms runs on 386 or posterior, you don't need it to access the timer
all the 386 motherboards have this chip very well integrated and is faster
enough.
The jmp is just a delay.
SET
------------------------------------ 0 --------------------------------
Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013
- Raw text -