4 ms·
I remember sort of learning (just superficially) Z80 and 6502 assembly at the time (mid to late 80s) and thinking Z80 assembler was much simpler.
by thanatropism 8y ago
I remember sort of learning (just superficially) Z80 and 6502 assembly at the time (mid to late 80s) and thinking Z80 assembler was much simpler.
- deleted 8y ago[deleted]
- setquk 8y agoIt is until you start treating the 6502 as a RISC CPU with 256 registers at 0x0000. I had that “ohhhhh” moment when I had a BBC master back in the late 80s. Zero page FTW. Z80 feels like wading in treacle after that. X86 is an abomination
- znpy 8y agoI can testimony for Z80 assembly (tough I cannot say anything about 6502). In high school one of our teachers made us program a Z80 board by hand. And when I say "by hand" I mean it quite literally: first a flow-chart, then a conversion to z80 assembly (two passes: pencil first, pen later), then datasheet at hand a conversion into z80 opcodes (this time it was three passes, the third one was to recalculate all jumps, absolute and relative ones). Last step was to input each opcode into memory by hand using an hexadecimal keypad. Then go to address 1800h, hold breath and press RUN. In retrospect, it was a very enlightening experience considering I and my school mates were like 16-17. But keep in mind, if a 17 years old can do this with relative ease (it was a technical high school, after all) that should tell you something about the simplicity and effectiveness of the Z80 instruction set. Z80 <3
- jacquesm 8y agoI bootstrapped a 6809 assembler by hand. That took a while :)
- userbinator 8y agoThe 6502 is a much simpler CPU (3.5k transistors vs. 8.5k for the Z80), but the Z80 is easier to use and less limiting --- more registers and addressing modes, a stack not limited to 256 bytes and fixed location, and a more regular octal-format instruction encoding[1]. [1] http://www.z80.info/decoding.htm http://www.z80.info/decoding.htm
- hyperpallium 8y agoSome of this was due to syntax of their assembly languages. 6502 had letters for different addressing modes, whereas Z80 used parentheses for a memory lookup, e.g. LD A,(HL) uses HL as a pointer, loading its pointed-to value into A (IIRC). 6502 had more addressing modes, but some of them, if not all, could have used Z80 style syntax. After all, it would just be a different the assember (i.e. compiler) frontend, generating the same target machine code.