mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-27 19:49:41 +00:00
Updated scrntst.c02 and all screen.h02, screen.a02
This commit is contained in:
parent
902347db57
commit
e09ebf96d6
@ -1,8 +1,26 @@
|
|||||||
;Screen Control Assembly Lanuage Routines for Apple 1
|
;Screen Control Assembly Lanuage Routines for Apple 1
|
||||||
|
|
||||||
|
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
|
;Clear the Screen
|
||||||
CLRSCR: RTS ;Do Nothing (Drop to RTS)
|
CLRSCR: RTS ;Do Nothing (Drop to RTS)
|
||||||
|
|
||||||
|
;Move Cursor Home
|
||||||
|
CRSRHM EQU CLRSCR ;No Action
|
||||||
|
|
||||||
;Move Cursor to Specified Coordinates
|
;Move Cursor to Specified Coordinates
|
||||||
SETPOS EQU CLRSCR ;No Action
|
SETPOS EQU CLRSCR ;No Action
|
||||||
|
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
* screen - Screen Control Routines for C02 *
|
* screen - Screen Control Routines for C02 *
|
||||||
********************************************/
|
********************************************/
|
||||||
|
|
||||||
|
/* Screen Modes for getscr() and setscr() */
|
||||||
|
#define SMTEXT $00 //System Default Text Mode
|
||||||
|
#define SMWIDE $FF //Wide Screen Text Mode (Unsupported)
|
||||||
|
|
||||||
/* Clear the Screen */
|
/* Clear the Screen */
|
||||||
void clrscn();
|
void clrscn();
|
||||||
|
|
||||||
@ -13,6 +17,10 @@ void crsrhm();
|
|||||||
* cursor row */
|
* cursor row */
|
||||||
char getpos();
|
char getpos();
|
||||||
|
|
||||||
|
/* Get Screen Mode *
|
||||||
|
* Returns: char mode - Current Screen Mode */
|
||||||
|
char getscr();
|
||||||
|
|
||||||
/* Get Screen Size *
|
/* Get Screen Size *
|
||||||
* Returns: width in columns *
|
* Returns: width in columns *
|
||||||
* height in rows */
|
* height in rows */
|
||||||
@ -22,3 +30,9 @@ char getsiz();
|
|||||||
* Args: column - screen column (0 = left) *
|
* Args: column - screen column (0 = left) *
|
||||||
* row - screen line (0 = top) */
|
* row - screen line (0 = top) */
|
||||||
void setpos();
|
void setpos();
|
||||||
|
|
||||||
|
/* Set Screen Mode *
|
||||||
|
* Args: char mode - screen mode *
|
||||||
|
* 0 = default text mode *
|
||||||
|
* Returns: $FF if Mode Invalid */
|
||||||
|
char setscr();
|
||||||
|
@ -1,5 +1,20 @@
|
|||||||
;Screen Control Assembly Lanuage Routines for Apple II
|
;Screen Control Assembly Lanuage Routines for Apple II
|
||||||
|
|
||||||
|
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
|
;Clear the Screen
|
||||||
CLRSCR: EQU $FC58 ;Applesoft Routine HOME
|
CLRSCR: EQU $FC58 ;Applesoft Routine HOME
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
/********************************************
|
/*****************************************
|
||||||
* screen - Screen Control Routines for C02 *
|
* Screen Control Functions for Apple II *
|
||||||
********************************************/
|
****************************************/
|
||||||
|
|
||||||
|
/* Screen Modes for getscr() and setscr() */
|
||||||
|
#define SMTEXT $00 //System Default Text Mode
|
||||||
|
#define SMWIDE $FF //Wide Screen Text Mode (Unsupported)
|
||||||
|
|
||||||
/* Clear the Screen */
|
/* Clear the Screen */
|
||||||
void clrscn();
|
void clrscn();
|
||||||
@ -18,7 +22,17 @@ char getpos();
|
|||||||
* height in rows */
|
* height in rows */
|
||||||
char getsiz();
|
char getsiz();
|
||||||
|
|
||||||
|
/* Get Screen Mode *
|
||||||
|
* Returns: char mode - Current Screen Mode */
|
||||||
|
char getscr();
|
||||||
|
|
||||||
/* Move Cursor to Specified Position *
|
/* Move Cursor to Specified Position *
|
||||||
* Args: column - screen column (0 = left) *
|
* Args: column - screen column (0 = left) *
|
||||||
* row - screen line (0 = top) */
|
* row - screen line (0 = top) */
|
||||||
void setpos();
|
void setpos();
|
||||||
|
|
||||||
|
/* Set Screen Mode *
|
||||||
|
* Args: char mode - screen mode *
|
||||||
|
* 0 = default text mode *
|
||||||
|
* Returns: $FF if Mode Invalid */
|
||||||
|
char setscr();
|
||||||
|
@ -1,5 +1,20 @@
|
|||||||
;Screen Control Assembly Lanuage Routines for VIC-20
|
;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
|
;Clear the Screen
|
||||||
CLRSCR EQU $E544 ;Aliased to CLSR Routine
|
CLRSCR EQU $E544 ;Aliased to CLSR Routine
|
||||||
|
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
* Screen Control Functions and Constants for VIC-20 *
|
* Screen Control Functions and Constants for VIC-20 *
|
||||||
*****************************************************/
|
*****************************************************/
|
||||||
|
|
||||||
|
/* Screen Modes for getscr() and setscr() */
|
||||||
|
#define SMTEXT $00 //System Default Text Mode
|
||||||
|
#define SMWIDE $FF //Wide Screen Text Mode (Unsupported)
|
||||||
|
|
||||||
/* Clear the Screen */
|
/* Clear the Screen */
|
||||||
void clrscn();
|
void clrscn();
|
||||||
|
|
||||||
@ -18,7 +22,17 @@ char getpos();
|
|||||||
* height in rows */
|
* height in rows */
|
||||||
char getsiz();
|
char getsiz();
|
||||||
|
|
||||||
|
/* Get Screen Mode *
|
||||||
|
* Returns: char mode - Current Screen Mode */
|
||||||
|
char getscr();
|
||||||
|
|
||||||
/* Move Cursor to Specified Position *
|
/* Move Cursor to Specified Position *
|
||||||
* Args: column - screen column (0 = left) *
|
* Args: column - screen column (0 = left) *
|
||||||
* row - screen line (0 = top) */
|
* row - screen line (0 = top) */
|
||||||
void setpos();
|
void setpos();
|
||||||
|
|
||||||
|
/* Set Screen Mode *
|
||||||
|
* Args: char mode - screen mode *
|
||||||
|
* 0 = default text mode *
|
||||||
|
* Returns: $FF if Mode Invalid */
|
||||||
|
char setscr();
|
||||||
|
39
include/orao/screen.a02
Normal file
39
include/orao/screen.a02
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
;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 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: LDA #$0C ;Print Form Feed
|
||||||
|
JMP PUTCHR ;and Return
|
||||||
|
|
||||||
|
;Move Cursor Home
|
||||||
|
CRSRHM EQU $E395 ;Aliad to HOME Routine
|
||||||
|
|
||||||
|
;Move Cursor to Specified Coordinates
|
||||||
|
SETPOS: STA $E9 ;Set CURCOL
|
||||||
|
STY $E8 ;Set CURROW
|
||||||
|
JMP $E39D ;Set Pointers and Return
|
||||||
|
|
||||||
|
;Get Cursor Position
|
||||||
|
GETPOS: LDA $E9 ;Load Column Position
|
||||||
|
LDY $E8 ;Load Row Position
|
||||||
|
RTS ;Return Cursor Column in A, Row in Y
|
||||||
|
|
||||||
|
;Get Screen Size
|
||||||
|
GETSIZ: LDA #32 ;Return 32 Columns
|
||||||
|
TAY ;and 32 Rows
|
||||||
|
RTS
|
38
include/orao/screen.h02
Normal file
38
include/orao/screen.h02
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*********************************************
|
||||||
|
* Screen Control Routines for Orao Computer *
|
||||||
|
*********************************************/
|
||||||
|
|
||||||
|
/* Screen Modes for getscr() and setscr() */
|
||||||
|
#define SMTEXT $00 //System Default Text Mode
|
||||||
|
#define SMWIDE $FF //Wide Screen Text Mode (Unsupported)
|
||||||
|
|
||||||
|
/* Clear the Screen */
|
||||||
|
void clrscn();
|
||||||
|
|
||||||
|
/* Move Cursor to Top Left of Screen */
|
||||||
|
void crsrhm();
|
||||||
|
|
||||||
|
/* Get Current Cursor Position *
|
||||||
|
* Returns: cursor column *
|
||||||
|
* cursor row */
|
||||||
|
char getpos();
|
||||||
|
|
||||||
|
/* Get Screen Mode *
|
||||||
|
* Returns: char mode - Current Screen Mode */
|
||||||
|
char getscr();
|
||||||
|
|
||||||
|
/* Get Screen Size *
|
||||||
|
* Returns: width in columns *
|
||||||
|
* height in rows */
|
||||||
|
char getsiz();
|
||||||
|
|
||||||
|
/* Move Cursor to Specified Position *
|
||||||
|
* Args: column - screen column (0 = left) *
|
||||||
|
* row - screen line (0 = top) */
|
||||||
|
void setpos();
|
||||||
|
|
||||||
|
/* Set Screen Mode *
|
||||||
|
* Args: char mode - screen mode *
|
||||||
|
* 0 = default text mode *
|
||||||
|
* Returns: $FF if Mode Invalid */
|
||||||
|
char setscr();
|
@ -1,5 +1,20 @@
|
|||||||
;Screen Control Assembly Lanuage Routines for Oric-1
|
;Screen Control Assembly Lanuage Routines for Oric-1
|
||||||
|
|
||||||
|
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
|
;Clear the Screen
|
||||||
CLRSCR EQU $CC0A ;Basic CLS Routine (Atmos = $CCCE)
|
CLRSCR EQU $CC0A ;Basic CLS Routine (Atmos = $CCCE)
|
||||||
|
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
* Screen Control Functions for Oric-1 *
|
* Screen Control Functions for Oric-1 *
|
||||||
***************************************/
|
***************************************/
|
||||||
|
|
||||||
|
/* Screen Modes for getscr() and setscr() */
|
||||||
|
#define SMTEXT $00 //System Default Text Mode
|
||||||
|
#define SMWIDE $FF //Wide Screen Text Mode (Unsupported)
|
||||||
|
|
||||||
/* Clear the Screen */
|
/* Clear the Screen */
|
||||||
void clrscn();
|
void clrscn();
|
||||||
|
|
||||||
@ -13,6 +17,10 @@ void crsrhm();
|
|||||||
( cursor row */
|
( cursor row */
|
||||||
char getpos();
|
char getpos();
|
||||||
|
|
||||||
|
/* Get Screen Mode *
|
||||||
|
* Returns: char mode - Current Screen Mode */
|
||||||
|
char getscr();
|
||||||
|
|
||||||
/* Get Screen Size *
|
/* Get Screen Size *
|
||||||
* Returns: width in columns *
|
* Returns: width in columns *
|
||||||
* height in rows */
|
* height in rows */
|
||||||
@ -22,3 +30,9 @@ char getsiz();
|
|||||||
* Args: column - screen column (0 = left) *
|
* Args: column - screen column (0 = left) *
|
||||||
* row - screen line (0 = top) */
|
* row - screen line (0 = top) */
|
||||||
void setpos();
|
void setpos();
|
||||||
|
|
||||||
|
/* Set Screen Mode *
|
||||||
|
* Args: char mode - screen mode *
|
||||||
|
* 0 = default text mode *
|
||||||
|
* Returns: $FF if Mode Invalid */
|
||||||
|
char setscr();
|
||||||
|
@ -1,6 +1,19 @@
|
|||||||
;Screen Control Assembly Lanuage Routines for C02
|
;Screen Control Assembly Lanuage Routines for C02
|
||||||
;Skeleton Code for Systems with no Screen Control
|
;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
|
||||||
|
BEQ GETPOS ;Return Error
|
||||||
|
;Else Return 0
|
||||||
|
;Get Screen Mode
|
||||||
|
GETSCR: LDA #0 ;Return 0 (Default Text Mode)
|
||||||
|
RTS
|
||||||
|
|
||||||
;Clear the Screen
|
;Clear the Screen
|
||||||
CLRSCR: RTS ;No Action
|
CLRSCR: RTS ;No Action
|
||||||
|
|
||||||
@ -17,3 +30,4 @@ GETPOS: LDA #$FF ;Return Error
|
|||||||
|
|
||||||
;Get Screen Size
|
;Get Screen Size
|
||||||
GETSIZ EQU GETPOS ;Return Error
|
GETSIZ EQU GETPOS ;Return Error
|
||||||
|
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
/********************************************
|
/***********************************
|
||||||
* screen - Screen Control Routines for C02 *
|
* Screen Control Routines for C02 *
|
||||||
********************************************/
|
***********************************/
|
||||||
|
|
||||||
|
/* Screen Modes for getscr() and setscr() *
|
||||||
|
* Invalid Modes have value $FF */
|
||||||
|
#define SMTEXT $00 //System Default Text Mode
|
||||||
|
#define SMWIDE $FF //Wide Screen Text Mode (Usuallu 80 Columns)
|
||||||
|
|
||||||
/* Clear the Screen */
|
/* Clear the Screen */
|
||||||
void clrscn();
|
void clrscn();
|
||||||
@ -18,7 +23,17 @@ char getpos();
|
|||||||
* height in rows */
|
* height in rows */
|
||||||
char getsiz();
|
char getsiz();
|
||||||
|
|
||||||
/* Move Cursor to Specified Position *
|
/* Get Screen Mode *
|
||||||
* Args: column - screen column (0 = left) *
|
* Returns: char mode - Current Screen Mode */
|
||||||
* row - screen line (0 = top) */
|
char getscr();
|
||||||
|
|
||||||
|
/* Move Cursor to Specified Position *
|
||||||
|
* Args: char col - screen column (0 = left) *
|
||||||
|
* char row - screen line (0 = top) */
|
||||||
void setpos();
|
void setpos();
|
||||||
|
|
||||||
|
/* Set Screen Mode *
|
||||||
|
* Args: char mode - screen mode *
|
||||||
|
* 0 = default text mode *
|
||||||
|
* Returns: $FF if Mode Invalid */
|
||||||
|
char setscr();
|
||||||
|
@ -1,5 +1,20 @@
|
|||||||
;Screen Control Assembly Lanuage Routines for VIC-20
|
;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
|
;Clear the Screen
|
||||||
CLRSCR EQU $E55F ;Aliased to CLSR Routine
|
CLRSCR EQU $E55F ;Aliased to CLSR Routine
|
||||||
|
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
* Screen Control Functions for VIC-20 *
|
* Screen Control Functions for VIC-20 *
|
||||||
***************************************/
|
***************************************/
|
||||||
|
|
||||||
|
/* Screen Modes for getscr() and setscr() */
|
||||||
|
#define SMTEXT $00 //System Default Text Mode
|
||||||
|
#define SMWIDE $FF //Wide Screen Text Mode (Unsupported)
|
||||||
|
|
||||||
/* Clear the Screen */
|
/* Clear the Screen */
|
||||||
void clrscn();
|
void clrscn();
|
||||||
|
|
||||||
@ -13,6 +17,10 @@ void crsrhm();
|
|||||||
( cursor row */
|
( cursor row */
|
||||||
char getpos();
|
char getpos();
|
||||||
|
|
||||||
|
/* Get Screen Mode *
|
||||||
|
* Returns: char mode - Current Screen Mode */
|
||||||
|
char getscr();
|
||||||
|
|
||||||
/* Get Screen Size *
|
/* Get Screen Size *
|
||||||
* Returns: width in columns *
|
* Returns: width in columns *
|
||||||
* height in rows */
|
* height in rows */
|
||||||
@ -22,3 +30,9 @@ char getsiz();
|
|||||||
* Args: column - screen column (0 = left) *
|
* Args: column - screen column (0 = left) *
|
||||||
* row - screen line (0 = top) */
|
* row - screen line (0 = top) */
|
||||||
void setpos();
|
void setpos();
|
||||||
|
|
||||||
|
/* Set Screen Mode *
|
||||||
|
* Args: char mode - screen mode *
|
||||||
|
* 0 = default text mode *
|
||||||
|
* Returns: $FF if Mode Invalid */
|
||||||
|
char setscr();
|
||||||
|
45
include/x16/screen.a02
Normal file
45
include/x16/screen.a02
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
;Screen Control Assembly Lanuage Routines for VIC-20
|
||||||
|
|
||||||
|
;SUBROUTINE
|
||||||
|
|
||||||
|
SMTEXT EQU $00 ;Default Text Screen
|
||||||
|
SMWIDE EQU $02 ;Wide Text Screen (Undefined)
|
||||||
|
|
||||||
|
;Set Screen Mode
|
||||||
|
SETSCR: SEC ;Set Carry
|
||||||
|
JSR $FF5F ;Call SCRMOD
|
||||||
|
LDA #0 ;Set Return Value to Zero
|
||||||
|
BCC .RETURN ;If Carry Set
|
||||||
|
DEC ; Return 255 (Error)
|
||||||
|
.RETURN RTS
|
||||||
|
|
||||||
|
;Get Screen Mode
|
||||||
|
GETSCR: CLC ;Clear Carry
|
||||||
|
JMP $FF5F ;Execute SCRMOD
|
||||||
|
RTS
|
||||||
|
|
||||||
|
;Clear the Screen
|
||||||
|
CLRSCR LDA #$93 ;Load CLR/HOME Character
|
||||||
|
JMP PUTCHR ;and Print to Screen
|
||||||
|
|
||||||
|
;Move Cursor To Home Position
|
||||||
|
CRSRHM LDA #$13 ;Load HOME Character
|
||||||
|
JMP PUTCHR ;and Print to Screen
|
||||||
|
|
||||||
|
;Move Cursor to Specified Coordinates
|
||||||
|
SETPOS: .DC $5A ;PHY Copy Row
|
||||||
|
.DC $FA ;PLX to X Register,
|
||||||
|
TAY ;Column to Y Register
|
||||||
|
CLC ;Set Carry
|
||||||
|
JMP $FFF0 ;and Execute Plot
|
||||||
|
|
||||||
|
;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
|
||||||
|
|
38
include/x16/screen.h02
Normal file
38
include/x16/screen.h02
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*****************************************************
|
||||||
|
* Screen Control Functions and Constants for VIC-20 *
|
||||||
|
*****************************************************/
|
||||||
|
|
||||||
|
/* Screen Modes for getscr() and setscr() */
|
||||||
|
#define SMTEXT $00 //Default Text Mode (40x30)
|
||||||
|
#define SMWIDE $02 //Wide Screen Text Mode (80x60)
|
||||||
|
|
||||||
|
/* Clear the Screen */
|
||||||
|
void clrscn();
|
||||||
|
|
||||||
|
/* Move Cursor to Top Left of Screen */
|
||||||
|
void crsrhm();
|
||||||
|
|
||||||
|
/* Get Current Cursor Position *
|
||||||
|
* Returns: cursor column *
|
||||||
|
( cursor row */
|
||||||
|
char getpos();
|
||||||
|
|
||||||
|
/* Get Screen Size *
|
||||||
|
* Returns: width in columns *
|
||||||
|
* height in rows */
|
||||||
|
char getsiz();
|
||||||
|
|
||||||
|
/* Get Screen Mode *
|
||||||
|
* Returns: char mode - Current Screen Mode */
|
||||||
|
char getscr();
|
||||||
|
|
||||||
|
/* Move Cursor to Specified Position *
|
||||||
|
* Args: column - screen column (0 = left) *
|
||||||
|
* row - screen line (0 = top) */
|
||||||
|
void setpos();
|
||||||
|
|
||||||
|
/* Set Screen Mode *
|
||||||
|
* Args: char mode - screen mode *
|
||||||
|
* 0 = default text mode *
|
||||||
|
* Returns: $FF if Mode Invalid */
|
||||||
|
char setscr();
|
@ -25,7 +25,6 @@ main:
|
|||||||
for (modex=0; modex<@modes; modex++) {
|
for (modex=0; modex<@modes; modex++) {
|
||||||
|
|
||||||
mode = modes[modex];
|
mode = modes[modex];
|
||||||
putstr("MODE $"); prbyte(mode); newlin();
|
|
||||||
if (mode == $FF) continue; //Unsupported Mode
|
if (mode == $FF) continue; //Unsupported Mode
|
||||||
|
|
||||||
if (setscr(mode)=$FF) putlin("ERROR IN SETSCR()");
|
if (setscr(mode)=$FF) putlin("ERROR IN SETSCR()");
|
||||||
|
Loading…
Reference in New Issue
Block a user