These books present opposite approaches to designing a library of reusable Intel 8080 Assembly code:
- Macros: "Mastering CP/M" by Alan Miller, 1983 https://archive.org/details/Mastering_CPM
- Subroutines: "CP/M Assembly Language Programming" by Ken Barbier, 1983 http://www.bitsavers.org/pdf/digitalResearch/cpm/CPM_Assembly_Language_Programming_1983.pdf
im more of a subroutine guy, macros are too assembler-dependant.
but ill also preprocess assembly with m4 for include files and yes, occasional macros...
i have an 8080 cross assembler, asm80 that i maintain for unix and risc os
it is based on cpm's ASM.COM so no macros....
also the old motorola 68xx cross assemblers. their docs recommend m4 for macros/file inclusion which is where i got the idea
the internet assures me that i am insane to use m4.
no git but the tarball and/or zip has full source
(the source is basically identical. RO version may have slightly better docs -- in an obscure RO hypertext format 😛)
when i get a week where my world isn't on fire I'd like to experment with sdf's gittea server but thats not this week.
i don't quite understand the hatred directed at m4. its a good solid generic macro processor. it's syntax is old-school but it's not that bad... gpp is a newish thing and not everybody has a seperate C preprocessor (or wants to fight it to make it not emit poundLINE lines!!!)
hatred for macros on general, OK I do get. macros are powerful and dangerous. but why people pick on m4 specifically?
Although m4 has a steep learning curve, for basic stuff it's not that bad. And m4's killer feature is its ubiquity.
Do you have any links to Motorola 68K cross-assembler documentation or other resources with examples of m4 Assembly macros?
for whatever reason I don't have anything for cross assembling m68k. 😢
all the 68k assembly ive done was either on a Sun 3 or a AT&T UNIX PC.
@goosey No problem, thanks anyway.
I found a microcontroller assembler that comes with an m4 macro package: https://kevinpt.github.io/opbasm/rst/m4.html The m4 source has plenty of examples of using m4 for Assembly macros: https://github.com/kevinpt/opbasm/blob/master/opbasm/picoblaze.m4
This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!