1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 21:29:03 +00:00
cc65/libsrc/geos-common/conio/gotoxy.s
ol.sc d30ecfbd0e Normalized coding style.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5497 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-08 15:23:45 +00:00

47 lines
702 B
ArmAsm

;
; Maciej 'YTM/Elysium' Witkowiak
;
; 27.10.2001
; 06.03.2002
; void gotox (unsigned char x);
; void gotoy (unsigned char y);
; void gotoxy (unsigned char x, unsigned char y);
.export _gotox, _gotoy, _gotoxy, fixcursor
.import popa
.importzp cursor_x, cursor_y, cursor_c, cursor_r
.include "jumptab.inc"
_gotox:
sta cursor_c
jmp fixcursor
_gotoy:
sta cursor_r
inc cursor_r
jmp fixcursor
_gotoxy:
sta cursor_r
inc cursor_r
jsr popa
sta cursor_c
; convert 8x8 x/y coordinates to GEOS hires
fixcursor:
lda cursor_c
sta cursor_x
lda #0
sta cursor_x+1
lda cursor_r
sta cursor_y
ldx #cursor_x
ldy #3
jsr DShiftLeft
asl cursor_y
asl cursor_y
asl cursor_y
rts