for future reference, understand that #include will is the same as "copy and paste everything in that file into this file starting at this line"
this is no big deal w/ ti83plus.inc and ion.inc, etc. because they only have equates and defines. No code, just defining labels, and i guess it's like static finals in java, or w/e you call a constant.
Code: Select all
;header
;code
;#include "graylib.inc" <- this is code
; data
;end
however, graylib and graylib2 have code in them, so this tends to be a problem for placement. obviously, it's a separate routine, so it should go where all your other routines are placed. somewhere outside of the main program block.
note that you can also do #include "file.z80" or #include "file.asm" those also work if you want to include code from another file into the current file. This is great if you want to separate out all your routines into different .z80 files for better viewing, organization, and coding, provided you're using something w/ tabs like notepad++
in other words, you're asm program doesn't need to be all one file. it can be multiple files, provided the parts are included in the main file that the assembler will process.
btw, I recommend SPASM, or Brass and stick to it. each has some nifty features for dev and debug.
as for your last question, afaik, you can directly access data past $C000. that is, you can load the address into any registers and do whatever you want w/ registers to get that data into the registers.
you can even directly modify the RAM past $C000
what you can't do is call a routine/code that is stored there. what you had originally was graylib was probably located beyond $C000 so when you called it from your main block, you had issues w/ Ti-OS. duno if it's entirely accurate, but Ti-OS essentially does
Code: Select all
if (register pc >= $C000) *explode" *boom* XD
and I think if you make the program MOS only, not ion, I think MOS can take care of the memory mapping if it's less than 24k of code. not sure on that but you can probably find out from a DetachedSolutions person.
once again, good job on the gs tetris.
and good luck on your b/w action game. i eagerly wait its completion