prog8/testsource/source4.ill

62 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-01-11 23:55:47 +00:00
%output basic ; create a c-64 program with basic SYS to() launch it
2017-12-21 13:52:30 +00:00
2018-01-05 21:52:23 +00:00
%import "c64lib.ill"
2017-12-21 13:52:30 +00:00
~ main
{
2018-04-03 14:40:24 +00:00
var .str greeting = "hello world!\r12345678 is a big number.\r"
var .strp p_greeting = "hello world!\r12345678 is a big number.\r"
2017-12-21 13:52:30 +00:00
const .word BORDER = $d020
2018-01-03 20:43:19 +00:00
start:
c64scr.print_pimmediate() ; this prints the pstring immediately following it
%asm {
2018-04-03 14:40:24 +00:00
.strp "hello-pimmediate!{cr}"
2017-12-21 13:52:30 +00:00
}
c64scr.print_byte_decimal0 (19)
c64.CHROUT (13)
c64scr.print_byte_decimal (19)
c64.CHROUT (13)
2017-12-21 13:52:30 +00:00
c64scr.print_word_decimal0 ($0102)
c64.CHROUT (13)
c64scr.print_word_decimal ($0102)
c64.CHROUT (13)
2017-12-21 13:52:30 +00:00
return
2018-01-03 20:43:19 +00:00
start2:
2017-12-23 13:36:23 +00:00
global2.make_screen_black()
c64.CLEARSCR()
2017-12-31 02:19:06 +00:00
c64scr.print_string(greeting)
c64scr.print_pstring(p_greeting)
c64scr.print_byte_decimal(0)
c64scr.print_byte_hex(0, 0)
2017-12-23 13:36:23 +00:00
c64.CHROUT(13)
2017-12-31 02:19:06 +00:00
c64scr.print_byte_decimal(13)
c64scr.print_byte_hex(0, 13)
2017-12-23 13:36:23 +00:00
c64.CHROUT(13)
2017-12-31 02:19:06 +00:00
c64scr.print_byte_decimal(255)
c64scr.print_byte_hex(0, 254)
c64scr.print_byte_hex(0, 129)
2017-12-23 13:36:23 +00:00
c64.CHROUT(13)
2017-12-21 13:52:30 +00:00
2017-12-23 13:36:23 +00:00
c64.CHROUT(13)
2017-12-31 02:19:06 +00:00
c64scr.print_word_decimal($0100)
2017-12-23 13:36:23 +00:00
c64.CHROUT(13)
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
return
2018-01-05 21:52:23 +00:00
}