]> git.sur5r.net Git - cc65/blobdiff - libsrc/c64/cputc.s
Clear __oserror on success.
[cc65] / libsrc / c64 / cputc.s
index 1efeaa7018970d2b245bd1a0e0cae6ecc4936e06..d5ba79ed79b8cdf634b58dffdafecef7d590ccf8 100644 (file)
@@ -1,17 +1,17 @@
 ;
-; Ullrich von Bassewitz, 06.08.1998
+; Ullrich von Bassewitz, 1998-08-06, 2009-09-26
 ;
-; void cputcxy (unsigned char x, unsigned char y, char c);
-; void cputc (char c);
+; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
+; void __fastcall__ cputc (char c);
 ;
 
        .export         _cputcxy, _cputc, cputdirect, putchar
        .export         newline, plot
        .import         popa, _gotoxy
-       .import         xsize, revers
+        .import         PLOT
 
        .include        "c64.inc"
-       .include        "../cbm/cbm.inc"
+
 
 _cputcxy:
        pha                     ; Save C
@@ -49,7 +49,7 @@ cputdirect:
 
 advance:
        iny
-       cpy     xsize
+       cpy     #XSIZE
        bne     L3
        jsr     newline         ; new line
        ldy     #0              ; + cr
@@ -58,13 +58,13 @@ L3: sty     CURS_X
 
 newline:
        clc
-       lda     xsize
+       lda     #XSIZE
        adc     SCREEN_PTR
        sta     SCREEN_PTR
        bcc     L4
        inc     SCREEN_PTR+1
        clc
-L4:    lda     xsize
+L4:    lda     #XSIZE
        adc     CRAM_PTR
        sta     CRAM_PTR
        bcc     L5
@@ -84,12 +84,12 @@ L11:        ora     #$40
 
 
 
-; Set cursor position, calculate RAM pointers
+; Set cursor position, calculate RAM pointers.
 
 plot:  ldy     CURS_X
        ldx     CURS_Y
        clc
-       jmp     PLOT            ; Set the new cursor
+               jmp     PLOT            ; Set the new cursor
 
 
 
@@ -97,7 +97,7 @@ plot: ldy     CURS_X
 ; position in Y
 
 putchar:
-       ora     revers          ; Set revers bit
+       ora     RVS             ; Set revers bit
                ldy     CURS_X
        sta     (SCREEN_PTR),y  ; Set char
        lda     CHARCOLOR