Add/update Apple ][ test programs

This commit is contained in:
Curtis F Kaylor 2018-03-03 13:26:47 -05:00
parent befddf1077
commit 341b38f012
5 changed files with 68 additions and 8 deletions

24
apple2/a2chars.c02 Normal file
View File

@ -0,0 +1,24 @@
/* C02 Apple II Test Program */
#include <appl2std.h02>
char h,i;
main:
prchr(' ');
for (i=0; i<16; i++)
prhex(i);
h=0; i=0;
do {
if (!i&15) {
newlin();
prhex(h);
h++;
prchr(' ');
}
if (i&$F0==$80) echo($A0);
else echo(i);
i++;
} while(i);
goto exit;

18
apple2/a2echo.c02 Normal file
View File

@ -0,0 +1,18 @@
/* C02 Apple II Test Program */
#include <appl2std.h02>
char c;
main:
loop:
c = plkey();
if (!c) goto loop;
newlin();
prbyte(c);
prchr(' ');
echo(c);
prchr(' ');
prchr(c);
goto loop;

16
apple2/a2keys.c02 Normal file
View File

@ -0,0 +1,16 @@
/* C02 Apple II Test Program */
#include <appl2std.h02>
char c;
main:
loop:
c = getkey();
if (c=$1B) goto exit;
newlin();
prbyte(c);
prchr(' ');
prchr(c);
goto loop;

Binary file not shown.

View File

@ -1,16 +1,18 @@
@echo Compiling File %1.c02
..\c02.exe %1 >%1.out
@if ERRORLEVEL 1 exit /b
@echo off
echo Compiling File %1.c02
..\c02.exe %1 >%1.dbg
if ERRORLEVEL 1 exit /b
@echo Assembling File %1.asm
echo Assembling File %1.asm
dasm %1.asm -f3 -o%1.bin -l%1.lst -s%1.sym
@if ERRORLEVEL 1 exit /b
if ERRORLEVEL 1 exit /b
@echo Building Disk Image
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
if ERRORLEVEL 1 exit /b
del %1.bin
@echo Starting Emulator
echo Starting Emulator
start C:\Programs\AppleWin\applewin -d1 %1.dsk