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
|
|
|
|
|
|
|
|
.include "../inc/jumptab.inc"
|
2002-03-08 16:47:34 +00:00
|
|
|
.include "../inc/cursor.inc"
|
2001-10-27 17:13:22 +00:00
|
|
|
|
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
|