1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-29 10:29:30 +00:00
cc65/libsrc/c128/cputc.s
cuz 67890598ac Disable scrolling
git-svn-id: svn://svn.cc65.org/cc65/trunk@1791 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-12-19 23:16:51 +00:00

58 lines
1.0 KiB
ArmAsm

;
; Ullrich von Bassewitz, 06.08.1998
;
; void cputcxy (unsigned char x, unsigned char y, char c);
; void cputc (char c);
;
.export _cputcxy, _cputc, cputdirect, putchar
.export newline, plot
.constructor initcputc
.destructor donecputc
.import popa, _gotoxy
.import PLOT
.include "c128.inc"
_cputcxy:
pha ; Save C
jsr popa ; Get Y
jsr _gotoxy ; Set cursor, drop x
pla ; Restore C
jmp PRINT
; Plot a character - also used as internal function
_cputc = PRINT ; let the kernal handle it
cputdirect = $c33b
newline:
lda #17
jmp PRINT
; Set cursor position, calculate RAM pointers
plot: ldy CURS_X
ldx CURS_Y
clc
jmp PLOT ; Set the new cursor
; Write one character to the screen without doing anything else, return X
; position in Y
putchar = $CC2F
;--------------------------------------------------------------------------
; Module constructor/destructor
initcputc:
lda #$C0
.byte $2C
donecputc:
lda #$00
sta SCROLL
rts