2018-08-14 18:14:32 +00:00
|
|
|
/* Apple ][ Header File */
|
|
|
|
|
2020-10-19 19:42:10 +00:00
|
|
|
/* Platform Specific Settings */
|
|
|
|
#pragma zeropage $FA $FF //Zero Page Free Space
|
|
|
|
|
2018-09-12 13:54:54 +00:00
|
|
|
/* Platform Specific Constants */
|
2018-08-14 18:14:32 +00:00
|
|
|
#define DELKEY $08 //Delete/Backspace Key
|
|
|
|
#define ESCKEY $1B //Escape/Stop Key
|
|
|
|
#define RTNKEY $0D //Return/Enter Key
|
2020-10-11 18:45:01 +00:00
|
|
|
#define SYSBFL 255 //System Buffer Length
|
2018-08-14 18:14:32 +00:00
|
|
|
|
2018-09-12 13:54:54 +00:00
|
|
|
/* Standard Library Variables */
|
2020-10-19 19:42:10 +00:00
|
|
|
zeropage int srcptr, dstptr; //Source and Destination Pointer
|
|
|
|
zeropage int blkptr, stkptr; //Block and Stack Pointers
|
|
|
|
zeropage int tmpptr, usrptr; //Temporary and User Pointer
|
|
|
|
int stkbgn, stkend; //Stack Begin and End Address
|
|
|
|
int blkbgn, blkend; //Block Begin and End Address
|
|
|
|
char blklen, xmbank; //Block Segment Length, Ext Memory Bank
|
|
|
|
int xmaddr; //Extended Memory Address
|
|
|
|
char random, rdseed; //Pseudo-Random Number and Seed
|
|
|
|
char temp0, temp1, temp2, temp3; //Temporary Storage
|
2020-10-11 18:45:01 +00:00
|
|
|
char sysbfr[], sysbfp; //System String Buffer and Position
|
2018-08-14 18:14:32 +00:00
|
|
|
|
2018-09-12 13:54:54 +00:00
|
|
|
/* System Subroutines */
|
|
|
|
void delchr(); //Delete previous character
|
|
|
|
char getchr(); //Wait for character from Console
|
|
|
|
char getkey(); //Read ASCII character from Console
|
|
|
|
void newlin(); //Advance cursor to beginning of next line
|
|
|
|
char polkey(); //Poll Console for character
|
2020-10-19 19:42:10 +00:00
|
|
|
void prbyte(); //Print Accumulator as Hexadecimal number
|
|
|
|
void prhex(); //Print Low Nybble of Accumulator as Hex Digit
|
2018-09-12 13:54:54 +00:00
|
|
|
char putchr(); //Print ASCII character to Console
|
2020-04-27 16:20:37 +00:00
|
|
|
char putstr(); //Print ASCII string to Console
|
2019-05-19 02:27:09 +00:00
|
|
|
|
2020-10-19 19:42:10 +00:00
|
|
|
/* System Labels */
|
2019-05-19 02:27:09 +00:00
|
|
|
start: //Start of Code
|
|
|
|
exit: //Return to Operating System
|