1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-07 04:29:01 +00:00

prepend soft80_ to some more internally used functions

This commit is contained in:
mrdudz 2015-09-27 19:10:06 +02:00
parent b5a6578dca
commit c221fe22f6
4 changed files with 23 additions and 22 deletions

View File

@ -4,7 +4,7 @@
.export soft80_cgetc .export soft80_cgetc
.import cursor ; FIX/CHECK .import cursor ; FIX/CHECK
.import putcolor ; FIX/CHECK .import soft80_putcolor
.include "c64.inc" .include "c64.inc"
.include "soft80.inc" .include "soft80.inc"
@ -52,7 +52,7 @@ L3: jsr KBDREAD ; Read char and return in A
lda #$34 lda #$34
sta $01 sta $01
jsr putcolor jsr soft80_putcolor
ldy #$00 ldy #$00

View File

@ -4,21 +4,21 @@
; ;
.export soft80_chlinexy, soft80_chline .export soft80_chlinexy, soft80_chline
.import popa, _gotoxy, cputdirect ; FIX/CHECK .import popa, _gotoxy, soft80_cputdirect
.importzp tmp1 .importzp tmp1
soft80_chlinexy: soft80_chlinexy:
pha ; Save the length pha ; Save the length
jsr popa ; Get y jsr popa ; Get y
jsr _gotoxy ; Call this one, will pop params jsr _gotoxy ; Call this one, will pop params
pla ; Restore the length pla ; Restore the length
soft80_chline: soft80_chline:
cmp #0 ; Is the length zero? cmp #0 ; Is the length zero?
beq L9 ; Jump if done beq L9 ; Jump if done
sta tmp1 sta tmp1
L1: lda #96 ; Horizontal line, screen code L1: lda #96 ; Horizontal line, screen code
jsr cputdirect ; Direct output jsr soft80_cputdirect ; Direct output
dec tmp1 dec tmp1
bne L1 bne L1
L9: rts L9: rts

View File

@ -5,15 +5,16 @@
.export soft80_cputcxy, soft80_cputc .export soft80_cputcxy, soft80_cputc
.export soft80_cputdirect, soft80_putchar .export soft80_cputdirect, soft80_putchar
.export putcolor ; FIX/CHECK .export soft80_putcolor
.export soft80_newline, soft80_plot .export soft80_newline, soft80_plot
.import popa, _gotoxy .import popa, _gotoxy
.import xsize .import xsize
.import PLOT ; FIX/CHECK .import soft80_kplot
.importzp tmp4,tmp3
.import __bgcolor ; FIX/CHECK .import __bgcolor ; FIX/CHECK
.importzp tmp4,tmp3
.macpack longbranch .macpack longbranch
.include "c64.inc" .include "c64.inc"
@ -39,7 +40,7 @@ soft80_plot:
ldx CURS_Y ldx CURS_Y
ldy CURS_X ldy CURS_X
clc clc
jmp PLOT ; Set the new cursor jmp soft80_kplot ; Set the new cursor
L1: cmp #$0D ; LF? L1: cmp #$0D ; LF?
beq soft80_newline ; Recalculate pointers beq soft80_newline ; Recalculate pointers
@ -170,7 +171,7 @@ remcolor:
; put color to cell ; put color to cell
; y unmodified ; y unmodified
putcolor: soft80_putcolor:
;ldy #$00 ; is still $00 ;ldy #$00 ; is still $00
@ -301,7 +302,7 @@ _space:
_spaceinvers: _spaceinvers:
jsr putcolor jsr soft80_putcolor
lda CURS_X lda CURS_X
and #$01 and #$01
@ -344,7 +345,7 @@ soft80_putchar:
cmp #' ' ; space is a special (optimized) case cmp #' ' ; space is a special (optimized) case
jeq _space jeq _space
jsr putcolor jsr soft80_putcolor
; output character ; output character
char: char:

View File

@ -4,7 +4,7 @@
; ;
.export soft80_cvline, soft80_cvlinexy .export soft80_cvline, soft80_cvlinexy
.import popa, _gotoxy, putchar, newline ; CHECK/FIX .import popa, _gotoxy, soft80_putchar, soft80_newline
.importzp tmp1 .importzp tmp1
soft80_cvlinexy: soft80_cvlinexy:
@ -18,8 +18,8 @@ soft80_cvline:
beq L9 ; Jump if done beq L9 ; Jump if done
sta tmp1 sta tmp1
L1: lda #125 ; Vertical bar L1: lda #125 ; Vertical bar
jsr putchar ; Write, no cursor advance jsr soft80_putchar ; Write, no cursor advance
jsr newline ; Advance cursor to next line jsr soft80_newline ; Advance cursor to next line
dec tmp1 dec tmp1
bne L1 bne L1
L9: rts L9: rts