2018-09-17 00:30:25 +00:00
|
|
|
;Screen Control Assembly Lanuage Routines for VIC-20
|
2018-09-12 13:54:54 +00:00
|
|
|
|
2019-11-20 06:06:34 +00:00
|
|
|
SUBROUTINE _SCREEN
|
|
|
|
|
|
|
|
SMTEXT EQU $00 ;Default Text Screen
|
|
|
|
SMWIDE EQU $FF ;Wide Text Screen (Undefined)
|
|
|
|
|
|
|
|
;Set Screen Mode
|
2020-04-27 16:32:18 +00:00
|
|
|
SETSCR: CMP #SMTEXT ;If Default Text Screen
|
2019-11-20 06:06:34 +00:00
|
|
|
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
|
|
|
|
|
2018-09-17 00:30:25 +00:00
|
|
|
;Clear the Screen
|
|
|
|
CLRSCR EQU $E55F ;Aliased to CLSR Routine
|
2018-09-12 13:54:54 +00:00
|
|
|
|
|
|
|
;Move Cursor To Home Position
|
2018-09-17 00:30:25 +00:00
|
|
|
CRSRHM EQU $E581 ;Aliased to HOME Routine
|
2018-09-12 13:54:54 +00:00
|
|
|
|
|
|
|
;Move Cursor to Specified Coordinates
|
2018-09-17 00:30:25 +00:00
|
|
|
SETPOS: STA $D3 ;Save Cursor Column
|
|
|
|
STY $D6 ;Save Cursor Row
|
|
|
|
JMP $E587 ;Set Screen Poiners and Return
|
2018-09-12 13:54:54 +00:00
|
|
|
|
|
|
|
;Get Cursor Position
|
2018-09-17 00:30:25 +00:00
|
|
|
GETPOS: LDY $D6 ;Load Cursor Row
|
|
|
|
LDA $D3 ;Load Cursor Column
|
2018-09-12 13:54:54 +00:00
|
|
|
RTS
|
|
|
|
|
|
|
|
;Get Screen Size
|
2018-09-17 00:30:25 +00:00
|
|
|
GETSIZ: JSR $FFED ;Call SCREEN Kernal Routine
|
2018-09-12 13:54:54 +00:00
|
|
|
TXA ;Transfer Width to Accumulator
|
|
|
|
RTS
|