1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-21 09:17:52 +00:00

Reset the stdin console when a program starts.

This commit is contained in:
Greg King
2013-12-24 15:26:05 -05:00
parent 0dc8a278c7
commit 6f72758587
+17 -2
View File
@@ -7,6 +7,7 @@
;
.export _read
.constructor initstdin
.import popax
.importzp ptr1, ptr2, ptr3
@@ -63,8 +64,22 @@ L9: lda ptr3
.endproc
.data
;--------------------------------------------------------------------------
; initstdin: Reset the stdin console.
.segment "INIT"
initstdin:
ldx #<-1
stx text_count
rts
;--------------------------------------------------------------------------
.bss
text_count:
.byte <-1
.res 1