honeylisp/game/disk.fnl
2021-01-02 16:32:43 -05:00

21 lines
497 B
Fennel

(local asm (require :asm.asm))
(local Prodos (require :asm.prodos))
(local {: basic} (require :asm.tape))
(local prg (basic (asm.new)))
(local org (prg:org 0x801))
(org:append [:basic
[10 :print "\"HELLO FROM A GENERATED DISK IMAGE!\""]
[20 :goto :10]])
(prg:assemble)
(local disk (Prodos "ProDOS_Blank.dsk"))
(disk:validate-entries)
(disk:add-file "STARTUP" Prodos.file-type.BAS 0x801 org.block.bytes)
(disk:update-volume-header {:name "NEUT.TOWER"})
; (pp disk)
(disk:write "Test.dsk")