mirror of
https://github.com/irmen/prog8.git
synced 2024-09-10 09:54:32 +00:00
60 lines
1.2 KiB
Plaintext
60 lines
1.2 KiB
Plaintext
output prg,basic ; create a c-64 program with basic SYS to() launch it
|
|
|
|
import "c64lib.ill"
|
|
|
|
~ 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
|
|
|
|
start
|
|
c64util.print_pimmediate ! () ; this prints the pstring immediately following it
|
|
asm {
|
|
.ptext "hello-pimmediate!{cr}"
|
|
}
|
|
|
|
c64util.print_byte_decimal0 ! (19)
|
|
c64.CHROUT ! (13)
|
|
c64util.print_byte_decimal ! (19)
|
|
c64.CHROUT ! (13)
|
|
|
|
|
|
c64util.print_word_decimal0 ! ($0102)
|
|
c64.CHROUT ! (13)
|
|
c64util.print_word_decimal ! ($0102)
|
|
c64.CHROUT ! (13)
|
|
return
|
|
|
|
start2
|
|
global2.make_screen_black()
|
|
c64.CLEARSCR()
|
|
c64util.print_string(greeting)
|
|
c64util.print_pstring(p_greeting)
|
|
c64util.print_byte_decimal(0)
|
|
c64util.print_byte_hex(0)
|
|
c64.CHROUT(13)
|
|
c64util.print_byte_decimal(13)
|
|
c64util.print_byte_hex(13)
|
|
c64.CHROUT(13)
|
|
c64util.print_byte_decimal(255)
|
|
c64util.print_byte_hex(254)
|
|
c64util.print_byte_hex(129)
|
|
c64.CHROUT(13)
|
|
|
|
c64.CHROUT(13)
|
|
c64util.print_word_decimal($0100)
|
|
c64.CHROUT(13)
|
|
return
|
|
|
|
|
|
}
|
|
|
|
~ global2 {
|
|
|
|
make_screen_black
|
|
c64.EXTCOL = c64.BGCOL0 = 0
|
|
c64.COLOR = 3
|
|
return
|
|
|
|
} |