Close

It's Alive!

A project log for ZAViouR Board - AVR/Z80 Hybrid

A Z80 experimenters board with a supervisory AVR and 64K of SRAM

Steve SmithSteve Smith 08/26/2015 at 12:370 Comments

Having fixed the bug that prevented the loading program from working, I have now successfully assembled a short Z80 program and run it in memory.

;Z80 Test Program

DESTINATION_SIZE equ 50

    .org 0000h
start:
        LD HL, Storea                ; point to the source
        LD DE, Storea + 1            ; point to the destination
        LD BC, DESTINATION_SIZE - 1    ; copying this many bytes
        LD (HL), 170                ; put a value in the 1st pos
        LDIR                        ; move 1 to 2, 2 to 3...
Finish:
        NOP
        NOP
        NOP
        NOP
        JP Finish                    ;Infinite Loop
Storea:
            DEFS 50
end 

A nice easy memory filler. I tested it by temporarily redirecting a reading routine in the AVR to check the bytes after the code (Storea). All seems well. More experimentation to come.

Discussions