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
|
|
|
|
|
|
|
; unsigned char cgetc (void);
|
|
|
|
|
|
|
|
.export _cgetc
|
2002-03-08 16:47:34 +00:00
|
|
|
.import update_cursor
|
2002-12-23 22:14:14 +00:00
|
|
|
.importzp cursor_x, cursor_y, cursor_flag
|
2001-10-27 17:13:22 +00:00
|
|
|
|
2012-01-31 20:49:58 +00:00
|
|
|
.include "jumptab.inc"
|
|
|
|
.include "geossym.inc"
|
2001-10-27 17:13:22 +00:00
|
|
|
|
|
|
|
_cgetc:
|
|
|
|
; show cursor if needed
|
2012-02-08 15:23:45 +00:00
|
|
|
lda cursor_flag
|
|
|
|
beq L0
|
2001-10-27 17:13:22 +00:00
|
|
|
|
2012-02-08 15:23:45 +00:00
|
|
|
jsr update_cursor
|
|
|
|
lda cursor_x
|
|
|
|
ldx cursor_x+1
|
|
|
|
sta stringX
|
|
|
|
stx stringX+1
|
|
|
|
lda cursor_y
|
|
|
|
sec
|
|
|
|
sbc curHeight
|
|
|
|
sta stringY
|
|
|
|
jsr PromptOn
|
2001-10-27 17:13:22 +00:00
|
|
|
|
2012-02-08 15:23:45 +00:00
|
|
|
L0: jsr GetNextChar
|
|
|
|
tax
|
|
|
|
beq L0
|
|
|
|
pha
|
|
|
|
jsr PromptOff
|
|
|
|
pla
|
|
|
|
ldx #0
|
|
|
|
rts
|