mirror of
https://github.com/irmen/prog8.git
synced 2024-11-20 03:32:05 +00:00
30 lines
592 B
Lua
30 lines
592 B
Lua
%import c64lib
|
|
%import c64utils
|
|
|
|
~ main {
|
|
|
|
sub start() {
|
|
|
|
; set screen colors and activate lowercase charset
|
|
c64.EXTCOL = 5
|
|
c64.BGCOL0 = 0
|
|
c64.COLOR = 1
|
|
c64.VMCSB |= 2
|
|
|
|
; use optimized routine to write text
|
|
c64scr.print("Hello!\n")
|
|
|
|
; use iteration to write text
|
|
str question = "How are you?\n"
|
|
for ubyte char in question
|
|
c64.CHROUT(char)
|
|
|
|
; use indexed loop to write characters
|
|
str bye = "Goodbye!\n"
|
|
for ubyte c in 0 to len(bye)
|
|
c64.CHROUT(bye[c])
|
|
|
|
}
|
|
|
|
}
|