INTRODUCTION
This is a pack of routines and various files i've built over the years.
I can't say i haven't been inspired by others, so some stuff expands|fixes existing work.
Optimisation is mostly towards speed, and system code is used as rarely as possible.
Each file includes deep documentation.
COMPATIBILITY
Except if specified, all TI-8X+ models (monochrome screen) are supported.
Same goes for official systems and boot codes.
Everything else should be considered unsupported.
DISCLAIMER
For each routine, you are expected to follow EVERYTHING that's in the "IN" section.
Also, when there's a "WARNING" section, it's to be taken seriously.
If something is unclear, feel free to ask there BEFORE using :
https://www.omnimaga.org/asm-language/flash-snacks/NOTE ABOUT "OUT" SECTIONS
? means a register is to be considered destroyed.
Unlisted registers are unchanged, except for :
pc,r : always destroyed
af',bc',de',hl' : unchanged if interrupts disabled beforehand | destroyed otherwise
When the f register is detailed, each bit can be :
0 : zero
1 : one
X : variable-known (see "flags")
? : variable-unknown (destroyed)
CONTENT & OVERVIEW
keyboard.inc : keyboard include file
ti83plus.inc : ultimate TI-83+|TI-83+SE|TI-84+|TI-84+SE include file
font_large_custom.png : preview of what's in font_large_custom.z80
font_large_system.png : system 6x8p character font preview (2.53+)
1_character_tokens.txt : token>character reference table for all valid 1-character-long tokens
READ.txt : this file
system_ram_structure.txt : system ram structure summary
arcpages.z80 : Identifies the reference pages of the archive.
battcheck.z80 : Checks batteries.
bootver.z80 : Identifies the boot code version.
cpirnc.z80 : Similar to cpir, but additionally halts if a bank edge is reached.
cpirz.z80 : Similar to cpir, but instead halts if the specified byte isn't found.
cpirznc.z80 : Similar to cpir, but instead halts if the specified byte isn't found, and additionally halts if a bank edge is reached.
flashlock.z80 : Locks the flash chip.
flashmanuf.z80 : Identifies the flash chip manufacturer.
flashunlock.z80 : Unlocks the flash chip.
font_large_custom.z80 : Custom 6x8p character font matching ASCII|ISO-8859-1|CP-1252.
guiselect.z80 : Provides interaction with a simple 6x8p-text-based option selection GUI, using a custom cursor.
intdefault.z80 : Sets all hardware interrupts to the default system configuration.
intdisable.z80 : Disables and acknowledges all hardware interrupts.
keybcheck.z80 : Checks if at least one key is pressed, and if it's [ON].
keybdebounce.z80 : Waits long enough for released keys to stop bouncing.
keybscan.z80 : Scans the whole keyboard, [ON] key excepted.
lcddispbuf.z80 : Displays the content of a custom fullscreen buffer.
lcddispchr.z80 : Displays a 6x8p character, using a custom font.
lcddispstr.z80 : Displays a string of 6x8p characters, using a custom font.
lcddisptxt.z80 : Displays the content of a custom fullscreen text buffer, using a custom 6x8p character font.
lcdfill.z80 : Fills the screen with the same byte, mostly used to clear all pixels.
lcdmode.z80 : LCD mode configuration.
lcdsavebuf.z80 : Stores the display to a custom fullscreen buffer in RAM.
poweroff.z80 : Turns off the calculator, and waits for an [ON] key press.
prgmedit.z80 : Exits, opens the program editor for the specified program, and sets the cursor to the specified location.
r16strdec.z80 : Converts a 16-bit value to a decimal character string, and writes it to RAM.
r8strbin.z80 : Converts an 8-bit value to a binary character string, and writes it to RAM.
r8strdec.z80 : Converts an 8-bit value to a decimal character string, and writes it to RAM.
r8strhex.z80 : Converts an 8-bit value to a hexadecimal character string, and writes it to RAM.
ramlock.z80 : Sets RAM execution permission to the system default configuration.
ramsize.z80 : Identifies the physical RAM size.
ramunlock.z80 : Makes all RAM executable.
romlock.z80 : Sets ROM execution permission to the system default configuration.
romsize.z80 : Identifies the physical ROM size.
romunlock.z80 : Makes all ROM executable.
romwrite1.z80 : Writes a byte to ROM.
romwritex.z80 : Similar to ldir, but instead writes to ROM, and additionally halts if a bank edge is reached.
secterase.z80 : Erases a sector.
sectstate.z80 : Checks a sector for protection against write|erase operations.
strdelz.z80 : Replaces the potential leading zeros of the specified character string in RAM by spaces.
sysver.z80 : Identifies the system version.
usbinfo.z80 : Identifies if USB is available, and its revision type.