honeylisp/game/disk.fnl

20 lines
490 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"})
(disk:write "NeutTower.dsk")