40 lines
734 B
Fennel
40 lines
734 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))
|
|
|
|
(global word UserID)
|
|
(fn main ()
|
|
(TLStartUp)
|
|
(set! UserID (MMStartUp))
|
|
(IMStartUp)
|
|
(TextStartUp)
|
|
(MTStartUp)
|
|
|
|
(GrafOn)
|
|
(let (screen 0xe12000 i 0)
|
|
(while (< i 0x9d00)
|
|
(word! (+ screen i) (Random))
|
|
(set! i (+ i 2))))
|
|
|
|
(GrafOff)
|
|
|
|
(MTShutDown)
|
|
(TextShutDown)
|
|
(IMShutDown)
|
|
(MMShutDown UserID)
|
|
(TLShutDown)))
|
|
|
|
|
|
(ssc:assemble)
|