CPCWiki forum

General Category => Programming => Topic started by: Ast on 22:28, 12 April 15

Title: Rst#18
Post by: Ast on 22:28, 12 April 15
Who can tell me how to use rst#18 with parameters?
What I know is :


...
               rst #18
               defw adress
adress     defw xxxx      ; adress you want to call
              defb yy          ; number of rom
...


But if i wanted call somewhere which needs parameters, how could i do ?
Title: Re: Rst#18
Post by: pelrun on 06:02, 13 April 15
RST #18 preserves all the registers, so just set them up as required by the called routine beforehand (e.g. if it uses RSX calling convention, set A to number of parameters, and IX to the pointer to the parameter table).
Title: Re: Rst#18
Post by: Ast on 19:11, 13 April 15
Thanks for your advices...
Powered by SMFPacks Menu Editor Mod