05-21-2010, 08:47 AM
britlion Wrote:Very nicely done, Na_th_an. That's half the game for a 128!
I was thinking that I could force page swapping on a 128, by coding a routine to do it manually. Then I realized I'd have to call code in other pages by inference, and that would be a pain.
I did wonder if I could get the compiler to do
Code:org 49152
[code for one page]
org 49152
[code for next page]
org 49152
[code for next page]
And so on. Yes, it would overwrite it - but the location references for calls would be correct in the generated code.
Then of course, compile each page as an item separately, and save out 16K blocks of code, and then load them in, and page flip to load each successive one. Voila. Data in multiple pages...
it's a crazy plan, but it might just work :-)
I've shown that one can manually push the compiler to set up an ISR Mode 2 routine! Remember this? : <!-- m --><a class="postlink" href="http://britlion.googlepages.com/Sprity.z80">http://britlion.googlepages.com/Sprity.z80</a><!-- m -->
I was thinking in something like
Code:
FUNCTION/SUB xxxx AT @label / <number address>
...
END FUNCTION / SUB
I think it's better to do as suggested: move those things to the low-level asm blocks.
Having said that, the idea of FUNCTION ... INTERRUPT is very common, and it will be implemented.