2018-01-12 00:55:47 +01:00
|
|
|
%output basic
|
2017-12-25 21:43:06 +01:00
|
|
|
|
2018-01-03 21:43:19 +01:00
|
|
|
%import c64lib
|
2017-12-25 21:43:06 +01:00
|
|
|
|
|
|
|
~ main {
|
2018-01-03 21:43:19 +01:00
|
|
|
var .text name = "????????????????????????????????????????????????????????????????????????????????" ; 80
|
2018-01-01 23:24:39 +01:00
|
|
|
var .word orig_irq
|
2017-12-25 21:43:06 +01:00
|
|
|
|
2018-01-03 21:43:19 +01:00
|
|
|
start:
|
2017-12-31 03:19:06 +01:00
|
|
|
c64.init_system()
|
2017-12-27 19:01:14 +01:00
|
|
|
|
2018-01-01 23:24:39 +01:00
|
|
|
orig_irq = c64.CINV
|
2017-12-25 21:43:06 +01:00
|
|
|
SI = 1
|
2018-01-05 22:52:23 +01:00
|
|
|
c64.CINV = &irq_handler
|
2017-12-25 21:43:06 +01:00
|
|
|
SI = 0
|
|
|
|
|
2017-12-27 23:45:22 +01:00
|
|
|
|
2017-12-31 03:19:06 +01:00
|
|
|
c64scr.print_string("enter your name: ")
|
|
|
|
c64scr.input_chars(name)
|
2017-12-25 21:43:06 +01:00
|
|
|
c64.CHROUT('\n')
|
2017-12-27 23:45:22 +01:00
|
|
|
|
2018-01-03 21:43:19 +01:00
|
|
|
blop:
|
2018-01-05 22:52:23 +01:00
|
|
|
return
|
|
|
|
%breakpoint
|
|
|
|
return
|
|
|
|
|
|
|
|
; yeah!
|
2017-12-27 23:45:22 +01:00
|
|
|
|
2017-12-31 03:19:06 +01:00
|
|
|
c64scr.print_string("thank you, mr or mrs: ")
|
|
|
|
c64scr.print_string(name)
|
2017-12-25 21:43:06 +01:00
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
2017-12-25 22:22:19 +01:00
|
|
|
SI = 1
|
2018-01-01 23:24:39 +01:00
|
|
|
c64.CINV = orig_irq
|
2017-12-25 22:22:19 +01:00
|
|
|
SI = 0
|
|
|
|
|
2017-12-25 21:43:06 +01:00
|
|
|
return
|
|
|
|
|
2017-12-27 19:01:14 +01:00
|
|
|
|
2018-01-03 21:43:19 +01:00
|
|
|
irq_handler:
|
2018-01-01 23:24:39 +01:00
|
|
|
%asm {
|
|
|
|
lda c64.SFDX
|
|
|
|
cmp #$40 ; nothing pressed?
|
2017-12-25 21:43:06 +01:00
|
|
|
beq +
|
2018-01-01 23:24:39 +01:00
|
|
|
inc c64.EXTCOL ; otherwise change color
|
2017-12-25 21:43:06 +01:00
|
|
|
+ jmp c64.IRQDFRT
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-01-01 23:24:39 +01:00
|
|
|
|
2018-01-05 22:52:23 +01:00
|
|
|
}
|