mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-06-01 21:41:31 +00:00
40 lines
864 B
Plaintext
40 lines
864 B
Plaintext
;Screen Control Assembly Lanuage Routines for C02
|
|
;Skeleton Code for Systems with no Screen Control
|
|
|
|
SUBROUTINE _SCREEN
|
|
|
|
SMTEXT EQU $00 ;Default Text Screen
|
|
SMWIDE EQU $FF ;Wide Text Screen (Undefined)
|
|
|
|
;Set Screen Mode
|
|
SETSCR: CMP #SMTEXT ;If Not Default Text
|
|
BNE GETPOS ;Return Error
|
|
;Else Return 0
|
|
;Get Screen Mode
|
|
GETSCR: LDA #0 ;Return 0 (Default Text Mode)
|
|
RTS
|
|
|
|
;Clear the Screen
|
|
CLRSCR: RTS ;No Action
|
|
LDY #>.CLRSCS ;Execute System Call CLS
|
|
LDX #<.CLRSCS
|
|
JMP SYSTEM
|
|
.CLRSCS BYTE "CLS",0
|
|
|
|
;Move Cursor Home
|
|
CRSRHM RTS ;No Action
|
|
|
|
;Move Cursor to Specified Coordinates
|
|
SETPOS RTS ;No Action
|
|
|
|
;Get Cursor Position
|
|
GETPOS: LDA #$FF ;Return Error
|
|
TAY
|
|
RTS
|
|
|
|
;Get Screen Size
|
|
GETSIZ LDA #80 ;Return 80x25
|
|
LDY #25
|
|
RTS
|
|
|