2021-08-02 23:40:31 +00:00
|
|
|
(local Ssc (require :ssc))
|
|
|
|
(import-macros {:sss ! : compile} :ssc.macros)
|
|
|
|
|
2021-08-09 01:58:49 +00:00
|
|
|
(local ssc (Ssc {:boot-org 0xc00}))
|
2021-08-02 23:40:31 +00:00
|
|
|
(compile ssc
|
2021-08-06 01:30:08 +00:00
|
|
|
(require :ssc.iigs.toolbox)
|
|
|
|
|
2021-08-09 01:58:49 +00:00
|
|
|
(asm pascalhex (db 5) hexbuf (bytes " "))
|
2021-08-10 04:33:54 +00:00
|
|
|
|
2021-08-06 01:30:08 +00:00
|
|
|
(fn printnum (num)
|
2021-08-09 18:43:24 +00:00
|
|
|
(long! (ref hexbuf) (HexIt num))
|
|
|
|
(WriteString (far-ref pascalhex)))
|
2021-08-06 01:30:08 +00:00
|
|
|
|
2021-08-02 23:40:31 +00:00
|
|
|
(fn add (lhs rhs) (+ lhs rhs))
|
2021-08-10 17:23:09 +00:00
|
|
|
|
2021-08-15 00:52:43 +00:00
|
|
|
(const screen 0xe12000)
|
|
|
|
(const screen-size 0x9d00)
|
|
|
|
|
|
|
|
(global word screen-offset 0)
|
|
|
|
(getter screen-cursor (+ screen screen-offset))
|
|
|
|
(setter screen-cursor (pixels)
|
|
|
|
(word! screen-cursor pixels)
|
|
|
|
(set! screen-offset (+ screen-offset 2)))
|
|
|
|
|
2021-08-10 17:23:09 +00:00
|
|
|
(global word UserID)
|
2021-08-02 23:40:31 +00:00
|
|
|
(fn main ()
|
2021-08-06 01:30:08 +00:00
|
|
|
(TLStartUp)
|
2021-08-10 17:23:09 +00:00
|
|
|
(set! UserID (MMStartUp))
|
|
|
|
(IMStartUp)
|
|
|
|
(TextStartUp)
|
2021-08-13 02:06:31 +00:00
|
|
|
(MTStartUp)
|
2021-08-10 17:23:09 +00:00
|
|
|
|
2021-08-13 02:06:31 +00:00
|
|
|
(GrafOn)
|
2021-08-15 00:52:43 +00:00
|
|
|
(set! screen-offset 0)
|
|
|
|
(while (< screen-offset screen-size)
|
|
|
|
(set! screen-cursor (+ 0x2345 screen-offset)))
|
2021-08-13 02:06:31 +00:00
|
|
|
|
|
|
|
(GrafOff)
|
|
|
|
|
|
|
|
(MTShutDown)
|
2021-08-10 17:23:09 +00:00
|
|
|
(TextShutDown)
|
|
|
|
(IMShutDown)
|
|
|
|
(MMShutDown UserID)
|
|
|
|
(TLShutDown)))
|
|
|
|
|
2021-08-02 23:40:31 +00:00
|
|
|
|
|
|
|
(ssc:assemble)
|