From 508533b14876f5503f50308af1d40c8d416cbb51 Mon Sep 17 00:00:00 2001 From: Curtis F Kaylor Date: Fri, 15 Nov 2019 13:27:55 -0500 Subject: [PATCH] Cleaned up system header files --- include/appl2std.h02 | 4 ++++ include/c64.a02 | 48 ++++++++++++++++++++++++++------------------ include/py65.h02 | 2 +- include/template.h02 | 6 +++--- 4 files changed, 36 insertions(+), 24 deletions(-) diff --git a/include/appl2std.h02 b/include/appl2std.h02 index b72901a..98f9459 100644 --- a/include/appl2std.h02 +++ b/include/appl2std.h02 @@ -35,3 +35,7 @@ void newlin(); //Advance cursor to beginning of next line char putchr(); //Print ASCII character to Console void setdst(); //Set Destination Pointer void setsrc(); //Set Source Pointer + +//System Labels +start: //Start of Code +exit: //Return to Operating System diff --git a/include/c64.a02 b/include/c64.a02 index 91ec470..86afefc 100644 --- a/include/c64.a02 +++ b/include/c64.a02 @@ -1,26 +1,29 @@ -; c02 Program Initialization Code for Unexpanded VIC-20 +; c02 Program Initialization Code for Commodore 64 ;PETSCII Key Mappings -DELKEY EQU $14 ;Delete/Backspace Key (Delete) -ESCKEY EQU $03 ;Escape/Stop Key (RUN/STOP) -RTNKEY EQU $0D ;Return/Enter Key (RETURN) +DELKEY EQU $14 ;Delete/Backspace Key (Delete) +ESCKEY EQU $03 ;Escape/Stop Key (RUN/STOP) +RTNKEY EQU $0D ;Return/Enter Key (RETURN) ;Zero Page Variables -SRCLO EQU $22 ;Source Pointer LSB [Temporary Pointers] -SRCHI EQU $23 ;Source Pointer MSB [Temporary Pointers] -DSTLO EQU $24 ;Destination Pointer LSB [Temporary Pointers] -DSTHI EQU $25 ;Destination Pointer MSB [Temporary Pointers] -BLKLO EQU $26 ;Block Pointer LSB [Floating Point Work Area] -BLKHI EQU $27 ;Block Pointer MSB [Floating Point Work Area] -STKLO EQU $28 ;Stack Pointer LSB [Floating Point Work Area] -STKHI EQU $29 ;Stack Pointer MSB [Floating Point Work Area] -BFRLO EQU $35 ;Buffer Pointer LSB [Temporary String Pointer] -BFRHI EQU $36 ;Buffer Pointer MSB [Temporary String Pointer] -RDSEED EQU $A2 ;Random Seed [Software Jiffy Clock (Low Byte)] -TEMP0 EQU $FB ;Temporary Variable [Unused Byte] -TEMP1 EQU $FC ;Temporary Variable [Unused Byte] -TEMP2 EQU $FD ;Temporary Variable [Unused Byte] -TEMP3 EQU $FE ;Temporary Variable [Unused Byte] +XMBANK EQU $0A ;Extended Memory Bank (Load/Verify Flag) +XADRLO EQU $0B ;Ext Memory Address LSB (Text Index/Array Size) +XADRHI EQU $0C ;Ext Memory Address MSB (Array Dimension Fkags) +SRCLO EQU $22 ;Source Pointer LSB [Temporary Pointers] +SRCHI EQU $23 ;Source Pointer MSB [Temporary Pointers] +DSTLO EQU $24 ;Destination Pointer LSB [Temporary Pointers] +DSTHI EQU $25 ;Destination Pointer MSB [Temporary Pointers] +BLKLO EQU $26 ;Block Pointer LSB [Floating Point Work Area] +BLKHI EQU $27 ;Block Pointer MSB [Floating Point Work Area] +STKLO EQU $28 ;Stack Pointer LSB [Floating Point Work Area] +STKHI EQU $29 ;Stack Pointer MSB [Floating Point Work Area] +BFRLO EQU $35 ;Buffer Pointer LSB [Temporary String Pointer] +BFRHI EQU $36 ;Buffer Pointer MSB [Temporary String Pointer] +RDSEED EQU $A2 ;Random Seed [Software Jiffy Clock (Low Byte)] +TEMP0 EQU $FB ;Temporary Variable [Unused Byte] +TEMP1 EQU $FC ;Temporary Variable [Unused Byte] +TEMP2 EQU $FD ;Temporary Variable [Unused Byte] +TEMP3 EQU $FE ;Temporary Variable [Unused Byte] ;System Variables USER3 EQU $0313 ;Free Byte for User Programs @@ -51,7 +54,7 @@ FSFLFA EQU $F314 ;Find Logical File A ;Machine Language Basic Stub ORG $0801 ;Start of Basic Program -BASIC: DC $0C, $10 ;Pointer to Next Line (4109) +BASIC: DC $0C, $08 ;Pointer to Next Line DC $00, $00 ;Line Number (0) DC $9E ;SYS DC $20 ;' ' @@ -91,4 +94,9 @@ NEWLIN: LDX #0 ;Store 0 STX $D3 ;in Cursor Column and JMP $E87C ;Execute NXTLINE Routine +;Print Zero Delimited String to Screen +PUTSTR: TXA ;Copy LSB to Accumulator + JMP $AB1E ;Execute STROUT + INCLUDE "../include/prbyte.a02" ;PRBYTE and PRHEX routine + diff --git a/include/py65.h02 b/include/py65.h02 index 2c0fdf2..3fd9005 100644 --- a/include/py65.h02 +++ b/include/py65.h02 @@ -23,7 +23,7 @@ char temp0, temp1, temp2, temp3; //Temporary Storage //Memory Mapped I/O char putcon; //Write Character to Console -char getcomn; //Read Character from Console +char getcon; //Read Character from Console //System Subroutines char polkey(); //Poll Console for character diff --git a/include/template.h02 b/include/template.h02 index 2395599..f49e83d 100644 --- a/include/template.h02 +++ b/include/template.h02 @@ -1,6 +1,6 @@ -/************************************************ - * template - Template Library Routines for C02 * - ************************************************/ +/*************************************************** + * template.a02 - Template Module Routines for C02 * + ***************************************************/ /* Function Description * * Args: a - First Argument *