8085 IO ports

Glen Slick glen.slick at gmail.com
Sun Jan 15 11:37:03 CST 2017


On Sat, Jan 14, 2017 at 12:01 PM, Adrian Graham
<witchy at binarydinosaurs.co.uk> wrote:
> Hi folks,
>
> STC Executel fun continues and I'm at the point where I'm fairly sure code
> is running but it's stuck in a tight loop waiting for something to happen.
>
> The 8085A reference tells me a non-memory I/O is signalled by IO/M going
> high while it puts the port number on the address bus (0xE3 to 0xE8 in this
> case), 8 bits on the data bus and sets S0/S1 to be WRITE. If that's the case
> then this machine in its current state doesn't do any non-memory I/O - IO/M
> is the only signal that stays low. It's not a failed CPU since I have 3
> different ones and they all do this.
>

In the EPROM binary dump you posted I see code that is doing IN and
OUT accesses to the following port locations:

        IN      $70
        IN      $71

        IN      $D0

        IN      $E3
        IN      $E7

        OUT     $71

        OUT     $B0
        OUT     $BA
        OUT     $BD

        OUT     $D1

        OUT     $E2
        OUT     $E3
        OUT     $E6
        OUT     $E7
        OUT     $E8

In addition there is a routine with builds an IN instruction routine
from a variable location on the fly in RAM and appears to call that in
a loop from ports $B2 through $BA

L0F26:  LXI     H,$F280
        MVI     M,$C9       ; RET instruction opcode
        DCX     H
        MOV     M,C
        DCX     H
        MVI     M,$DB       ; IN instruction opcode
        PCHL


L10BD:  LXI     H,$F2AB
        MOV     A,M
        ANI     $3F
        MOV     M,A
L10C4:  MVI     C,$B2
        CALL    L0F26
        LXI     D,$F281
L10CC:  CALL    L0F26
        ANI     $0F
        CPI     $0F
        JNZ     L10EC
        LXI     H,$F2AB
        MOV     A,M
        ANI     $80
        JNZ     L10E6
        MOV     A,M
        ORI     $80
        MOV     M,A
        JMP     L10C4

L10E6:  MOV     A,M
        ORI     $60
        MOV     M,A
        MVI     A,$0F
L10EC:  STAX    D
        INX     D
        MOV     A,C
        INR     C
        CPI     $BC
        JNZ     L10CC
        RET


More information about the cctech mailing list