22 lines
445 B
Plaintext
22 lines
445 B
Plaintext
|
(local Ssc (require :ssc))
|
||
|
(import-macros {:sss ! : compile} :ssc.macros)
|
||
|
|
||
|
(local ssc (Ssc))
|
||
|
(set ssc.prg.start-symbol :boot)
|
||
|
(compile ssc
|
||
|
(org 0xc00)
|
||
|
(asm
|
||
|
boot
|
||
|
(clc) (xce) (rep 0x30) ; disable emulation mode, 16-bit index registers
|
||
|
(jsr main)
|
||
|
(sec) (xce) ;re-enter emulation mode
|
||
|
(rts))
|
||
|
(fn printnum (num) ; TODO
|
||
|
)
|
||
|
(fn add (lhs rhs) (+ lhs rhs))
|
||
|
(fn main ()
|
||
|
(printnum (add 1 2)))
|
||
|
)
|
||
|
|
||
|
(ssc:assemble)
|