mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 21:32:19 +00:00
92e75e9df8
Adjusted comment formatting in several assembler files. Removed dummy kbhit() function, as it's better to get a linker error than an implementation that does the wrong thing.
32 lines
867 B
ArmAsm
32 lines
867 B
ArmAsm
;
|
|
; void clrscr (void);
|
|
;
|
|
.export _clrscr
|
|
.import plot
|
|
.include "extzp.inc"
|
|
.include "osic1p.inc"
|
|
|
|
; Adapted from the Challenger Character Graphics
|
|
; Reference Manual, "2.3.3 MACHINE LANGUAGE SCREEN CLEAR"
|
|
; This is self-modifying code!
|
|
BANKS = VIDEORAMSIZE / $100
|
|
|
|
_clrscr:
|
|
lda #$20 ; ' '
|
|
ldy #BANKS
|
|
ldx #$00
|
|
staloc:
|
|
sta SCRNBASE,X
|
|
inx
|
|
bne staloc
|
|
inc staloc+2
|
|
dey
|
|
bne staloc
|
|
lda #>(SCRNBASE) ; Load high byte
|
|
sta staloc+2 ; Restore base address
|
|
|
|
lda #$00 ; Cursor in upper left corner
|
|
sta CURS_X
|
|
sta CURS_Y
|
|
jmp plot ; Set the cursor position
|