This should be #included in all files. More...
#include "ti83plus.h"
Macros | |
Global omni-present constants | |
#define | aSaveA DEFB 0x08 |
ex af, af' | |
#define | SP_STORE 0x980C |
Stack pointer temp. | |
#define | spriteTemp 0x84F3 |
Also used for storing the stack pointer. | |
function macros | |
#define | clearScreen() bcall(0x4540) |
Clears the screen. | |
#define | bcall(__LABEL__) __asm__("rst 40") ; __asm__("defw\t"#__LABEL__) |
Call System routine. | |
#define | bjump(__LABEL__) __asm__("call 0x50") ; __asm__("defw\t"#__LABEL__) |
Jump to System routine. | |
#define | abcall(__LABEL__) |
The asm for a bcall. | |
#define | lastPressedKey() (*(char*)(kbdScanCode)) |
Get last pressed key. | |
#define | scanKeys() bcall(0x4015) |
Scan for pressed keys. | |
Safe Memory Areas | |
#define | saferam1 0x9872 |
768 bytes (APDRAM) | |
#define | saferam2 0x8A3A |
531 bytes (statRAM) | |
#define | saferam3 0x8508 |
128 bytes (textMem) | |
#define | saferam4 0x8478 |
66 bytes (Op registers, use with caution) | |
#define | saferam5 0x8251 |
8 bytes (bootTemp) | |
This should be #included in all files.
This file #defines all required constants, and loads in "ti83plus.h" for other constants that are needed. Only defines stuff at compile time, no real functions, no extra bytes.
#define abcall | ( | __LABEL__ | ) |
The asm for a bcall.
#define aSaveA DEFB 0x08 |
ex af, af'
Machine code to swap af and shadow af and only takes 4 t-states, only use in asm
#define bcall | ( | __LABEL__ | ) | __asm__("rst 40") ; __asm__("defw\t"#__LABEL__) |
Call System routine.
Preforms a bcall while in C. And keep in mind that a bcall might modify registers, meaning that any bcall can corrupt any C variable For most bcall values click here, or see TI's system routines document
#define bjump | ( | __LABEL__ | ) | __asm__("call 0x50") ; __asm__("defw\t"#__LABEL__) |
Jump to System routine.
Like a bcall() but jumps instead of calls
#define lastPressedKey | ( | ) | (*(char*)(kbdScanCode)) |
Get last pressed key.
Rrequires scanKeys() with custom interupts
#define scanKeys | ( | ) | bcall(0x4015) |
Scan for pressed keys.
Manually scan for pressed key, only needed with custom interupts
#define SP_STORE 0x980C |
Stack pointer temp.
Used to store the stack pointer in several functions, if you are writing some assembly, feel free to use this. But not for long-term storage as it is writen to by multiple functions.