[A83] Re: What the heck is RST???


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

[A83] Re: What the heck is RST???




>From: "Nick Reichert" <discjammer@hotmail.com>
>
>Hello,
>Can anyone tell me what "rst" does? It is part
>of the definition for B_CALL(#define B_CALL(xxxx)
>rst 28 // .dw xxxx or something like that), and
>it may give a little boost in speed. All I know
>is that it stands for restart, and "rst xxxx" is
>similar to "call xxxx", but what is the difference
>or advantage?

"rst xx" is, as you said, the same as a call, but it's only one byte in size 
and (most importantly) it only works on some predefined addresses: 0000h, 
0008h, 0010h, 0018h, 0020h, 0028h, 0030h, 0038h.
The bcall macro is actually just a call to 0028h. The code at 28h then looks 
up the address defined after the rst and then calls the appropriate rom 
routines.

Tijl Coosemans
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Follow-Ups: