1; 2; Maciej 'YTM/Elysium' Witkowiak 3; 4; 27.10.2001 5; 06.03.2002 6 7; void gotox (unsigned char x); 8; void gotoy (unsigned char y); 9; void gotoxy (unsigned char x, unsigned char y); 10 11 .export _gotox, _gotoy, gotoxy, _gotoxy, fixcursor 12 .import popa 13 .importzp cursor_x, cursor_y, cursor_c, cursor_r 14 15 .include "jumptab.inc" 16 17_gotox: 18 sta cursor_c 19 jmp fixcursor 20 21_gotoy: 22 sta cursor_r 23 jmp fixcursor 24 25gotoxy: 26 jsr popa 27 28_gotoxy: 29 sta cursor_r 30 jsr popa 31 sta cursor_c 32 33; convert 8x8 x/y coordinates to GEOS hires 34fixcursor: 35 lda cursor_c 36 sta cursor_x 37 lda #0 38 sta cursor_x+1 39 ldx #cursor_x 40 ldy #3 41 jsr DShiftLeft 42 lda cursor_r 43 asl a 44 asl a 45 asl a 46 sta cursor_y 47 rts 48