1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00

Revert read.s

This commit is contained in:
jede 2021-03-01 22:44:06 +01:00
parent 256b22f1c7
commit 8ec6d28f92

View File

@ -8,7 +8,6 @@
.include "zeropage.inc"
.include "telestrat.inc"
.include "fcntl.inc"
;int read (int fd, void* buf, unsigned count);
@ -22,19 +21,8 @@
sta ptr2 ; in order to calculate nb of bytes read
stx ptr2+1 ;
jsr popax ; fp pointer don't care in this version
cpx #$00
bne @is_not_stdin
cmp #STDIN_FILENO
bne @is_not_stdin
; stdin
@L1:
BRK_TELEMON XRD0 ; waits until key is pressed
bcs @L1
; jsr popax ; fp pointer don't care in this version
rts
@is_not_stdin:
lda ptr1 ;
ldy ptr1+1 ;
BRK_TELEMON XFREAD ; calls telemon30 routine