Hey all,

I'm working on an extended menuprocedure, in which I'm using IY to store some data. I do also want to modify the system flags though. Do I really "have" to use the IY-register, or is there some other way to acces the systemflags-table? I can see there might just be some baseaddress of the table, which I could store in HL?
Thanks in advance.

Greetings, Arriopolis.
Try not to use IY for storing data, use HL or IX instead. You would have to change IY back to what it was before the program ends.
Yeah, but both HL and IX are tied up with useful information. Besides, I thought DI would help preserve the information stored in IY, and EI would restore the value stored in IY automatically.
I just found out, using wabbitemu, that the origional number stored in IY is equal to $89F0. I looked it up in ti83plus.inc, and found out the system table is equaled there. So that means the system table is situated there, right?
So here's the problem. You can easily just modify $89F0+N, where N is the offset that you want to deal with, but the problem is that if you let any interrupts happen or call any bcalls, it's extremely likely that the TI-OS will try and fail to use iy. Therefore, if you modify iy, you have to not run interrupts or call any bcalls until you restore it.
Ah, the fact that b_calls use IY I didn't know, but it makes kinda sence. I'll probably use a RAM variable for it. Thanks.
arriopolis wrote:
Ah, the fact that b_calls use IY I didn't know, but it makes kinda sence. I'll probably use a RAM variable for it. Thanks.
Well, it's nothing to do with the fact that they're Bcalls, just that they're OS code, and OS code extensively uses system flags.
Yes, I understood that, but thanks anyway.Smile
arriopolis wrote:
Yes, I understood that, but thanks anyway.Smile
I figured that you did; I was more clarifying for future z80 coders who might stumble across the topic. Wink
  
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