From 56fb87ea818bae4566417043aecdea2b9b208431 Mon Sep 17 00:00:00 2001 From: Michael Steil Date: Sat, 18 Oct 2008 05:32:39 +0000 Subject: [PATCH] cleanup --- defines_apple.s | 18 ++++-------------- defines_cbm.s | 39 ++++++++++++--------------------------- defines_kbd.s | 17 +++++------------ defines_kim.s | 13 ------------- defines_microtan.s | 13 +------------ defines_osi.s | 13 +------------ zeropage.s | 17 ++++++++++++++++- 7 files changed, 39 insertions(+), 91 deletions(-) diff --git a/defines_apple.s b/defines_apple.s index c6eb0be..fe39fc0 100644 --- a/defines_apple.s +++ b/defines_apple.s @@ -14,27 +14,15 @@ ZP_START0A = $4F ZP_START1 = $0D ZP_START2 = $55 -JMPADRS = DSCLEN + 1 -LOWTRX = LOWTR - +;extra ZP variables USR := $000A -;POSX := $0050 -;Z17 := $0051 -;Z18 := $0052 -;LINNUM := $0053 -TXPSV := $0053 +INPUTBUFFER := $0200 CONFIG_NO_INPUTBUFFER_ZP := 1 CONFIG_INPUTBUFFER_0200 := 1 -INPUTBUFFER := $0200 -INPUTBUFFERX := $0200 - -MONRDKEY := $FD0C -MONCOUT := $FDED - ; constants STACK_TOP := $F8 SPACE_FOR_GOSUB := $36 @@ -45,6 +33,8 @@ CRLF_2 := $80 RAMSTART2 := $2A00 ; monitor functions +MONRDKEY := $FD0C +MONCOUT := $FDED LF689 := $F689 LF800 := $F800 LF819 := $F819 diff --git a/defines_cbm.s b/defines_cbm.s index a2409b9..8530a51 100644 --- a/defines_cbm.s +++ b/defines_cbm.s @@ -34,25 +34,13 @@ ZP_START0A = $04 ZP_START1 = $5A ZP_START2 = $65 -JMPADRS = DSCLEN + 1 -LOWTRX = LOWTR - -USR := $0000 - -;GORESTART := $0000 - -;Z15 := $0004 -;POSX := $0005 -;LINNUM := $0008 -;INPUTBUFFER := $000A - -TXPSV := $0008 -INPUTBUFFERX := $0000 - +;extra ZP variables Z03 := $0003 Z96 := $020C -NULL_MAX := $0A +; overlay ZP variables +USR := GORESTART + .else ; zero page @@ -61,32 +49,29 @@ ZP_START0A = $0E ZP_START1 = $03 ZP_START2 = $13 -JMPADRS = DSCLEN + 1 -LOWTRX = LOWTR - -USR := GORESTART ; XXX - -;LINNUM := $0011 - +;extra ZP variables Z03 := $000E Z96 := $0096 -; override +; overlay ZP variables +TXPSV := LASTOP +USR := GORESTART ; XXX + +; override ZP variables POSX := $00C6 -TXPSV = LASTOP +INPUTBUFFER := $0200 CONFIG_NO_INPUTBUFFER_ZP := 1 CONFIG_INPUTBUFFER_0200 := 1 -INPUTBUFFER := $0200 -INPUTBUFFERX := $0200 .endif ; constants .ifdef CBM1 SPACE_FOR_GOSUB := $36 STACK_TOP := $FC +NULL_MAX := $0A .else SPACE_FOR_GOSUB := $3E STACK_TOP := $FA diff --git a/defines_kbd.s b/defines_kbd.s index c178b66..cbb478f 100644 --- a/defines_kbd.s +++ b/defines_kbd.s @@ -18,31 +18,24 @@ ZP_START0A = $0F ZP_START1 = $06 ZP_START2 = $15 +;extra ZP variables +TXPSV := $0049 JMPADRS := $0093 LOWTRX := $0094 ; $AB also EXPSGN? +Z96 := $0096 -;POSX := $0010 -;LINNUM := $0013 - -; overrides +; override ZP variables Z17 := $06FC Z18 := $06FD - -TXPSV := $0049 +INPUTBUFFER := $0700 CONFIG_NO_INPUTBUFFER_ZP := 1 -INPUTBUFFER := $0700 -INPUTBUFFERX := $0700 - -Z96 := $0096 - ; magic memory locations L06FE := $06FE L6874 := $6874 - ; constants STACK_TOP := $FE SPACE_FOR_GOSUB := $49 diff --git a/defines_kim.s b/defines_kim.s index f81e048..2a60d3d 100644 --- a/defines_kim.s +++ b/defines_kim.s @@ -15,19 +15,6 @@ ZP_START0A = $15 ZP_START1 = $0A ZP_START2 = $63 -JMPADRS = DSCLEN + 1 -LOWTRX = LOWTR - -;Z15 := $0015 -;POSX := $0016 -;Z17 := $0017 -;Z18 := $0018 -;LINNUM := $0019 -;INPUTBUFFER := $001B - -TXPSV := $0019 -INPUTBUFFERX := $0000 - ; magic memory locations L1800 := $1800 L1873 := $1873 diff --git a/defines_microtan.s b/defines_microtan.s index cf01814..c85c1ee 100644 --- a/defines_microtan.s +++ b/defines_microtan.s @@ -19,20 +19,9 @@ ZP_START0A = $2F ZP_START1 = $24 ZP_START2 = $85 -JMPADRS = DSCLEN + 1 -LOWTRX = LOWTR - +;extra ZP variables USR := $0021 - -;Z15 := $002F -;POSX := $0030 -;Z17 := $0031 -;Z18 := $0032 -;LINNUM := $0033 -;INPUTBUFFER := $0035 - TXPSV := $00BA -INPUTBUFFERX := $0000 ; constants STACK_TOP := $FE diff --git a/defines_osi.s b/defines_osi.s index f1a6315..3923e44 100644 --- a/defines_osi.s +++ b/defines_osi.s @@ -11,19 +11,8 @@ ZP_START0A = $0D ZP_START1 = $5B ZP_START2 = $65 -JMPADRS = DSCLEN + 1 -LOWTRX = LOWTR - +;extra ZP variables USR := $000A -;Z15 := $000D -;POSX := $000E -;Z17 := $000F -;Z18 := $0010 -;LINNUM := $0011 -;INPUTBUFFER := $0013 - -TXPSV := $0011 -INPUTBUFFERX := $0000 ; constants STACK_TOP := $FC diff --git a/zeropage.s b/zeropage.s index d489c1b..cfca350 100644 --- a/zeropage.s +++ b/zeropage.s @@ -1,5 +1,20 @@ -.feature org_per_seg +; other memory locations +INPUTBUFFERX = INPUTBUFFER & $FF00 + +; overlay ZP variables, can be overridden +.ifndef JMPADRS +JMPADRS := DSCLEN + 1 +.endif +.ifndef LOWTRX +LOWTRX := LOWTR +.endif +.ifndef TXPSV +TXPSV := LINNUM +.endif + + +.feature org_per_seg .zeropage .org ZP_START0