mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-22 01:31:33 +00:00
49 lines
1.8 KiB
Plaintext
49 lines
1.8 KiB
Plaintext
|
/* Orao 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 $1F //Delete/Backspace Key
|
||
|
#define ESCKEY $03 //Escape/Stop Key
|
||
|
#define RTNKEY $0D //Return/Enter Key
|
||
|
#define NULKEY $00 //No Key was Pressed
|
||
|
|
||
|
/* Zero Page Variables used as Pointers */
|
||
|
zeropage int srcptr, dstptr, bfrptr, blkptr;
|
||
|
char stklo,stkhi; //Stack Pointer
|
||
|
|
||
|
/* Ephemeral Library Variables *
|
||
|
* Available for use in program code, but may *
|
||
|
* be obliterated by Function Calls. *
|
||
|
* May be Zero Page, but not required */
|
||
|
char temp0,temp1,temp2,temp3; //Temporary variables
|
||
|
|
||
|
/* 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
|
||
|
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
|
||
|
|
||
|
//System Subroutines
|
||
|
void delchr(); //Delete previous character
|
||
|
char getkey(); //Read ASCII character from Console
|
||
|
char getpos(); //Get Cursor Position
|
||
|
char getsiz(); //Get Screen Size
|
||
|
void newlin(); //Advance cursor to beginning of next line
|
||
|
char polkey(); //Poll Console for character
|
||
|
char putchr(); //Print ASCII character to Console
|
||
|
void prbyte(); //Print Accumulator as Hexadadecimal number
|
||
|
void prhex(); //Print Low Nybble of Accumulator as Hex Digit
|
||
|
char getchr(); //Wait for character from Console
|
||
|
void setpos(); //Set Cursor Position
|
||
|
|
||
|
//System Labels
|
||
|
start: //Start of Code
|
||
|
exit: //Return to Operating System
|