[Coco] More Color Forth
Darren A
mechacoco at gmail.com
Sun Jan 25 15:46:00 EST 2015
On Sun, Jan 25, 2015 at 12:01 PM, Stephen Pereira wrote:
>
> What I am concerned about is whether or not I am getting the addresses
> onto the stack in the right order, and with the correct byte order.
>
> The reason I’m asking is that this code “kind of works” in my Color
> Forth. I do get a file onto disk called SCRN1TO8.BIN, but it is 21 blocks
> long, instead of 4 blocks, like I expected.
>
> Finally, while my Drivewire UI shows the disk activity start and end, my
> code does not return to the command line in Color Forth, so I am also
> concerned about that. I see in the “Disk Basic Unravelled” that the SAVEM
> command dose end with an RTS, so I did expect my code to return.
>
I think the problem is that you do a JSR to $CF7E instead of JMP. The JSR
pushes a return address onto the stack in front of your address
parameters. The SAVEM code doesn't expect that to be there. A return
address could be manually pushed prior to the parameters and then you can
JMP to $CF7E and have it return.
- Darren
More information about the Coco
mailing list