Skip to content

Instantly share code, notes, and snippets.

@mach-kernel
Created January 15, 2018 17:08
Show Gist options
  • Save mach-kernel/fe7de95d774363b15f8f30c9f96ce44c to your computer and use it in GitHub Desktop.
Save mach-kernel/fe7de95d774363b15f8f30c9f96ce44c to your computer and use it in GitHub Desktop.
TYP $B3
DSK main.l
SPEAKER EQU $E0C030
HELLO EQU $8000
ORG HELLO
beep LDA SPEAKER
LDY #1000
LDX #1000
loop DEX
BNE loop
DEY
BNE beep
RTL
END
@mach-kernel
Copy link
Author

mach-kernel commented Jan 15, 2018

My assembly script:

#!/usr/bin/env bash
ls src/*.S | xargs ./bin/cadius INDENTFILE
ls src/*.S | xargs ./bin/merlin -V ./src/macro

sed -ie 's/Type(00)/Type(B3)/' src/_FileInformation.txt

./bin/cadius DELETEFILE blankdisk.po NEW.DISK/main
./bin/cadius ADDFILE blankdisk.po NEW.DISK src/main
gsplus

@ksherlock
Copy link

ok... $B3 is GS/OS Application which is an OMF file. Merlin(32) can create OMF file but needs the REL command, exits via a QuitGS call (instead of RTL) and the A/X/Y registers are 16-bit at entry, and there's no ORG (since it's RELocatable). Your code should work if you create it as a binary file with a auxtype of $8000 (the load address), use RTS instead of RTL and BRUN it from BASIC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment