Main

Contents
General Info
Video related
Hard Disk
Floppy Disk
Miscellaneous
RS-232 Ports

Model 3/4 I/O Ports

I/O Ports on the Models 3 and 4

The Models 3 and 4 used I/O ports extensively for their dealings with hardware. Even though the keyboard and display were memory mapped, as in the Model 1, almost all the other hardware of the machine was accessed through port I/O. The exception was that the Model 3 printer could be accessed at the same memory location as on the Model 1.

Top

Video and Graphics Board related

80H Input:  Reserved.
    Output: Graphics board register.

81H Input:  Graphics board RAM read. 
    Output: Graphics board RAM write.

82H Input:  Reserved.
    Output: Graphics board Y register.

83H Input:  Reserved.
    Output: Graphics board X register.

88H CRT controller control register.
89H CRT controller control register.
8AH CRT controller control register.
8BH CRT controller data register.

8CH - 8FH. Graphics board select 2.

Top

Hard Disk Controller

C0H Input:  Hard disk write protect.
    Output: Reserved.

C1H Hard disk control register.

C2H-C3H. Input:  HD device ID register. 
         Output: Reserved

C4H Hard disk CTC channel 0.

C5H Hard disk CTC channel 1.

C6H Hard disk CTC channel 2.

C7H Hard disk CTC channel 3.

C8H Hard disk data register.

C9H Hard disk error register.

CAH Hard disk sector count.

CBH Hard disk sector number.

CCH Hard disk cylinder low byte.
CDH Hard disk cylinder high byte.

CEH Hard disk sector size/drive select/head number.

CFH Input:  HD Status. 
    Output: HD Command.

Top

Floppy Disk Controller

NOTE : Ports F0H through F4H are for Model III/IV disk I/O (not Model I)


F0H Input:  Read FDC status
    Output: Issue FDC command

    Status values are:
    ------------------
        80H - Not ready
        40H - Write protect
        20H - Record type/Write fault/Head loaded
        10H - Seek error/Record not found
        08H - CRC error
        04H - Track 0/lost data
        02H - Index/DRQ
        01H - Busy

    FDC commands via port F0h
    -------------------------
        00H - restore
        80H - read sector
        A0H - write normal sector
        A1H - write read protect sector
        C0H - read address
        D0H - reset; puts FDC in mode 1
        E0H - read track
        F0H - write track

F1H FDC track register

F2H FDC sector register

F3H FDC data register

F4H Select drive and options

Top

Miscellaneous Control ports


84H Mod IV - various controls.
    Input is reserved. 
    Output:
        Bit 0: Video memory, Keyboard memory, and Model III ROM.
               (See table 1)
        Bit 1: Same as bit 0. (See Table 1)
        Bit 2: Video display mode. 0 = 64 by 16, 1 = 80 by 24.
        Bit 3: Reverse Video.
        Bit 4: Ram bank select. (See table 2)
        Bit 5: Ram bank select. (See table 2)
        Bit 6: Ram bank select. (See table 2)
        Bit 7: Video page select (64 x 16 mode) 0=page 0, 1=page 1.

    Table 1:

        Bits   Model III       Video and
        1 0    ROMs Enabled.   Keyboard status.
        - -    --------------  ----------------
        0 0    Yes             Model III.
        0 1    No              Model III.
        1 0    No              Model 4. (In)
        1 1    No              Model 4. (Out)


    Table 2:

        Bits   Lower 32k       Upper 32K
        6 5 4  RAM             RAM
        - - -  ---------       ---------
        0 0 0  Bank 0          Bank 1
        0 1 0  Bank 0          Bank 2
        0 1 1  Bank 0          Bank 3
        1 1 0  Bank 2          Bank 1
        1 1 1  Bank 3          Bank 1


85H - 87H. Same as 84H.

E0H Maskable interupt

E4H Input:  Read NMI status
    Output: Select NMI options

ECH Input:  Reset clock
    Output: Various controls/ 
        Bit 7 not used
        Bit 6 CPU clock speed    0 = 2 mhz, 1 = 4 mhz (Mod IV only)
        Bit 5 Video waits        0 = disable, 1 = enable
        Bit 4 I/O bus            0 = disable, 1 = enable
        Bit 3 Alt. char.         0 = disable, 1 = enable
        Bit 2 Double width       0 = normal, 1 = double
        Bit 1 Cass motor         0 = on, 1 = off
        Bit 0 not used

F8H Line printer address port.
    Input:  80H  Busy.
            40H  Out of paper
            20H  Unit select
            10H  Fault
    Output: Data sent to the printer with a strobe

FFH Cassette port

Top

RS-232 Ports

    
E8H Input:  Modem status.  
    Output: RS232 master reset/enable

E9H Baud rate register

EAH Input:  UART status register.  
    Output: UART/Modem control

EBH UART data register (r/w)

Top



Top

The TRS-80 Home Page created and maintained by Pete Cervasio
cervasio@airmail.net

Copyright © 1998 Pete Cervasio