Originally posted by AdrianBc
View Post
The same instructions aren't as is in 8080 as in 8086.
BUT it's possible to keep some conventions, e.g.: If you map certain 8bit register pairs to certain 16bit register halves, it's possible to obtain roughly the same funtionnality.
Porting code from 8080/Z80/8085 to 8086/8088 boils done to one giant glorified sed script that substitutes a lot of things around (register name, missing instuction to instruction series, some addressing modes) and the result should be valid source code that could be assembled for the 16bit descendant.
At that point you aren't that far from tool-assisted port of other completely different un-related ISA (m68k, ppc, etc.)
The only key difference being that the available set of instructions on 8086 is on purpose designed to have comparable features, so it is not extremely difficult to port.
You can't straigh run 8080 code as-is, but it's close enough that there close enough equivalents to make the porting easier (as opposed to, say a m68k or 6502).
Leave a comment: