prog8/testsource/input.ill

38 lines
648 B
Plaintext
Raw Normal View History

2017-12-25 20:43:06 +00:00
output prg,sys
import "c64lib"
~ main {
var .text name = "?"*80
start
2017-12-25 21:22:19 +00:00
XY = c64.CINV
2017-12-25 20:43:06 +00:00
SI = 1
2017-12-25 21:22:19 +00:00
c64.CINV = #irq_handler
2017-12-25 20:43:06 +00:00
SI = 0
c64util.print_string("enter your name: ")
c64util.input_chars(name)
c64.CHROUT('\n')
2017-12-25 21:22:19 +00:00
c64util.print_string("thank you, mr or mrs: ")
2017-12-25 20:43:06 +00:00
c64util.print_string(name)
c64.CHROUT('\n')
2017-12-25 21:22:19 +00:00
SI = 1
c64.CINV = XY
SI = 0
2017-12-25 20:43:06 +00:00
return
irq_handler
asm {
lda $cb
cmp #$40
beq +
inc c64.EXTCOL
+ jmp c64.IRQDFRT
}
}