From bc90e4a771d1c7b0b32fc7151efb0b7d81363005 Mon Sep 17 00:00:00 2001 From: Curtis F Kaylor Date: Mon, 27 Apr 2020 12:53:59 -0400 Subject: [PATCH] Updated run6502 header and batch file --- include/run6502.a02 | 8 ++++---- test/r65.bat | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 test/r65.bat diff --git a/include/run6502.a02 b/include/run6502.a02 index 9ed7bc8..018ba25 100644 --- a/include/run6502.a02 +++ b/include/run6502.a02 @@ -44,12 +44,12 @@ STKEHI EQU $4F _KBHIT EQU $FFF0 ;Is a Key Pressed _GETCH EQU $FFF1 ;Read Keyboard (Blocking) - ORG $8000 ;START at RAM midpoint + ORG $0200 ;START at RAM midpoint START: JMP MAIN ;Execute Program ;Read Character from Console -GETKEY EQU $FFF4 ;Emulator CHRIN Routine +GETKEY EQU $FFE0 ;Emulator CHRIN Routine ;Poll Character from Keyboard POLKEY: BRK ;Exit Emulator @@ -76,9 +76,9 @@ NEWLIN: LDA #RTNKEY ;Load Line Feed into Accumulater JMP PUTCHR ; and Print it ;Print Character to Console -PUTCHR EQU $FFF6 ;Emulator CHROUT Routine +PUTCHR EQU $FFE3 ;Emulator CHROUT Routine -EXIT EQU $FFF8 ;Emulator SHUTDN Routine +EXIT EQU $FFEC ;Emulator SHUTDN Routine INCLUDE "../include/prbyte.a02" ;PRBYTE and PRHEX routines INCLUDE "../include/putstr.a02" ;PUTSTR routine diff --git a/test/r65.bat b/test/r65.bat new file mode 100644 index 0000000..c2c3d96 --- /dev/null +++ b/test/r65.bat @@ -0,0 +1,18 @@ +@ECHO OFF +IF EXIST %1.c02 GOTO COMPILE + ECHO File %1.c02 not found + GOTO EOF + +:COMPILE +@ECHO Compiling File %1.c02 for run6502 +..\c02.exe -h run6502 -s run6502 %1 >%1.dbg + +IF %ERRORLEVEL% NEQ 0 GOTO EOF + +@ECHO Assembling File %1.asm +..\a02 %1.asm %1.bin %1.lst + +@ECHO Executing file %1.bin +..\emu\run6502 -l 0200 %1.bin -G FFE0 -P FFE3 -N 0000 -R 0200 -X 0 + +:EOF