From c221fe22f66dd0371097c9eb1a23685d77eb3fa6 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Sun, 27 Sep 2015 19:10:06 +0200 Subject: [PATCH] prepend soft80_ to some more internally used functions --- libsrc/c64/soft80_cgetc.s | 4 ++-- libsrc/c64/soft80_chline.s | 18 +++++++++--------- libsrc/c64/soft80_cputc.s | 17 +++++++++-------- libsrc/c64/soft80_cvline.s | 6 +++--- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/libsrc/c64/soft80_cgetc.s b/libsrc/c64/soft80_cgetc.s index 7b8a260f1..12b2071a2 100644 --- a/libsrc/c64/soft80_cgetc.s +++ b/libsrc/c64/soft80_cgetc.s @@ -4,7 +4,7 @@ .export soft80_cgetc .import cursor ; FIX/CHECK - .import putcolor ; FIX/CHECK + .import soft80_putcolor .include "c64.inc" .include "soft80.inc" @@ -52,7 +52,7 @@ L3: jsr KBDREAD ; Read char and return in A lda #$34 sta $01 - jsr putcolor + jsr soft80_putcolor ldy #$00 diff --git a/libsrc/c64/soft80_chline.s b/libsrc/c64/soft80_chline.s index 0fc711870..de6ab7637 100644 --- a/libsrc/c64/soft80_chline.s +++ b/libsrc/c64/soft80_chline.s @@ -4,21 +4,21 @@ ; .export soft80_chlinexy, soft80_chline - .import popa, _gotoxy, cputdirect ; FIX/CHECK + .import popa, _gotoxy, soft80_cputdirect .importzp tmp1 soft80_chlinexy: - pha ; Save the length - jsr popa ; Get y - jsr _gotoxy ; Call this one, will pop params - pla ; Restore the length + pha ; Save the length + jsr popa ; Get y + jsr _gotoxy ; Call this one, will pop params + pla ; Restore the length soft80_chline: - cmp #0 ; Is the length zero? - beq L9 ; Jump if done + cmp #0 ; Is the length zero? + beq L9 ; Jump if done sta tmp1 -L1: lda #96 ; Horizontal line, screen code - jsr cputdirect ; Direct output +L1: lda #96 ; Horizontal line, screen code + jsr soft80_cputdirect ; Direct output dec tmp1 bne L1 L9: rts diff --git a/libsrc/c64/soft80_cputc.s b/libsrc/c64/soft80_cputc.s index 2e75aa541..c81913476 100644 --- a/libsrc/c64/soft80_cputc.s +++ b/libsrc/c64/soft80_cputc.s @@ -5,15 +5,16 @@ .export soft80_cputcxy, soft80_cputc .export soft80_cputdirect, soft80_putchar - .export putcolor ; FIX/CHECK - + .export soft80_putcolor .export soft80_newline, soft80_plot + .import popa, _gotoxy .import xsize - .import PLOT ; FIX/CHECK - .importzp tmp4,tmp3 + .import soft80_kplot .import __bgcolor ; FIX/CHECK + .importzp tmp4,tmp3 + .macpack longbranch .include "c64.inc" @@ -39,7 +40,7 @@ soft80_plot: ldx CURS_Y ldy CURS_X clc - jmp PLOT ; Set the new cursor + jmp soft80_kplot ; Set the new cursor L1: cmp #$0D ; LF? beq soft80_newline ; Recalculate pointers @@ -170,7 +171,7 @@ remcolor: ; put color to cell ; y unmodified -putcolor: +soft80_putcolor: ;ldy #$00 ; is still $00 @@ -301,7 +302,7 @@ _space: _spaceinvers: - jsr putcolor + jsr soft80_putcolor lda CURS_X and #$01 @@ -344,7 +345,7 @@ soft80_putchar: cmp #' ' ; space is a special (optimized) case jeq _space - jsr putcolor + jsr soft80_putcolor ; output character char: diff --git a/libsrc/c64/soft80_cvline.s b/libsrc/c64/soft80_cvline.s index 78f92278d..a24d17c79 100644 --- a/libsrc/c64/soft80_cvline.s +++ b/libsrc/c64/soft80_cvline.s @@ -4,7 +4,7 @@ ; .export soft80_cvline, soft80_cvlinexy - .import popa, _gotoxy, putchar, newline ; CHECK/FIX + .import popa, _gotoxy, soft80_putchar, soft80_newline .importzp tmp1 soft80_cvlinexy: @@ -18,8 +18,8 @@ soft80_cvline: beq L9 ; Jump if done sta tmp1 L1: lda #125 ; Vertical bar - jsr putchar ; Write, no cursor advance - jsr newline ; Advance cursor to next line + jsr soft80_putchar ; Write, no cursor advance + jsr soft80_newline ; Advance cursor to next line dec tmp1 bne L1 L9: rts -- 2.39.5