www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/16/16:21:35

Message-Id: <m0wSNlf-000S1kC@natacha.inti.edu.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT edu DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT edu DOT ar>
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
Subject: Re: Funky asm startTimer block -- why the odd 'jmp' statements?

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019