Hey Guys,
I have a basic Z80 system built (http://z80.info/gfx/z80test.gif) NOTE: I do not have the UART or the MAX232 port. I have a series of 8 lights attached to Port A on a PIO and I have a bit of test code that is supposed to pulse the first LED on and off in a steady interval. When I start the system, the first LED glows but stays lit. According to the code I wrote, I think that the program is calling the delay1 subroutine but is not returning. I set the stack pointer to point to the top of memory which is in my RAM's address space and I have thoroughly examined the hardware configuration and everything is connected correctly.
I have a basic Z80 system built (http://z80.info/gfx/z80test.gif) NOTE: I do not have the UART or the MAX232 port. I have a series of 8 lights attached to Port A on a PIO and I have a bit of test code that is supposed to pulse the first LED on and off in a steady interval. When I start the system, the first LED glows but stays lit. According to the code I wrote, I think that the program is calling the delay1 subroutine but is not returning. I set the stack pointer to point to the top of memory which is in my RAM's address space and I have thoroughly examined the hardware configuration and everything is connected correctly.
Rich (BB code):
ld sp, 65535d
initiate: ld a, 10000000b
out (03d), a
start: ld a, 00000001b
out (0b), a
call delay1
ld a, 00000000b
out (0b), a
call delay1
jp start
delay1: ld b, 10d
delay2: ld c, 255d
delay3: ld d, 255d
delay4: dec d
jp nz, delay4
dec c
jp nz, delay3
dec b
jp nz, delay2
ret
Last edited: