My tool-chain for programming an EEPROM with a Z80 assembly language program.

  Рет қаралды 3,372

John Squires

4 жыл бұрын

This is how I go from an assembly language program for the Z80, assemble it to a Hex file and burn it into an EEPROM. I use Visual Studio Code (VSCode) to write the programs, Pasmo to assemble it to an Intel Hex file, and my own Arduino-Mega based EEPROM programmer. I use XCODE to transfer the Hex file to the programmer.
The full playlist for all videos in this series is: kzfaq.info/sun/PL3arA6T9kycptsudBx3MyLbHCOjdoBhO6

Пікірлер: 14
@albertpauw8234
@albertpauw8234 4 жыл бұрын
I noticed a few things in your z80 assembler code. You can replace LD A,0 wit XOR A, and CP A,0 with AND A. It saves a few bytes and gives the same results. Those were the things one did in the eighties. Looking forward to your progress.
@CircuitBreaker256
@CircuitBreaker256 4 жыл бұрын
Yes, you are absolutely right! I only optimise like that when I'm looking for speed or to save memory, but with 64k to play with, I didn't bother!!!
@geowar20
@geowar20 3 жыл бұрын
Which is why we have so much bloatware today…
@edgeeffect
@edgeeffect 3 жыл бұрын
Woah XOR A... that takes me back.... took me so long to work out what the hell that was doing back in the day.
@SpeccyMan
@SpeccyMan 3 жыл бұрын
CP A,0 isn't even a valid Z80 mnemonic, it should be CP 0
@ChrisSavageEngineer
@ChrisSavageEngineer Жыл бұрын
Which specific plug-ins are you using? There seem to be quite a few for the Z80.
@henryschroer3813
@henryschroer3813 Жыл бұрын
can you share or link the Visual Studio Code json file and theme?
@AndrewGilmour-qld
@AndrewGilmour-qld 3 жыл бұрын
do you have a wiring diagram for the programmer and link to the software you used
@CircuitBreaker256
@CircuitBreaker256 3 жыл бұрын
I am in the process of making a video on this. It's a very simple programmer, and it is based on an Arduino Mega, so if you have one of those you just need a socket and a couple of LEDs. The software I wrote myself, so I'll put it on GitHub.
@AndrewGilmour-qld
@AndrewGilmour-qld 3 жыл бұрын
@@CircuitBreaker256 thanks
@robe8274
@robe8274 3 жыл бұрын
any chance you could advise how to integrate pasmo into vscode? I've downloaded all the bits, added the extentions and watched a few youtube vids, but some were v e r y s l o w [showing linking/ seting key shortcuts]
@CircuitBreaker256
@CircuitBreaker256 3 жыл бұрын
That's a good idea for a video. I will make a note to do that. But basically I set up a tasks.json entry like this: { "label": "CCP", "type": "process", "command": "pasmo", "args": ["--bin", "ccp.asm", "ccp.bin", "ccp.symbols"], "problemMatcher": [], "group": { "kind": "build", "isDefault": true }, "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": true, "clear": true } } And then all I need to do is press Shift+Ctrl+B
@edgeeffect
@edgeeffect 3 жыл бұрын
This is one of the times when Z80 beats 6502.... Z80 likes it's ROM to start at 0000 but 6502 has it in high memory so it can do all it's clever page 0 and page 1 addressing. If you were doing a ROM for a 6502 your hex file would have addresses offset to the ROMs base address in the machine and you'd have to keep subtracting that offset during programming. But with the Z80 0000 in the final memory map IS 0000 in the EEPROM and.... Bob's your uncle.
@SpeccyMan
@SpeccyMan 3 жыл бұрын
... its ROM ... ... its clever page 0 ... it's - contraction of "it is" its - possessive pronoun