Introduction
This tutorial will show you how to create a RAM checking program. This program
will make good use of the _Memchk(_Memchk = 42E5h) and _Disphl(Disphl = 4507h)
ROM calls.
Programming
.NOLIST
#define equ .equ
#define EQU .equ
#define END .end
#include "ti83PlusAsm.inc"
.LIST
.org 9D95h
B_CALL(_ClrLCDfull)
ld hl,Mem ;Load Text
B_CALL(_puts)
B_CALL(_Memchk) ;Check RAM
B_CALL(_DispHL) ;Display contents of HL
ret
Mem:
.db "RAM free (bytes)"
.end
END
How the Program Worked
This is a fairly simple program. The _Memchk ROM call checks the amont of memory
available in RAM. It hen stores that value to the HL register. _DispHL then
displays the contents of HL on the screen.
New Commands
_MemChk - Checks amount of memory in RAM, outputs value to hl.
_Disphl - Displays contents of HL
Conclusion
This wasn't hard. =) Amount of Free RAM may vary due to hidden system variables
not marked dirty. This may alter the Free RAM returned by a few bytes.
Click to return to the site's menu... or here to get back to the tutorial's menu.