Date : Thu, 05 May 1983 13:39:15-PDT (Thu)
From : hplabs!hao!seismo!presby!burdvax!dbt@ucb-vax.arpa
Subject: Re: vt180 & mboot3
One comment about your code to get a character:
| mvi a,0 ;clear status
| sta 0f541h
| lda 0f546h ;get char
| ani 7fh
It's easy to get burned on an interlock such as this. In general, you
should get the character and THEN reset the status; the way it's now coded,
there is a critical time (between the STA and the LDA) where another
interrupt could come along and trash 0F546h. Granted, it probably doesn't
matter in this case anyway (I'm sure an overrun would mess other things
up), and yes, it does require extra storage to hold the char while you're
mucking with the status (use a spare register or the stack). I just wanted
to make the point -- I've been caught on this one and it required an awful
lot of head-scratching to figure out what was going on.
-- Dave Tweed
burdvax|dbt