1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-28 10:51:14 +00:00
C02/include/header.h02

47 lines
1.8 KiB
Plaintext
Raw Normal View History

2018-01-28 18:30:49 +00:00
/* System Specific C02 Header File Template */
/* This header contains standardized Constants, *
* Variables, and Function Calls tailored to a *
* a specific platform. */
/* System Specific ASCII Key Codes */
#define DELKEY $7F //Delete/Backspace Key
#define ESCKEY $1B //Escape/Stop Key
#define RTNKEY $0D //Return/Enter Key
#define SYSBFL 128 //System Buffer Length
2018-01-28 18:30:49 +00:00
/* Zero Page Variables used as Pointers */
zeropage int srcptr, dstptr, bfrptr, blkptr;
2018-08-14 18:14:32 +00:00
char stklo,stkhi; //Stack Pointer
2018-01-28 18:30:49 +00:00
/* Ephemeral Library Variables *
* Available for use in program code, but may *
* be obliterated by Function Calls. *
* May be Zero Page, but not required */
2018-07-25 23:00:46 +00:00
char temp0,temp1,temp2,temp3; //Temporary variables
2018-01-28 18:30:49 +00:00
/* Static Library Variables *
* Must be preserved between function calls *
* May be Zero Page, but not required */
int blkbgn, blkend; //Block Start and End Address
char blklen; //Block Segment Length
2018-08-14 18:14:32 +00:00
char stkslo, stkshi; //Stack Start Address
char stkelo, stkehi; //Stsck End Address
char random; //Last Result of Pseudo-Random Number Generator
char rdseed; //System Seed for Pseudo-Random Number Generator
char sysbfr[], sysbfp; //System String Buffer and Position
2018-01-28 18:30:49 +00:00
//System Subroutines
2018-11-07 05:11:09 +00:00
void delchr(); //Delete previous character
char getchr(); //Wait for character from Console
2018-08-14 18:14:32 +00:00
char getkey(); //Read ASCII character from Console
void newlin(); //Advance cursor to beginning of next line
2018-11-07 05:11:09 +00:00
char polkey(); //Poll Console for character
char putchr(); //Print ASCII character to Console
2018-08-14 18:14:32 +00:00
void prbyte(); //Print Accumulator as Hexadadecimal number
void prhex(); //Print Low Nybble of Accumulator as Hex Digit
//System Labels
start: //Start of Code
exit: //Return to Operating System