1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-22 16:34:15 +00:00
C02/include/vic/screen.a02
2020-04-27 12:32:18 -04:00

38 lines
985 B
Plaintext

;Screen Control Assembly Lanuage Routines for VIC-20
SUBROUTINE _SCREEN
SMTEXT EQU $00 ;Default Text Screen
SMWIDE EQU $FF ;Wide Text Screen (Undefined)
;Set Screen Mode
SETSCR: CMP #SMTEXT ;If Default Text Screen
BEQ GETSCR ;Return Return 0
LDA #$FF ;Else Return ERROR
RTS
;Else Return 0
;Get Screen Mode
GETSCR: LDA #0 ;Return 0 (Default Text Mode)
RTS
;Clear the Screen
CLRSCR EQU $E55F ;Aliased to CLSR Routine
;Move Cursor To Home Position
CRSRHM EQU $E581 ;Aliased to HOME Routine
;Move Cursor to Specified Coordinates
SETPOS: STA $D3 ;Save Cursor Column
STY $D6 ;Save Cursor Row
JMP $E587 ;Set Screen Poiners and Return
;Get Cursor Position
GETPOS: LDY $D6 ;Load Cursor Row
LDA $D3 ;Load Cursor Column
RTS
;Get Screen Size
GETSIZ: JSR $FFED ;Call SCREEN Kernal Routine
TXA ;Transfer Width to Accumulator
RTS