This include provides a very easy way to correctly format an TI-83 Plus application. Note that you must also ensure the resulting application is signed. SPASM can do this for you, simply make sure your output file extension is .8xk.
Example:
defpage(0, “Zelda”) ;all code on page one goes here defpage(1) ;all code on page 2 goes here validate() ;does size checks on the final page
Download: app.inc
Allows you to simulate create an array to store and recall constants
Example:
;create a new array for the width of each map new_array( map_widths ) ;set a new index Route1Width to 0 array_set(map_widths, 0, Route1Width) ;recall the width ld hl,map_widths(Route1Width)
Download: arrays.inc
Allows writing to an internal text buffer which can then be assembled. fcreate.inc functions are now built into SPASM2. This is left for educational purposes only.
clr() | Clear the internal text buffer. |
wr(arg1[, arg2]...) | Write a string to the internal text buffer. Uses the same format as .echo. |
run() | Assemble the contents of the internal text buffer. |
Example:
; Create a label called "label20" clr() wr("label", 20,":") run()
Originally this was done through the fcreate.inc file:
Download (Obsolete):
fcreate.inc
Relocate.inc is a handy macro that helps you correctly address routines to different parts of memory. For example if you have an app that needs to run code from RAM to use SMC, then you can use relocate to make sure any absolute jumps go to the correct location in RAM rather than the place it is stored in flash. Using the relocate macro simply changes SPASM’s internal program counter to the location you specify, it does not actually copy the data to RAM.
;relocate SMC to appbackupscreen RamCodeStart: relocate(appbackupscreen) IncrementHL: Number = $+1 ld hl,0 inc hl ld (Number),hl ret endrelocate() RamCodeEnd: ;elsewhere in your app ;you need to call copy the routine to ram ld hl,RamCodeStart ld de,Appbackupscreen ld bc,RamCodeEnd-RamCodeStart ldir ;copy code ;now you can increment hl call IncrementHL
Download: relocate.inc
The official ti83plus.inc made SPASM compatible.
Download: ti83plus.inc
Provides z80 macro instructions. Useful for many pseudo-instructions that you use all the time.
Example:
;same as the instructions ld a,(hl) \ inc hl \ ld h,(hl) \ ld l,a ld hl,a,(hl) ;same as ld b,(hl) \ inc hl ld b,(hl+) ;same as ld d,h \ ld e,l ld de,hl
Download: z80ext.inc