Initial Agat support
This commit is contained in:
23
libsrc/agat/cgetc.s
Normal file
23
libsrc/agat/cgetc.s
Normal file
@@ -0,0 +1,23 @@
|
||||
;
|
||||
; Oleg A. Odintsov, Moscow, 2024
|
||||
;
|
||||
; char cgetc (void);
|
||||
;
|
||||
|
||||
.export _cgetc
|
||||
.import cursor
|
||||
.include "agat.inc"
|
||||
|
||||
_cgetc:
|
||||
lda #$DF ; _
|
||||
bit cursor
|
||||
bne hascur
|
||||
lda #$00
|
||||
hascur: sta CURSOR
|
||||
jsr j1
|
||||
cmp #$A0
|
||||
bpl :+
|
||||
and #$7F
|
||||
: rts
|
||||
j1: jmp (VCIN)
|
||||
|
||||
Reference in New Issue
Block a user