2018-09-17 00:30:25 +00:00
|
|
|
;Screen Control Assembly Lanuage Routines for C02
|
|
|
|
;Skeleton Code for Systems with no Screen Control
|
|
|
|
|
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 Not Default Text
|
|
|
|
BNE GETPOS ;Return Error
|
2019-11-20 06:06:34 +00:00
|
|
|
;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: RTS ;No Action
|
|
|
|
|
|
|
|
;Move Cursor Home
|
|
|
|
CRSRHM EQU CLRSCR ;No Action
|
|
|
|
|
|
|
|
;Move Cursor to Specified Coordinates
|
|
|
|
SETPOS EQU CLRSCR ;No Action
|
|
|
|
|
|
|
|
;Get Cursor Position
|
|
|
|
GETPOS: LDA #$FF ;Return Error
|
|
|
|
TAY
|
|
|
|
RTS
|
|
|
|
|
|
|
|
;Get Screen Size
|
2020-04-27 16:32:18 +00:00
|
|
|
GETSIZ LDA #80 ;Return 80x25
|
|
|
|
LDY #25
|
|
|
|
RTS
|
2019-11-20 06:06:34 +00:00
|
|
|
|