honeylisp/neutgs/init.fnl

35 lines
716 B
Fennel

(local Ssc (require :ssc))
(import-macros {:sss ! : compile} :ssc.macros)
(local ssc (Ssc {:boot-org 0xc00}))
(compile ssc
(require :ssc.iigs.toolbox)
(asm pascalhex (db 5) hexbuf (bytes " "))
(fn printnum (num)
(long! (ref hexbuf) (HexIt num))
(WriteString (far-ref pascalhex)))
(fn add (lhs rhs) (+ lhs rhs))
(fn main ()
(TLStartUp)
(let (userid (MMStartUp))
(IMStartUp)
(TextStartUp)
(let (x 1)
(printnum x)
(set! x (+ x 1))
(printnum x)
(set! (long-at (ref hexbuf)) 0x6b636548)
(WriteString (far-ref pascalhex)))
(TextShutDown)
(IMShutDown)
(MMShutDown userid)
(TLShutDown)))
)
(ssc:assemble)