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
|
2001-10-27 17:13:22 +00:00
|
|
|
|
|
|
|
.include "../inc/jumptab.inc"
|
|
|
|
.include "../inc/geossym.inc"
|
2002-03-08 16:47:34 +00:00
|
|
|
.include "../inc/cursor.inc"
|
2001-10-27 17:13:22 +00:00
|
|
|
|
|
|
|
_cgetc:
|
|
|
|
; show cursor if needed
|
|
|
|
lda cursor_flag
|
|
|
|
beq L0
|
|
|
|
|
2002-03-08 16:47:34 +00:00
|
|
|
jsr update_cursor
|
2001-10-27 17:13:22 +00:00
|
|
|
lda cursor_x
|
|
|
|
ldx cursor_x+1
|
|
|
|
sta stringX
|
|
|
|
stx stringX+1
|
2002-03-08 16:47:34 +00:00
|
|
|
lda cursor_y
|
2002-04-06 17:37:12 +00:00
|
|
|
sec
|
|
|
|
sbc curHeight
|
2001-10-27 17:13:22 +00:00
|
|
|
sta stringY
|
|
|
|
jsr PromptOn
|
|
|
|
|
|
|
|
L0: jsr GetNextChar
|
|
|
|
tax
|
|
|
|
beq L0
|
|
|
|
pha
|
|
|
|
jsr PromptOff
|
|
|
|
pla
|
|
|
|
ldx #0
|
|
|
|
rts
|