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
|
|
|
|
2012-01-31 20:49:58 +00:00
|
|
|
.include "jumptab.inc"
|
2001-10-27 17:13:22 +00:00
|
|
|
|
2012-02-08 15:23:45 +00:00
|
|
|
_gotox:
|
|
|
|
sta cursor_c
|
|
|
|
jmp fixcursor
|
2001-10-27 17:13:22 +00:00
|
|
|
|
2012-02-08 15:23:45 +00:00
|
|
|
_gotoy:
|
|
|
|
sta cursor_r
|
|
|
|
inc cursor_r
|
|
|
|
jmp fixcursor
|
2001-10-27 17:13:22 +00:00
|
|
|
|
2012-02-08 15:23:45 +00:00
|
|
|
_gotoxy:
|
|
|
|
sta cursor_r
|
|
|
|
inc cursor_r
|
|
|
|
jsr popa
|
|
|
|
sta cursor_c
|
2001-10-27 17:13:22 +00:00
|
|
|
|
|
|
|
; convert 8x8 x/y coordinates to GEOS hires
|
|
|
|
fixcursor:
|
2012-02-08 15:23:45 +00:00
|
|
|
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
|