From ff2ac39a974ebb5234fe62aeb1d3af024288d2f4 Mon Sep 17 00:00:00 2001 From: Michael Steil Date: Mon, 13 Oct 2008 09:12:45 +0000 Subject: [PATCH] cleanup --- defines_apple.s | 3 +++ defines_cbm.s | 3 +++ defines_kbd.s | 3 +++ defines_kim.s | 3 +++ defines_osi.s | 3 +++ print.s | 60 ++++++++++++++++++++++++------------------------- 6 files changed, 45 insertions(+), 30 deletions(-) diff --git a/defines_apple.s b/defines_apple.s index cc72968..e44c8be 100644 --- a/defines_apple.s +++ b/defines_apple.s @@ -10,6 +10,9 @@ CONFIG_PRINT_CR := 1 ; print CR when line end reached CONFIG_IO_MSB := 1 ; IO is 7 bit, MSB may be randomly set ; INPUTBUFFER > $0100 +CRLF_1 := $0D +CRLF_2 := $80 + ZP_START = $55 JMPADRS = DSCLEN + 1 diff --git a/defines_cbm.s b/defines_cbm.s index 25ec5cd..b2fe1c9 100644 --- a/defines_cbm.s +++ b/defines_cbm.s @@ -25,6 +25,9 @@ CONFIG_DATAFLAG := 1 CONFIG_FILE := 1; support PRINT#, INPUT#, GET#, CMD CONFIG_NO_CR := 1; terminal doesn't need explicit CRs on line ends +CRLF_1 := $0D +CRLF_2 := $0A + .ifdef CBM1 ZP_START = $65 diff --git a/defines_kbd.s b/defines_kbd.s index f9e11b4..3fb7bf4 100644 --- a/defines_kbd.s +++ b/defines_kbd.s @@ -7,6 +7,9 @@ CONFIG_11_NOAPPLE := 1 CONFIG_SAFE_NAMENOTFOUND := 1 ; INPUTBUFFER > $0100 +CRLF_1 := $0A +CRLF_2 := $0D + ZP_START = $15 Z00 := $0700 diff --git a/defines_kim.s b/defines_kim.s index 3ef3ed4..a29af67 100644 --- a/defines_kim.s +++ b/defines_kim.s @@ -7,6 +7,9 @@ KIM_APPLE := 1 CONFIG_NULL := 1 CONFIG_PRINT_CR := 1 ; print CR when line end reached +CRLF_1 := $0D +CRLF_2 := $0A + ZP_START = $63 JMPADRS = DSCLEN + 1 diff --git a/defines_osi.s b/defines_osi.s index 24f2280..d304b9c 100644 --- a/defines_osi.s +++ b/defines_osi.s @@ -6,6 +6,9 @@ CONFIG_DATAFLAG := 1 ; minor: just code order CONFIG_SCRTCH_ORDER := 1 +CRLF_1 := $0D +CRLF_2 := $0A + ZP_START = $65 JMPADRS = DSCLEN + 1 diff --git a/print.s b/print.s index 8af40a7..f28630a 100644 --- a/print.s +++ b/print.s @@ -50,7 +50,12 @@ L29B1: jsr STRPRT .ifdef KBD jmp L297E +.else + jsr OUTSP + bne L297E ; branch always +.endif +.ifdef KBD ; PATCHES LE86C: pla @@ -63,20 +68,12 @@ LE874: bpl LE8F2 LE878: jmp IQERR -CRDO: - lda #$0A - sta $10 - jsr OUTDO -LE882: - lda #$0D - jsr OUTDO -PRINTNULLS: - lda #$00 - sta $10 - eor #$FF -.else - jsr OUTSP - bne L297E +; PATCHES +.endif + + + +.ifndef KBD L29B9: .ifdef CBM2 lda #$00 @@ -90,32 +87,35 @@ L29B9: ldx #LINNUM+1 .endif .endif - .ifdef CONFIG_CBM_ALL + .ifdef CONFIG_FILE lda Z03 bne L29DD -LC9D2: .endif +.endif + + CRDO: - .ifdef CBM1 +.if .def(CONFIG_PRINTNULLS) && .def(CONFIG_FILE) lda Z03 bne LC9D8 sta $05 LC9D8: - .endif - lda #$0D - .ifndef CONFIG_CBM_ALL - sta Z16 - .endif - jsr OUTDO - .ifdef APPLE - lda #$80 - .else - lda #$0A - .endif - jsr OUTDO .endif -.ifndef KBD + lda #CRLF_1 +.ifndef CONFIG_CBM_ALL + sta Z16 +.endif + jsr OUTDO +LE882: + lda #CRLF_2 + jsr OUTDO + PRINTNULLS: +.ifdef KBD + lda #$00 + sta $10 + eor #$FF +.else .if .def(CONFIG_NULL) || .def(CONFIG_PRINTNULLS) .ifdef CONFIG_FILE ; Although there is no statement for it,