prog8/testsource/source4.ill

61 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
{
var .text greeting = "hello world!\r12345678 is a big number.\r"
var .ptext p_greeting = "hello world!\r12345678 is a big number.\r"
const .word BORDER = $d020
2018-01-03 20:43:19 +00:00
start:
c64scr.print_pimmediate() ; this prints the pstring immediately following it
%asm {
2017-12-21 13:52:30 +00:00
.ptext "hello-pimmediate!{cr}"
}
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-01-07 01:36:27 +00:00
c64.EXTCOL = c64.BGCOL0 = 0
2017-12-21 13:52:30 +00:00
c64.COLOR = 3
return
2018-01-05 21:52:23 +00:00
}