mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-25 21:33:44 +00:00
63 lines
2.1 KiB
Plaintext
63 lines
2.1 KiB
Plaintext
C02 Header File for py65mon
|
|
|
|
At the beginning of the program use the directive
|
|
|
|
#include <py65.h02>
|
|
|
|
This must be the first include directive.
|
|
|
|
Defined zero-page memory locations (variables):
|
|
|
|
srclo, srchi Source String Pointer (used by library functions).
|
|
dstlo, dsthi Destination String Pointer (used by library functions).
|
|
|
|
Defined functions:
|
|
|
|
delchr(); Moves cursor one character to the left and
|
|
deletes character in that position.
|
|
|
|
Note: Writes backspace, space, backspace
|
|
via prchr($08), prchr($20), and prchr($08).
|
|
|
|
c = getkey(); Waits for keypress and returns ASCII code of
|
|
key that was pressed.
|
|
|
|
Note: Aliased to rdkey().
|
|
|
|
newlin(); Advances the cursor to the beginning of then
|
|
next line.
|
|
|
|
Note: Writes carriage return and line feed
|
|
via prchr($0D) and prchr($0A).
|
|
|
|
c = rdkey(); Waits for keypress and returns ASCII code of
|
|
key that was pressed.
|
|
|
|
Note: Continuously reads from memory location
|
|
getc until a non-zero value is returned.
|
|
|
|
prchr(c); Prints character to screen.
|
|
|
|
Note: Writes argument to memory location putc.
|
|
|
|
resdst(); Restores the destination pointer from temp1 and
|
|
temp2, respectively.
|
|
|
|
resreg(); Restores the A, X, and Y registers from temp1,
|
|
temp1, and temp2, respectively.
|
|
|
|
resrxy(); Restores the X and Y registers from temp1 and
|
|
temp2, respectively.
|
|
|
|
savdst(); Saves the destination pointer in temp1 and temp2,
|
|
respectively.
|
|
|
|
Note: Calls getdst() and savrxy().
|
|
|
|
savreg(); Saves the A, X, and Y registers in temp0, temp1,
|
|
and temp2, respectively.
|
|
|
|
savrxy(); Saves the X and Y registers in temp1 and temp2,
|
|
respectively.
|
|
|