From 7890f4102e30bad2d76c8888b6dcd0487598bf95 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Sun, 24 Jul 2022 04:14:48 +0200 Subject: [PATCH] cleanup --- libsrc/c128/cpeekchar.s | 74 ---------------------- libsrc/c64/soft80_cpeekchar.s | 113 ---------------------------------- libsrc/cbm610/cpeekchar.s | 46 -------------- 3 files changed, 233 deletions(-) delete mode 100644 libsrc/c128/cpeekchar.s delete mode 100644 libsrc/c64/soft80_cpeekchar.s delete mode 100644 libsrc/cbm610/cpeekchar.s diff --git a/libsrc/c128/cpeekchar.s b/libsrc/c128/cpeekchar.s deleted file mode 100644 index cf82dd529..000000000 --- a/libsrc/c128/cpeekchar.s +++ /dev/null @@ -1,74 +0,0 @@ - - .export _cpeekchar - .export _cpeekcharxy - - .import _gotoxy - - .import plot,popa - - - .include "zeropage.inc" - .include "c128.inc" - - .segment "CODE" - -_cpeekcharxy: - - jsr _gotoxy ; Set cursor - -_cpeekchar: - - lda MODE - bmi @c80 - - ldy CURS_X - lda (SCREEN_PTR),y ; get char - -@return: - ; convert to asc - and #$7f - - ; 0 - $1f +$40 - ; $20 - $3f - ; $40 - $7e +$80 - - cmp #$1f - bcs @sk1 -;; clc - adc #$40 - rts - -@sk1: - cmp #$40 - bcc @end - clc - adc #$80 -@end: - ldx #0 - rts - -@c80: - lda SCREEN_PTR - ldy SCREEN_PTR+1 - clc - adc CURS_X - bcc @s - iny -@s: - ; get byte from vdc mem - ldx #VDC_DATA_LO - stx VDC_INDEX -@L0: bit VDC_INDEX - bpl @L0 - sta VDC_DATA - dex - tya - stx VDC_INDEX - sta VDC_DATA - - ldx #VDC_DATA_RW - stx VDC_INDEX -@L1: bit VDC_INDEX - bpl @L1 - lda VDC_DATA - jmp @return diff --git a/libsrc/c64/soft80_cpeekchar.s b/libsrc/c64/soft80_cpeekchar.s deleted file mode 100644 index 21a9fc5e7..000000000 --- a/libsrc/c64/soft80_cpeekchar.s +++ /dev/null @@ -1,113 +0,0 @@ - - .export _cpeekchar - .export _cpeekcharxy - - .import _gotoxy - .import soft80_hi_charset - .import soft80_lo_charset - - .include "c64.inc" - - .macpack longbranch - - .segment "CODE" - -readdirect: -; sei -; dec $01 ;; assumed = $36 -; dec $01 ;; assumed = $36 - lda (SCREEN_PTR),y -; inc $01 -; inc $01 -; cli - rts - -_cpeekcharxy: - - jsr _gotoxy ; Set cursor - -_cpeekchar: - -;;rts - sei - ;;dec $01 ;; assumed = $36 - ;;dec $01 ;; assumed = $36 - lda #$34 - sta $01 - - lda CURS_X - and #$01 - - jne @l1a - -;; inc $d020 - -;;jmp * - - ldx #0 -@l2aa: - ldy #0 - -;; stx $d020 - - .repeat 8,line -;; jsr readdirect - lda (SCREEN_PTR),y - and #$f0 - sta $e100,y - cmp soft80_hi_charset+(line*$80),x -; cmp #0 - bne @l2b - .if (line < 7) - iny - .endif - .endrepeat - - -@backok: -;inc $d020 -; inc $01 -; inc $01 - lda #$36 - sta $01 - cli - txa - ; sec -; sbc #$20 - ldx #$00 - rts -@l2b: -;jmp * - inx - cpx #$80 - jne @l2aa -@backerr: - ;; inc $01 -;; inc $01 - lda #$36 - sta $01 - cli - ldx #0 - txa - rts - -@l1a: - ldx #0 -@l1aa: - ldy #0 - .repeat 8,line -;; jsr readdirect - lda (SCREEN_PTR),y - and #$0f - eor soft80_lo_charset+(line*$80),x - bne @l2bb - .if line < 7 - iny - .endif - .endrepeat - jmp @backok -@l2bb: - inx - cpx #$80 - bne @l1aa - jmp @backerr diff --git a/libsrc/cbm610/cpeekchar.s b/libsrc/cbm610/cpeekchar.s deleted file mode 100644 index 217532ab5..000000000 --- a/libsrc/cbm610/cpeekchar.s +++ /dev/null @@ -1,46 +0,0 @@ - - .export _cpeekchar - .export _cpeekcharxy - - .import _gotoxy - - .include "cbm610.inc" - .include "extzp.inc" - - .segment "CODE" - -_cpeekcharxy: - - jsr _gotoxy ; Set cursor - -_cpeekchar: - - ldx IndReg - ldy #$0F - sty IndReg - - ldy CURS_X - lda (CharPtr),y ; get char - ; convert to asc - and #$7f - - ; 0 - $1f +$40 - ; $20 - $3f - ; $40 - $7e +$80 - - cmp #$1f - bcs @sk1 -;; clc - adc #$40 - jmp @end - -@sk1: - cmp #$40 - bcc @end - clc - adc #$80 - -@end: - stx IndReg - ldx #0 - rts