mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +00:00
add gotox, gotoy, and gotoxy
This commit is contained in:
parent
84c655a907
commit
30b418c734
@ -1,4 +1,26 @@
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; ATASCII CHARACTER DEFS
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
ATCLR = $7D ;CLEAR SCREEN CHARACTER
|
||||
ATRUB = $7E ;BACK SPACE (RUBOUT)
|
||||
ATTAB = $7F ;TAB
|
||||
ATEOL = $9B ;END-OF-LINE
|
||||
ATDELL = $9C ;delete line
|
||||
ATINSL = $9D ;insert line
|
||||
ATCTAB = $9E ;clear TAB
|
||||
ATSTAB = $9F ;set TAB
|
||||
ATBEL = $FD ;CONSOLE BELL
|
||||
ATDEL = $FE ;delete char.
|
||||
ATINS = $FF ;insert char.
|
||||
ATURW = $1C ;UP-ARROW
|
||||
ATDRW = $1D ;DOWN-ARROW
|
||||
ATLRW = $1E ;LEFT-ARROW
|
||||
ATRRW = $1F ;RIGHT-ARROW
|
||||
ATESC = $1B ;ESCAPE
|
||||
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; Zero Page
|
||||
;-------------------------------------------------------------------------
|
||||
@ -34,6 +56,10 @@ PADDL6 = $17 ;POT6 "
|
||||
PADDL7 = $18 ;POT7 "
|
||||
|
||||
|
||||
.importzp COLCRS_5200
|
||||
.importzp ROWCRS_5200
|
||||
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; Page #2
|
||||
;-------------------------------------------------------------------------
|
||||
|
15
libsrc/atari5200/gotox.s
Normal file
15
libsrc/atari5200/gotox.s
Normal file
@ -0,0 +1,15 @@
|
||||
;
|
||||
; Christian Groessler, 13-Mar-2014
|
||||
;
|
||||
; void gotox (unsigned char x);
|
||||
;
|
||||
|
||||
.include "atari5200.inc"
|
||||
.export _gotox
|
||||
.import setcursor
|
||||
|
||||
_gotox:
|
||||
sta COLCRS_5200 ; Set X
|
||||
lda #0
|
||||
sta COLCRS_5200+1
|
||||
jmp setcursor
|
19
libsrc/atari5200/gotoxy.s
Normal file
19
libsrc/atari5200/gotoxy.s
Normal file
@ -0,0 +1,19 @@
|
||||
;
|
||||
; Christian Groessler, 13-Mar-2014
|
||||
;
|
||||
; void gotoxy (unsigned char x, unsigned char y);
|
||||
;
|
||||
|
||||
.include "atari5200.inc"
|
||||
|
||||
.export _gotoxy
|
||||
.import popa
|
||||
.import setcursor
|
||||
|
||||
_gotoxy: ; Set the cursor position
|
||||
sta ROWCRS_5200 ; Set Y
|
||||
jsr popa ; Get X
|
||||
sta COLCRS_5200 ; Set X
|
||||
lda #0
|
||||
sta COLCRS_5200+1 ;
|
||||
jmp setcursor
|
13
libsrc/atari5200/gotoy.s
Normal file
13
libsrc/atari5200/gotoy.s
Normal file
@ -0,0 +1,13 @@
|
||||
;
|
||||
; Christian Groessler, 13-Mar-2014
|
||||
;
|
||||
; void gotoy (unsigned char y);
|
||||
;
|
||||
|
||||
.include "atari5200.inc"
|
||||
.export _gotoy
|
||||
.import setcursor
|
||||
|
||||
_gotoy:
|
||||
sta ROWCRS_5200 ; Set Y
|
||||
jmp setcursor
|
Loading…
Reference in New Issue
Block a user