- Notifications
You must be signed in to change notification settings - Fork1
Intel 8080/Zilog Z80 assembler written in D.
License
ibara/a80
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
a80
is an assembler written inD for theIntel 8080 (and, by extension, the Zilog Z80) CPU.
a80
is developed onOpenBSD butshould work on any system that D targets.
a80
is not an exact clone of any pre-existing CP/M assember, nordoes it want to be. The differences will be explained in thisdocument.
a80
also is quite conscious about its design practice andimplementation. It is written to be the subject of a series ofblog posts inwhich we attempt to demystify the building of programming tools,and as such very intentionally does not use some very obvious datastructures. And it may make some seemingly peculiar design choices.My goal is to have written a real assembler for a real CPU that youcan still purchase today (in the form of the Z80) that truebeginners can come to understand.
After the blog series, if we want to turn this into a clone of anexisting CP/M assembler, I'm all for it.
Bug reports are welcome at any time.
a80 file.asm
The output will befile.com
.
A line of assembly takes the following form:
[label:] [op [arg1[, arg2]]] [; comment]
Example assembly programs can be found inhello.asm
,fib.asm
,andmul.asm
.
a80
only understands Intel 8080 opcodes.
The CP/MEQU
directive is supported however you cannot use otherlabels as a value nor can you use expressions.
Allop andarg must be lowercase, though labels may includecapital letters.
Numbers may be in decimal or hex.
Hex numbers must end with anh
. If a hex number begins witha-f
, it must be prefixed with0
. This is not too dissimilarcompared to other CP/M assemblers.
TheDB
pseudo-op is available. Strings can be written withinsingle quotes. The multi-comma syntax is not available.
There is none. That is to keep things simple.
Theequ
pseudo-op does allow for$
and very simple$+number
expressions only. No spaces in expressions. Valid expressionoperands are+
,-
,*
,/
, and%
.
ISC license. SeeLICENSE
for more information.
About
Intel 8080/Zilog Z80 assembler written in D.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.