mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-22 01:31:33 +00:00
Renamed Apple 2 standard header files
This commit is contained in:
parent
45cead9330
commit
dfedddab72
@ -1,6 +1,6 @@
|
|||||||
/* C02 Apple II Test Program */
|
/* C02 Apple II Test Program */
|
||||||
|
|
||||||
#include <apple2.h02>
|
#include <appl2std.h02>
|
||||||
|
|
||||||
char i;
|
char i;
|
||||||
|
|
||||||
@ -10,3 +10,4 @@ main:
|
|||||||
prchr(i);
|
prchr(i);
|
||||||
}
|
}
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
|
@ -1,5 +1,16 @@
|
|||||||
@ECHO Compiling File %1.c02
|
@echo Compiling File %1.c02
|
||||||
..\c02.exe %1
|
..\c02.exe %1 >%1.out
|
||||||
|
@if ERRORLEVEL 1 exit /b
|
||||||
|
|
||||||
@ECHO Assembling File %1.asm
|
@echo Assembling File %1.asm
|
||||||
C:\Programs\dasm %1.asm -f3 -o%1.bin -l%1.lst -s%1.sym
|
dasm %1.asm -f3 -o%1.bin -l%1.lst -s%1.sym
|
||||||
|
@if ERRORLEVEL 1 exit /b
|
||||||
|
|
||||||
|
@echo Building Disk Image
|
||||||
|
copy /Y boot.dsk %1.dsk
|
||||||
|
echo BRUN %1 |a2tools in t %1.dsk command
|
||||||
|
a2tools in b.0C00 %1.dsk %1 %1.bin
|
||||||
|
@if ERRORLEVEL 1 exit /b
|
||||||
|
|
||||||
|
@echo Starting Emulator
|
||||||
|
start C:\Programs\AppleWin\applewin -d1 %1.dsk
|
||||||
|
172
doc/header.txt
172
doc/header.txt
@ -1,83 +1,89 @@
|
|||||||
System Specific Header File Specification
|
System Specific Header File Specification
|
||||||
|
|
||||||
The very first directive of the program must be
|
The very first directive of the program must be
|
||||||
|
|
||||||
#include <header.h02>
|
#include <header.h02>
|
||||||
|
|
||||||
where header.h02 is the system specific header file, (e.g. apple1.h02,
|
where header.h02 is the system specific header file, (e.g. apple1.h02,
|
||||||
vic20.h02, etc.).
|
vic20.h02, etc.).
|
||||||
|
|
||||||
Note: This will probably be replaced with a command line parameter
|
Note: This will probably be replaced with a command line parameter
|
||||||
(e.g. '-s apple1', '-s vic20', etc...) to allow program portability.
|
(e.g. '-s apple1', '-s vic20', etc...) to allow program portability.
|
||||||
|
|
||||||
If compatibility with the C02 Standard Libraries is needed, the following
|
If compatibility with the C02 Standard Libraries is needed, the following
|
||||||
functions must be defined:
|
functions must be defined:
|
||||||
|
|
||||||
c = plkey(); Polls keyboard and returns raw ASCII character
|
c = plkey(); Polls keyboard and returns raw ASCII character
|
||||||
corresponding to last/current pressed key.
|
corresponding to last/current pressed key.
|
||||||
|
|
||||||
Returns constant NULKEY (usually 0) if no key was
|
Returns constant NULKEY (usually 0) if no key was
|
||||||
pressed.
|
pressed.
|
||||||
|
|
||||||
c = rdkey(); Waits for a keypress and returns the raw ASCII
|
c = rdkey(); Waits for a keypress and returns the raw ASCII
|
||||||
character corresponding to the pressed key.
|
character corresponding to the pressed key.
|
||||||
|
|
||||||
Note: Usually a loop that calls plkey(), but may
|
Note: Usually a loop that calls plkey(), but may
|
||||||
also directly call a system subroutine.
|
also directly call a system subroutine.
|
||||||
|
|
||||||
c = getkey(); Waits for a keypress and returns the cleaned
|
c = getkey(); Waits for a keypress and returns the cleaned
|
||||||
ASCII value corresponding to the pressed key.
|
ASCII value corresponding to the pressed key.
|
||||||
|
|
||||||
Note: Calls rdkey() followed by any necessary
|
Note: Calls rdkey() followed by any necessary
|
||||||
character code conversions. This can be due to
|
character code conversions. This can be due to
|
||||||
high-bit being set by keyboard decoder,
|
high-bit being set by keyboard decoder,
|
||||||
non-standard key mappings, keys that generate
|
non-standard key mappings, keys that generate
|
||||||
escape sequences, etc...
|
escape sequences, etc...
|
||||||
|
|
||||||
newlin(); Advances the cursor to the beginning of then
|
newlin(); Advances the cursor to the beginning of then
|
||||||
next line.
|
next line.
|
||||||
|
|
||||||
Note: Depending on the system, this will usually
|
Note: Depending on the system, this will usually
|
||||||
output a Carriage Return, Line Feed, both.
|
output a Carriage Return, Line Feed, both.
|
||||||
|
|
||||||
prchr(c); Writes character c to the screen.
|
echo(c); Writes character c to the screen without any
|
||||||
|
translation.
|
||||||
Note: May directly access memory-mapped I/O
|
|
||||||
or may call a system subroutine.
|
Note: May directly access memory-mapped I/O
|
||||||
|
or may call a system subroutine.
|
||||||
setdst(&s): Stores pointer to &s in dstlo and dsthi.
|
|
||||||
|
prchr(c); Writes character c to the screen.
|
||||||
setsrc(&s): Stores pointer to &s in srclo and srchi and
|
|
||||||
initializes Y register to 0.
|
Note: Does any needed ACSII conversions, then calls
|
||||||
|
echo().
|
||||||
along with the Zero Page locations (each pair of which must be sequential)
|
|
||||||
|
setdst(&s): Stores pointer to &s in dstlo and dsthi.
|
||||||
srclo, srchi Spurce String Pointer
|
|
||||||
dstlo, dsthi Destination String Pointer
|
setsrc(&s): Stores pointer to &s in srclo and srchi and
|
||||||
|
initializes Y register to 0.
|
||||||
the following locations that may be Zero Page, but don't have to before
|
|
||||||
|
along with the Zero Page locations (each pair of which must be sequential)
|
||||||
temp0 Temporary variables used by stdlib.asm
|
|
||||||
temp1
|
srclo, srchi Spurce String Pointer
|
||||||
temp2
|
dstlo, dsthi Destination String Pointer
|
||||||
|
|
||||||
and the following locations that must be preserved between function calls
|
the following locations that may be Zero Page, but don't have to before
|
||||||
|
|
||||||
random Storage for the Random Number Generator
|
temp0 Temporary variables used by stdlib.asm
|
||||||
|
temp1
|
||||||
Contains the last number generated and is used to
|
temp2
|
||||||
generate the next number in the sequence
|
|
||||||
|
and the following locations that must be preserved between function calls
|
||||||
rdseed Seed for Pseudo-Random Number Generator
|
|
||||||
|
random Storage for the Random Number Generator
|
||||||
Usually a counter or timer. If one is not provided
|
|
||||||
by the system, should be generated by incrementing
|
Contains the last number generated and is used to
|
||||||
in the plkey(), rdkey() functions.
|
generate the next number in the sequence
|
||||||
|
|
||||||
and the constants
|
rdseed Seed for Pseudo-Random Number Generator
|
||||||
|
|
||||||
DELKEY ASCII code for Delete/Backspace key (usually DEL or BS)
|
Usually a counter or timer. If one is not provided
|
||||||
ESCKEY ASCII code for Escape/Abort key (usually ESC)
|
by the system, should be generated by incrementing
|
||||||
NULKEY Returned if no Key was Pressed
|
in the plkey(), rdkey() functions.
|
||||||
RTNKEY ASCII code for Return/Enter key (usually CR)
|
|
||||||
|
and the constants
|
||||||
|
|
||||||
|
DELKEY ASCII code for Delete/Backspace key (usually DEL or BS)
|
||||||
|
ESCKEY ASCII code for Escape/Abort key (usually ESC)
|
||||||
|
NULKEY Returned if no Key was Pressed
|
||||||
|
RTNKEY ASCII code for Return/Enter key (usually CR)
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ PLKEYR: RTS
|
|||||||
;Read Keyboard
|
;Read Keyboard
|
||||||
GETKEY EQU KEYIN ;Alias to Monitor Routine
|
GETKEY EQU KEYIN ;Alias to Monitor Routine
|
||||||
|
|
||||||
|
|
||||||
;Print Character to Screen
|
;Print Character to Screen
|
||||||
PRCHR: ORA #$80 ;Set High Bit
|
PRCHR: ORA #$80 ;Set High Bit
|
||||||
CMP #$E0 ;
|
CMP #$E0 ;
|
@ -1,4 +1,4 @@
|
|||||||
/* Apple 1 Header File */
|
/* Apple ][ Header File */
|
||||||
|
|
||||||
/* Monitor Variables */
|
/* Monitor Variables */
|
||||||
|
|
||||||
@ -18,8 +18,8 @@ char temp0, temp1, temp2, temp3; //Temporary Variables
|
|||||||
char invflg; //Video Invert Mask
|
char invflg; //Video Invert Mask
|
||||||
|
|
||||||
//Keyboard I/O
|
//Keyboard I/O
|
||||||
char kbd; //Keyboard Data
|
char kbd; //Keyboard Data Register
|
||||||
char abd; //Keyboard Strobe
|
char abd; //Keyboard Strobe Register
|
||||||
|
|
||||||
//Monitor Subroutines
|
//Monitor Subroutines
|
||||||
void echo(); //Print Character in Accumulator
|
void echo(); //Print Character in Accumulator
|
Loading…
Reference in New Issue
Block a user