Code:
'
' Executable Program Starts Here
' ==============================
goto JumpStart
'
' System References
' ================
'
' SETUPs
' ------
Setups:
ASM
db 0xA4,0xA5,0xB0,0xB1,0xB2,0xB3,0xB4,0xD0 ; 00-07
db 0xD1,0xD2,0xD5,0xD6,0xD9,0xDA,0xDD,0xDE ; 08-15
db 0xE1,0xE2,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA ; 16-23
db 0xEB,0xEC,0xED,0xEE,0xF0,0xF1,0xF2,0xF4 ; 24-31
db 0xFA,0xF9,0xEF,0x00,0x00,0x00,0x00,0x00 ; 32-39
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 40-47
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 48-55
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 56-63
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 64-71
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 72-79
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 80-87
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 88-95
db 0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0x00,0x00 ; 96-103
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 104-111
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 112-119
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 120-127
ENDASM
JumpStart:
Now, you can reserve as little or as much Programspace as you want and PICBasic takes care of everything else. The most I'd ever done was 8kB, but it sure is handy (and saves on having an external EEPROM). Just remember how much you've allocated and never to do write operations outside of your allocated space (otherwise you'll corrupt your own program).
Bookmarks