Commands
Your first DLL on the C64
Build and run this example
mkdir -p build
./zig-out/bin/zp64c compile examples/small/96_memory_regions_dll.zp64 -o build/cache.prg
x64sc -reu -reusize 16384 -autostart build/cache.prg
Build and boot both versions
mkdir -p build/dll-tutorial
./zig-out/bin/zp64c compile examples/small/51_module_disk_load_real.zp64 -o build/dll-tutorial/named.prg
./zig-out/bin/zp64c compile docs/tutorial-examples/dll-disk-typed.zp64 -o build/dll-tutorial/typed.prg
c1541 -format 'named dll,51' d64 build/dll-tutorial/named.d64 \
-write build/dll-tutorial/named.prg boot \
-write build/dll-tutorial/named.prg.zpmod.disk.prg enemyrt
c1541 -format 'typed dll,64' d64 build/dll-tutorial/typed.d64 \
-write build/dll-tutorial/typed.prg boot \
-write build/dll-tutorial/typed.prg.zpmod.disk.prg enemyrt
x64sc -reu -reusize 16384 -autostart build/dll-tutorial/named.d64:boot
x64sc -reu -reusize 16384 -autostart build/dll-tutorial/typed.d64:boot
Build both DLLs and boot the shared-window disk
mkdir -p build/dll-tutorial
cd build/dll-tutorial
compiler=../../zig-out/bin/zp64c
"$compiler" compile ../../tests/fixtures/emu/modules/math_core_dispatch.zp64 -o math.prg
"$compiler" compile ../../tests/fixtures/emu/modules/fixed_math_runtime.zp64 -o fixed.prg
"$compiler" compile ../../examples/small/85_module_typed_multi_window_binding.zp64 -o swap.prg \
--dependency-module math_core=math.prg.zpmod.json \
--dependency-relocsim math_core=math.prg.zpmod.relocsim.json \
--dependency-module fixed_math=fixed.prg.zpmod.json \
--dependency-relocsim fixed_math=fixed.prg.zpmod.relocsim.json
c1541 -format 'typed swap,85' d64 swap.d64 \
-write swap.prg boot \
-write math.prg.zpmod.disk.prg mathcore \
-write fixed.prg.zpmod.disk.prg fixedmath
x64sc -reu -reusize 16384 -autostart swap.d64:boot