Re: A83: Re: A ROM call


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

Re: A83: Re: A ROM call




rst is read "restart", but that's a wry name. It performs a call to the
specified address, but only addresses 0, 8, 16, 24, 32, 40 and 48 are
allowed. The instruction is always 1 byte long, whereas call is 3 bytes. It
was mainly implemented so that interrupting devices could place an op code on
the data bus easily (only 1 byte).

What the rst:s do is of course dependent of the code placed in the very
beginning of the rom. On the ti-83, this is:
rst 0   Power-up (has to be; the processor starts at address 0000
automatically)
rst 8   call _OP1TOOP2 (copy OP1 to OP2)
rst 16  call _FINDSYM (not chkfindsym, so only non-progs and non-lists)
rst 24  call _PUSHREALO1 (push OP1 to the fps)
rst 32  call _MOV9TOOP1 (move 9 bytes from hl to OP1)
rst 40  call _FPMULT (OP1 * OP2 -> OP1)
rst 48  call _FPADD (OP1 + OP2 -> OP1)

Linus

On 14-Oct-98, James Matthews wrote:

>Woah, Linus you lost me there (not surprisingly :)...what's rst 16, and how
>would you use it?

>Thanks.

>James Matthews (matthews@tkb.att.ne.jp)

>ICQ: 7413754
>http://home.att.ne.jp/gold/tomcat21/index.html
>http://library.advanced.org/18242/

>----------
>> From: Linus Akesson <lairfight@softhome.net>
>> To: Joe Wingbermuehle <assembly-83@lists.ticalc.org>
>> Subject: Re: A83: Re: A ROM call
>> Date: Thursday, October 15, 1998 7:20 AM
>> 
>> 
>> Yep, 442ah = _CHKFINDSYM will do in both cases. When looking up a
>> non-prog/non-list you can also use rst 16, which is a bit smaller. But
>> there's one thing; never specify the type 6 when trying to find protected
>> programs - always use 5.
>> 
>> Linus
>> 
>> On 14-Oct-98, Joe Wingbermuehle wrote:
>> 
>> >$442A will work the same way as your second one I think.
>> >input: op1->type,program (load something like 6,"PROGRAM",0 into op1)
>> >output: hl->vat entry, de->program data (first 2 bytes are size)
>> 
>> >Joe Wingbermuehle
>> >http://www.usmo.com/~joewing/
>> 
>> >-----Original Message-----
>> >From: Evil Sam <evil_sam@hotmail.com>
>> >To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
>> >Date: Wednesday, October 14, 1998 3:14 PM
>> >Subject: A83: A ROM call
>> 
>> 
>> >>
>> >>  I need an 83 equivolent for either of these 82 ROM_CALLs for Plain 
>> >>Jump 83:
>> >>
>> >>---- CALL 20EB ---- Search for program by name 
>> >>------------------------------
>> >>Searches the program VAT for a program. info in OP1.
>> >>Result: HL = pointer to VAT entry
>> >>        DE = Pointer to data space
>> >>
>> >>---- CALL 213E ---- Serach for variable by token/name 
>> >>-----------------------
>> >>Seraches VAT to find variable. infor in op1. works for all types.
>> >>Result: HL = pointer to VAT entry
>> >>        DE = Pointer to data space
>> >>
>> >> Thank you,
>> >>   Sam
>> >>
>> >>______________________________________________________
>> >>Get Your Private, Free Email at http://www.hotmail.com
>> >>
>> 
>> 
>> 



References: