Re: A86: nop


[Prev][Next][Index][Thread]

Re: A86: nop




The general concensus on the out/in delay for the keyboard port is two
NOP's.  That is what I always use and I have never had any problems.  You
also need to execute a HALT before executing any out's (for reading the
keyport) to make sure that the interrupt won't occur after the out and
before the in runs, or else it won't read it correctly.  Or you can disable
interrupts completely which works fine as well.  Just make sure you enable
them again if you are going to be calling rom routines like _getkey or
before you exit the program.

-----Original Message-----
From: Cassady Roop <croop@oregontrail.net>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Friday, November 06, 1998 10:35 PM
Subject: Re: A86: nop


>
>I think the nop instruction is used to 'waste time.'  If you need to
>slow something down you can put a bunch of nops in it.  I think it is
>used like that when communicating with the keyboard port; like the port
>is slower than the processor so you need to throw in some time-wasters.
>
>>Cheetah17@aol.com wrote:
>>
>>    Ok, I have seen this in various programs and stuff, but what exactly
is the
>> nop command used for? Why would you want to perform no operation?
>>    And why would you put something like nop \ nop \ nop \ nop in? What's
wrong
>> with just one?
>>
>> --Adam Newhouse
>>   Cheetah17@aol.com
>>   http://come.to/the.cheetahs.den