prog8/python-prototype/testsource/source3.ill

77 lines
1.2 KiB
Plaintext
Raw Normal View History

2017-12-21 13:52:30 +00:00
2018-01-11 23:55:47 +00:00
%output basic ; create a c-64 program with basic SYS call to launch it
2017-12-21 13:52:30 +00:00
2018-01-03 20:43:19 +00:00
%import c64lib ; searched in several locations and with .ill file extension added
2017-12-21 13:52:30 +00:00
~ main
{
memory screen2 = $0401
memory screen3 = $0402
memory .word screenw = $0500
; ascii to petscii, 0 terminated
2018-04-03 14:40:24 +00:00
var .str hello = "hello everyone out there."
2017-12-21 13:52:30 +00:00
; ascii to petscii, with length as first byte
2018-04-03 14:40:24 +00:00
var .strp hellopascalstr = "Hello!\0x00\x01\x02d ag\0x01."
2017-12-21 13:52:30 +00:00
; ascii to screen codes, 0 terminated
2018-04-03 14:40:24 +00:00
var .strs hello_screen = "Hello!\n guys123."
2017-12-21 13:52:30 +00:00
; ascii to screen codes, length as first byte
2018-04-03 14:40:24 +00:00
var .strps hellopascal_screen = "Hello! \n."
2017-12-21 13:52:30 +00:00
2018-04-03 14:40:24 +00:00
var .str hello2 = "@@\f\b\n\r\t@@"
2017-12-21 13:52:30 +00:00
2018-01-03 20:43:19 +00:00
start:
2017-12-23 13:36:23 +00:00
global2.make_screen_black()
2017-12-21 13:52:30 +00:00
A='?'
[$d020] = '?'
[$d021] = '?'
[$d022] = '?'
[$d023] = 'q'
c64.BGCOL0 = 'a'
screen2 = 'a'
screen3 = 'a'
screenw = '2'
A='?'
X='?'
Y='?'
A='\002'
X=A
A='\xf2'
X=A
2017-12-23 13:36:23 +00:00
c64.CHROUT('A')
2017-12-21 13:52:30 +00:00
A='\f'
X=A
A='\b'
X=A
A='\n'
X=A
A='\r'
X=A
A='\t'
A='0'
2017-12-23 13:36:23 +00:00
c64.CHROUT('0')
c64.CHROUT('1')
c64.CHROUT('2')
2017-12-31 02:19:06 +00:00
c64scr.print_string(hello)
2018-01-05 21:52:23 +00:00
return c64.CHROUT('!')
2017-12-21 13:52:30 +00:00
return
}
~ global2 {
2018-01-03 20:43:19 +00:00
make_screen_black:
2018-02-20 00:16:16 +00:00
c64.EXTCOL = 0
c64.BGCOL0 = 0
2017-12-21 13:52:30 +00:00
c64.COLOR = 3
Y = true
return
2018-01-05 21:52:23 +00:00
}