Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Zilog Z80
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== New syntax ==== Because Intel claimed a copyright on their assembly mnemonics,<ref>{{Cite book |title=Intel Component Data Catalog 1978 |date=1978 |publisher=Intel Corporation |location=Santa Clara, CA |pages=11β17 |chapter=8080A/ 8-Bit N-Channel Microprocessor |quote=All mnemonics copyright Intel Corporation 1977}}</ref> a new assembly syntax had to be developed for the Z80. This time a more systematic approach was used: * All registers and register pairs are explicitly denoted by their full names * Parentheses are consistently used to indicate "memory contents at" (constant address or variable pointer dereferencing) with the exception the jump instructions <code>JP (HL)</code>, <code>JP (IX)</code>, and <code>JP (IY)</code>. These load the new PC address from the respective register directly, without indirecting through memory.{{efn|Jump (<code>JP</code>) instructions, which load the program counter with a new instruction address, do not themselves access memory. Absolute and relative forms of the jump reflect this by omitting the round brackets from their operands. Register based jump instructions such as "<code>JP (HL)</code>" include round brackets in an apparent deviation from this convention.<ref>{{Cite web |title=Z80 Relocating Macro Assembler User's Guide |url=http://z80cpu.eu/mirrors/oldcomputers.dyndns.org/manuals/z80asm.pdf |url-status=dead |archive-url=https://web.archive.org/web/20110720173724/http://z80cpu.eu/mirrors/oldcomputers.dyndns.org/manuals/z80asm.pdf |archive-date=July 20, 2011 |access-date=June 4, 2009 |page=Bβ2}}</ref>}} * All load and store instructions use the same mnemonic name, LD, for LOAD (a return to the simplistic Datapoint 2200 vocabulary); other common instructions, such as ADD and INC, use the same mnemonic regardless of addressing mode or operand size. This is possible because the operands themselves carry enough information. These principles made it straightforward to find names and forms for all new Z80 instructions, as well as [[Orthogonality (programming)|orthogonalizations]] of old ones, such as <code>LD BC,1234</code>. Apart from naming differences, and despite a certain discrepancy in basic register structure, the Z80 and [[Intel 8086|8086]] syntax are virtually [[isomorphic]] for a large portion of instructions. Only quite superficial similarities (such as the word MOV, or the letter X, for extended register) exist between the 8080 and 8086 assembly languages, although 8080 programs can be translated to 8086 assembly language by [[Assembly language translator|translator programs]].<ref name="Scanlon 1988" /><ref name="Nelson 1989" />
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)