2018-11-25 00:17:39 +00:00
|
|
|
%import c64lib
|
|
|
|
%import c64utils
|
|
|
|
|
|
|
|
~ main {
|
|
|
|
|
2018-12-18 14:12:56 +00:00
|
|
|
sub start() {
|
2018-11-25 00:17:39 +00:00
|
|
|
|
2018-12-18 14:12:56 +00:00
|
|
|
; set screen colors and activate lowercase charset
|
|
|
|
c64.EXTCOL = 5
|
|
|
|
c64.BGCOL0 = 0
|
|
|
|
c64.COLOR = 1
|
|
|
|
c64.VMCSB |= 2
|
2018-11-25 00:17:39 +00:00
|
|
|
|
2019-01-15 20:35:15 +00:00
|
|
|
; use optimized routine to write text
|
|
|
|
c64scr.print("Hello!\n")
|
2018-12-18 14:12:56 +00:00
|
|
|
|
|
|
|
; use iteration to write text
|
2019-01-15 20:35:15 +00:00
|
|
|
str question = "How are you?\n"
|
2019-01-16 21:02:35 +00:00
|
|
|
for ubyte char in question
|
2018-12-18 14:12:56 +00:00
|
|
|
c64.CHROUT(char)
|
|
|
|
|
2019-01-15 20:35:15 +00:00
|
|
|
; use indexed loop to write characters
|
2018-12-18 14:12:56 +00:00
|
|
|
str bye = "Goodbye!\n"
|
2019-01-16 21:02:35 +00:00
|
|
|
for ubyte c in 0 to len(bye)
|
2018-12-18 14:12:56 +00:00
|
|
|
c64.CHROUT(bye[c])
|
2018-11-25 00:17:39 +00:00
|
|
|
|
2018-12-09 18:48:59 +00:00
|
|
|
}
|
2018-11-25 00:17:39 +00:00
|
|
|
|
|
|
|
}
|