Re: A86: Auto-ret doesn't work


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

Re: A86: Auto-ret doesn't work




when an asm program finishes running, the OS re-loads the first ASM 
program that was run after a reset (if that program was deleted then it 
loads the next one that was run, etc.) at $d748, overwriting the last 
ASM program that was run.

on the emulator, the first ASM program to be run is always DUMMY973 
because it is needed to load other programs into the emulator's memory.  
this is where the "ret" comes from because DUMMY973 contains the single 
byte C9 and it is reloaded at $d748 when your program finishes (or 
causes an error)

to see this for yourself
  load two asm programs into the emulator
  delete DUMMY973
  run one of the asm programs and see what the dissasembly @ $d748
    looks like while it is still running
  run the second program and see what the dissasembly @ $d748
    looks like while it is still running
  return to the OS
  look at the dissasembly @ $d748 again and see that it looks like
    program #1

Tyler

>A program that I have been experimenting produces an "Error 15 Memory"
>message.  I noticed that a "ret" instruction had now been written at
>$d748, presumably the OS trying to protect itself.  What I didn't
>expect was for the program still to run (at least, on the emulator),
>treating the ret like "CD" that it was originally.
>
>Why did this happen?
>--
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>AJD AJD AJD AJD AJD AJD AJD AJD        |
>-------------------------------------- |
>Anthony J. Doggett                     |
>Mailto:Doggett@zetnet.co.uk            |
>http://www.users.zetnet.co.uk/doggett/ |
>-------------------------------------- |
>Life is what you make of it.
>


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com