Micro Vibe

My Micro Hobby Projects

  • Increase font size
  • Default font size
  • Decrease font size
Home Z80Emu Documents Z80Emu Device IO Map

Z80Emu Device IO Map

Print

 

The Z80Emu program uses the Zilog Z80 CPU "in" and "out" opcodes to access devices such as the console, disk drive and printer. This article lists the CPU IO port address for the Z80Emu program's virtual devices.

The IO address space for the Z80 CPU is 8 bits giving a maximum of 256 device addresses. The IO ports can be accessed from any program running on the emulator whether CPM is running or not.

 
Z80Emu Input Ports
Port Description
10h

TTY device status register.

Bit 1 - can read byte from TTY device

Bit 2 - can write byte to the TTY device

11h TTY device read data register
12h

CRT device status register.

Bit 1 - can read byte from CRT device

Bit 2 - can write byte to the CRT device

13h CRT device read data register
14h

COM1 device status register.

Bit 1 - can read byte from COM1 device

Bit 2 - can write byte to the COM1 device

15h

COM1 device read data register

16h

COM2 device status register.

Bit 1 - can read byte from COM2 device

Bit 2 - can write byte to the COM2 device

17h

COM2 device read data register

18h

Printer device status register

Bit 2 - can write byte to the Printer device

1Ah

Input file device read status register.

Bit 1 - can read byte from Input file device

1Bh

Input file device read data register

1Ch

Output file device read status register.

Bit2 - can write byte to output file device

30h

COM1 read configuration register.

B0, B1, B2 -control baud rate 300..38400

B3, B4 -select the data format; 7N, 7E, 7O, 8N

B5 - selects one or two stop bits

B6 - selects hardware handshake

31h

COM2 read configuration register.

B0, B1, B2 -control baud rate 300..38400

B3, B4 -select the data format; 7N, 7E, 7O, 8N

B5 - selects one or two stop bits

B6 - selects hardware handshake

40h

Emulator command status register

Bit 1 - can read byte from emulator command device

Bit 2 - can write byte to the emulator command device

Bit7 - CPM warm start after the command completes

41h Emulator command read data register
48h Read the CPM cold boot iobyte value
70h..77h

Disk drive control device read registers

70h -read status
71h - read selected disk
72h - read sector low byte
73h - read sector high byte
74h - read track low byte
75h - read track hgh byte
76h - read DMA address low byte
77h - read DMA address high byte

 

Z80Emu Output Ports
Port Description
11h TTY device write data register
13h CRT device write data register
15h

COM1 device write data register

17h

COM2 device write data register

19h

Printer device write data register

1Dh

Outputt file device write data register

30h

COM1 write configuration register.

B0, B1, B2 -control baud rate 300..38400

B3, B4 -select the data format; 7N, 7E, 7O, 8N

B5 - selects one or two stop bits

B6 - selects hardware handshake

31h

COM2 write configuration register.

B0, B1, B2 -control baud rate 300..38400

B3, B4 -select the data format; 7N, 7E, 7O, 8N

B5 - selects one or two stop bits

B6 - selects hardware handshake

40h

Emulator command write command register.

there are two commands:

0 -- clear cmd buffer
1 -- execute the command

41h Emulator command write data register
48h Write the CPM cold boot iobyte value
70h..77h

Disk drive control device read registers

70h -write command
71h - write selected disk
72h - write sector low byte
73h - write sector high byte
74h - write track low byte
75h - write track hgh byte
76h - write DMA address low byte
77h - write DMA address high byte

Last Updated on Wednesday, 15 July 2015 14:13