2021-08-02 23:40:31 +00:00
|
|
|
(local Ssc (require :ssc))
|
|
|
|
(import-macros {:sss ! : compile} :ssc.macros)
|
|
|
|
|
|
|
|
(local ssc (Ssc))
|
|
|
|
(set ssc.prg.start-symbol :boot)
|
|
|
|
(compile ssc
|
2021-08-06 01:30:08 +00:00
|
|
|
(require :ssc.iigs.toolbox)
|
|
|
|
|
2021-08-02 23:40:31 +00:00
|
|
|
(org 0xc00)
|
|
|
|
(asm
|
|
|
|
boot
|
|
|
|
(clc) (xce) (rep 0x30) ; disable emulation mode, 16-bit index registers
|
|
|
|
(jsr main)
|
|
|
|
(sec) (xce) ;re-enter emulation mode
|
2021-08-06 01:30:08 +00:00
|
|
|
(rts)
|
|
|
|
pascalhex (db 5) hexbuf (bytes " "))
|
|
|
|
|
|
|
|
(fn printnum (num)
|
|
|
|
(HexIt num (& hexbuf))
|
|
|
|
(WriteString 0 (& pascalhex)))
|
|
|
|
|
2021-08-02 23:40:31 +00:00
|
|
|
(fn add (lhs rhs) (+ lhs rhs))
|
|
|
|
(fn main ()
|
2021-08-06 01:30:08 +00:00
|
|
|
(TLStartUp)
|
|
|
|
(let (userid (MMStartUp))
|
|
|
|
(IMStartUp)
|
|
|
|
(TextStartUp)
|
|
|
|
|
|
|
|
(printnum (add 1 2))
|
|
|
|
|
|
|
|
(TextShutDown)
|
|
|
|
(IMShutDown)
|
|
|
|
(MMShutDown userid)
|
|
|
|
(TLShutDown)))
|
2021-08-02 23:40:31 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
(ssc:assemble)
|