I understand that the IY register is used by the TI-OS to address system flags and crucial for normal system operation, I also know that IY can be borrowed by the ASM programmer when necessary, provides it is eventually restored. But exactly WHEN is it safe to do so?

Do I need to just simply restoring IY before a system call? I wrote a program that saves and restores IY at the beginning/end of system call and execution, and program seems to work without problems, but I'm afraid of interrupts. Do system interrupts use IY? Should they be disabled during the entire duration when IY is being commandeered ?
Interrupts will be unaffected. You just need to restore it before certain system calls (the exact set that require it is not documented and subject to change, so you should just always do it).
Runer112 wrote:
Interrupts will be unaffected. You just need to restore it before certain system calls (the exact set that require it is not documented and subject to change, so you should just always do it).

Thanks.
Runer112 wrote:
Interrupts will be unaffected. You just need to restore it before certain system calls (the exact set that require it is not documented and subject to change, so you should just always do it).

This depends on if you are running on z80 or ez80 calculators. The z80 calculators will reset iy inside the interrupt handler, without saving it.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement