2001-10-27 17:13:22 +00:00
|
|
|
|
|
|
|
;
|
|
|
|
; Maciej 'YTM/Elysium' Witkowiak
|
|
|
|
;
|
|
|
|
; 27.10.2001
|
2002-03-08 16:47:34 +00:00
|
|
|
; 06.03.2002
|
2001-10-27 17:13:22 +00:00
|
|
|
|
|
|
|
; void gotox (unsigned char x);
|
|
|
|
; void gotoy (unsigned char y);
|
|
|
|
; void gotoxy (unsigned char x, unsigned char y);
|
|
|
|
|
2002-03-08 16:47:34 +00:00
|
|
|
.export _gotox, _gotoy, _gotoxy, fixcursor
|
2001-10-27 17:13:22 +00:00
|
|
|
.import popa
|
2002-12-23 22:14:14 +00:00
|
|
|
.importzp cursor_x, cursor_y, cursor_c, cursor_r
|
2001-10-27 17:13:22 +00:00
|
|
|
|
|
|
|
.include "../inc/jumptab.inc"
|
|
|
|
|
2002-03-08 16:47:34 +00:00
|
|
|
_gotox: sta cursor_c
|
2001-10-27 17:13:22 +00:00
|
|
|
jmp fixcursor
|
|
|
|
|
2002-03-08 16:47:34 +00:00
|
|
|
_gotoy: sta cursor_r
|
|
|
|
inc cursor_r
|
2001-10-27 17:13:22 +00:00
|
|
|
jmp fixcursor
|
|
|
|
|
2002-03-08 16:47:34 +00:00
|
|
|
_gotoxy: sta cursor_r
|
|
|
|
inc cursor_r
|
2001-10-27 17:13:22 +00:00
|
|
|
jsr popa
|
2002-03-08 16:47:34 +00:00
|
|
|
sta cursor_c
|
2001-10-27 17:13:22 +00:00
|
|
|
|
|
|
|
; convert 8x8 x/y coordinates to GEOS hires
|
|
|
|
fixcursor:
|
2002-03-08 16:47:34 +00:00
|
|
|
lda cursor_c
|
|
|
|
sta cursor_x
|
|
|
|
lda #0
|
|
|
|
sta cursor_x+1
|
|
|
|
lda cursor_r
|
|
|
|
sta cursor_y
|
2001-10-27 17:13:22 +00:00
|
|
|
ldx #cursor_x
|
|
|
|
ldy #3
|
|
|
|
jsr DShiftLeft
|
|
|
|
asl cursor_y
|
|
|
|
asl cursor_y
|
|
|
|
asl cursor_y
|
|
|
|
rts
|