Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: oml1 AT Ra DOT MsState DOT Edu (Owen LaGarde), djgpp AT delorie DOT com Date: Fri, 16 May 1997 17:31:19 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Funky asm startTimer block -- why the odd 'jmp' statements? Precedence: bulk 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