home .. forth .. colorforth mail list archive ..

[ColorForth] Trying to understand Chucks IDE code.


Hello.

I was looking at Chuck's IDE controller code and I
was having a little trouble understanding what was
going on.

In review here is the code (Note I'm using [R] and
[G] for the color change tokens.)

[R]bsy [G]1f7 p@ 80 and if bsy ; then ; 
[R]rdy [G]1f7 p@ 8 and if 1f0 a! 256 ; then rdy ; 
[R]sector [G]1f3 a! swap p!+ /8 p!+ /8 p!+ /8 e0 or
p!+ drop p!+ drop 4 * ; 
[R]read [G]20 sector 256 for rdy insw next drop ; 
[R]write [G]bsy 30 sector 256 for rdy outsw next drop
; 

What is really puzzling me is the "sector" word.
The first thing it does is store 1F3 into the address
register and then it does a swap.  But what is it
swapping?  When sector is used, for example in the
"read" word it is first passed a value of 20.  But
that's only one value on the stack.  Am I to assume
that "read" already has a value being passed into it?
Also I'm curious as to the stack effect of p!+.

Thanks.

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com
------------------------

To Unsubscribe from this list, send mail to Mdaemon@xxxxxxxxxxxxxxxxxx with:
unsubscribe ColorForth
as the first and only line within the message body
Problems   -   List-Admin@xxxxxxxxxxxxxxxxxx
Main ColorForth site   -   http://www.colorforth.com