Re: A89: TIOS calling conventions
[Prev][Next][Index][Thread]
Re: A89: TIOS calling conventions
> How does TIOS pass variables to and results from command line functions?
> Say I was going to write an asm function like 3Dto2D(x,y,z) that would take
> a 3D point and convert it to a 2D point to display on the screen. I'm
> guessing that the three variables would be passed on the stack, but how
> would the result be returned? I thought it would be returned on the stack,
> but all that talk about resetting the stack pointer convinced me otherwise.
I suppos you want this function to be called from a BASIC prog or the
Home Screen.
Then I think that the command line is stored in handle
doorsos::HomeEntryHandle, but I don't know the format of the command
line so it has to be studied.
>From then the return value shoud be given to doorsos::ReturnValue
In fact doorsos::ReturnValue will point to the last byte of the returned
variable since the TIOS since to process all variables from the end.
I don't have more infos about that, but I'm sure you could find yourself
lots of infos using Rusty's debugger. Just put a breakpoint on
Read/Write the address corresponding to HomeEntryHandle ($7708 I
think..)
If you find more infos, please tell me cause I'm a little interested in
this
Good Luck !
Xavier VASSOR
---The Doors Team
E-mail:xvassor@mail.dotcom.fr
Doors Homepage: http://start.at/doors
ICQ:10241721
Follow-Ups:
References: