Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/a80Public

Intel 8080/Zilog Z80 assembler written in D.

License

NotificationsYou must be signed in to change notification settings

ibara/a80

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Usage

a80 file.asm

The output will befile.com.

Syntax

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

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.

Strings

TheDB pseudo-op is available. Strings can be written withinsingle quotes. The multi-comma syntax is not available.

Expression parser

There is none. That is to keep things simple.

Theequ pseudo-op does allow for$ and very simple$+numberexpressions only. No spaces in expressions. Valid expressionoperands are+,-,*,/, and%.

License

ISC license. SeeLICENSE for more information.


[8]ページ先頭

©2009-2025 Movatter.jp