Guide - Setting up the Mac for X16 assembler development

Jestin

New Member
Jan 25, 2020
10
7
3
Rather than configuring an editor to deal with acme, I've been using a Makefile like many of the demos are using (mine is more or less shamelessly copied). My editor (sorry, I'm a vim user) has already been configured to run make, make run, and make clean from key mappings, so I'm already just two keystrokes away from running. By using makefiles, it de-couples building/running from your editor, making it much easier to share projects with people who use something else for development. It also means you don't need to find or write anything acme-specific for VSCode. You just need to find a way to run make.

Example makefile:
Code:
ASSEMBLER6502    = acme
AS_FLAGS        = -f cbm -DMACHINE_C64=0 -Wtype-mismatch --cpu w65c02
RM                = rm

PROGS            = myprogram.prg

all: $(PROGS)

myprogram.prg:
    $(ASSEMBLER6502) $(AS_FLAGS) --outfile myprogram.prg myprogram.asm

run: clean myprogram.prg
    ./x16emu -prg myprogram.prg -run -scale 2

clean:
    -$(RM) -f *.o *.tmp $(PROGS) *~ core
 
  • Like
Reactions: JustinBaldock