Zenith Z-100 Series User manual

Programmer's
Reference Manual
I I '
data
systems

Programmer' s
Reference Manual
Z-100 PC Series Computers
fAPIFH data
systems

LIMITED RIGHTS LEGEND
Contractor is Zenith Data Systems Corporation of St. Joseph,Michigan49085. Theentire
document issubjecttoLimitedRightsdataprovisions.
TrademarksandCopyrights
Zenith is aregistered trademark ofZenithElectronicsCorporation.
Z-100andZ-DOSaretrademarks o(ZenithDataSystemsCorporation.
Copyright(C)1984byZenithDataSystemsCorporation,allrightsreserved.
Printed in the United States of America
ZenithDataSystemsCorporation
St.Joseph,Michigan49085

Contents
Figures
Tables
Abbreviations
Chapter I
Introduction
Specifications
Introduction and Specilications
................ 1.1
1.2
Chapter 2
Introduction
Monitor ROM
Power-Up Checks .
Error Messages.
User-Selected Tests .
Selecting a Test
Monitor ROM Routines
Command Summary
Special Keys .
System Memory and I/O Address Maps ..
Interrupt Vectors .
Support Packages .
System Operating Features
........ 2.1
22
22
2.3
. 2.5
. 2.5
. 2.7
... 2.7
2.16
2.17
2.19
.. 2.21
Chapter 3
Introduction
System Layout
Central Processing Unit
System Bus Board.
System Input/Output
3.1
.................... 3.2
.................... 3.3
..33
Chapter 4
Introduction
Configuration
DIP Switches.
Floppy Drives Present
8087 Coprocessor Installed
Memory Device Base Size
Monitor Line Length
Central Processing Unit
4.1
. 4.2
. 4.2
. 4.4
. 4.4
. 4.4
. 4.5

PageIv
Contents
Number of Floppy Drives .
Memory Size
Autoboot from Selected Drive
Monitor Sync Frequency .
Programming CPU Functions .
System Functions..............................
Interrupt 5H —Print Screen Contents
Interrupt IIH —Determine I/O Configuration .
Interrupt 12H—Determine Memory Size
Interrupt IAH —Set/Read Time-of-Day
Jump Vectors
Sound Programming.
... 4.5
4.6
4.6
4.7
4.8
... 4.8
4.8
4.8
4.10
4.10
4.10
4.11
CI
Chapter 5
Introduction
Interrupt 16H—Keyboard Input/Output
Keyboard Configuration .
Increasing Keyboard Buffer Size .
Keyboard
.... 5.1
5.2
5.4
5.18
Chapter 6
Introduction
General
Specifications
DIP Switches
Configuration Jumpers .
Theory of Operation
Memory Access Operations .
Address Multiplexing and Buffering
Data Buffer
Parity Generation and Error Detection
Parity Check/Generation Disabling
System Memory Map
Programming User Memory.
Memory Address Format .
Disabling the Parity Circuits .
System Memory
6.1
... 6.2
6.2
6.3
6.3
... 6.5
6.6
6.6
6.8
6.9
6.9
6.10
6.11
6.11
6.12
0
Chapter 7
Introduction
Configuration Jumpers
Light Pen Polarity
Character Font Selection .
Monitor Synchronization Selection
Major Components
Video Graphics Programming
7.1
...................... 7.2
74
74
7.6
7.7

Pagev
Contents
CRT Controller
Mode Select and Status Registers
Display Buffer
Monitor RAM
Character Generator .
Timing Generator .
Video Output
Modes of Operation
Text Mode
Text Mode Display Architecture
Graphics Mode
Medium Resolution (320 x 200) Graphics
High Resolution (640 x 200) Graphics
CRT Controller Signals .
System Bus Interface Signals......
Screen Memory and Character Generator Signals ..
CRT Monitor Control Signals
CRT Controller Registers
Programming the Registers
Programming Sequence
Horizontal Timing and Format Registers.
Vertical Timing and Format Registers .
Primary Operating Registers ......................
Raster Scan Signals .
Video Card Input/Output Devices
Color Select Register .
Mode Select Registers .
Status Register
Programming Interface Information
Video Interrupt Vector .
FunctionCode 0— Set Video Mode .
Function Code I —Select Cursor Type .
Function Code 2 —Select Cursor Position.
Function Code 3 —ReadCursor Position .
Function Code 4 —Read Light Pen Position .
Fundion Code 5 —Select Adive Display Page
Function Code 6—Scroll an Area of the Screen Up ....
Function Code 7 —Scroll an Area of the Screen Down .
Function Code 8 —Read Character and Attribute........
Function Code 9 —Write Character/Attribute to Screen ..
Function Code 10—Write Character Only to Screen.....
Function Code 11—SelectCurrent Graphics Palette .....
Function Code 12—Write Graphics Pixel .
Fundion Code 13—ReadGraphics Pixel.
Function Code 14—Dumb Terminal Display .
7.7
7.7
7.7
7.7
7.8
7.8
7.8
7.9
7.9
7.10
7.11
712
7.14
7.15
7.15
7.15
... 7.18
7.18
7.18
7.19
7.19
7.23
7.24
.. 7.25
7.26
7.27
7.28
7.29
7.32
7.33
7.33
7.35
7.35
7.35
7.36
7.36
7.36
.. 7.36
.. 7.37
7.37
.. 7.37
7.37
7.37
7.38
7.38
. 7.38
Programming Video Graphics

PageVl
Contents
7.39
7.39
7.40
7.42
7.42
7.42
7.43
Fundion Code 15—Return Current Video State
Function Code 100—SelectScroging Mode
Custom Character Creation
Early Video Cards
Character Font Selection
Light Pen Polarity
Monitor Synchronization
Chapter 8 Serial an
Introduction .
Configuration .
Serial Port Configuration.
Parallel Port Configuration .
Serial/Parallel Input/Output Tables .
Parallel Format
Serial Format
Interrupts .
Parallel Port
Serial Port
Function Code 0 —Initialize the Serial I/O Port..........
Function Code I —Send Character to the Serial Port ....
Function Code 2 —Receive Character from the Serial Port
Function Code 3 —ReadCommunications Status .........
d Parallel Input/Output
8.1
. 8.2
. 8.2
. 8.2
. 8.3
. 8.4
. 8.4
. 8.7
. 8.7
. 8.8
. 8.8
. 8.9
8.10
8.10 0
Disk Drives
9.1
92
92
9.3
9.3
9.5
9.6
97
9.7
9.7
9.8
9.9
9.9
9.10
.. 9.11
.. 9.11
9 12
9.13
Chapter 9
Introduction .
Configuration
Winchester (Hard Disk) Controller
Floppy Disk Drive Controller .
Mitsubishi Floppy Disk Drive .
Shugart Floppy Disk Drive
Input/Output Ports .............................
Interrupt Vector
Programming Interface Information
Drive Identification Codes .
Drive Function Calls
Function Code 0 —ResetDisk System
Function Code 1—ReadDisk Status
Function Code 5 —Format Track
Function Code 8 —Return Current Drive Parameters...
Function Code 9 —Initialize Drive Type Characteristics .
Error Status Codes
Booting an Operating System .

PageVll
Contents
Figures
3.1
4.1
4.2
4.3
5.1
5.2
5.3
5.4
5.5
5.6
6.1
6.2
7.1
7.2
7.3
7.4
7.5
7.6
7.7
8.1
9.1
9.2
9.3
System Block Diagram
CPU Card Component locations .
DIP Switch SWI Setlings
DIP Switch SW2 Settings
Alphabetic Keys .
Nonalphabetic Keys
Common Control Keys .....................
Special Fundion Keys
Control Keys .
Keypad Special Keys
Memory Card Select Jumper Locations .
Memory Access Block Diagram
Video Card Jumper Locations
Character ROM Contents ...................
Character/Attribute Format
Graphics Storage Map .
Medium Resolution Mapping
High Resolution Mapping
Character Design Matrix ....................
Serial and Parallel Device Layout
Winchester Controller Configuration
Mitsubishi Floppy Disk Drive Configuration .
Shugart Floppy Disk Drive Configuration .
... 3.2
... 4.2
... 4.3
... 4.5
... 5.4
... 5.6
... 5.9
.. 5.11
.. 5.16
.. 5.17
. 6.4
. 6.5
... 7.3
... 7.5
.. 7.10
7.12
7.12
.. 7.14
7.40
... 8.3
... 9.2
.. 9.4
.. 9.5

PageViii
Contents
Tables „0
2.1 Possible Power-Up Diagnostic Messages and Explanations .
2.2 Flag Register Messages .
2.3 Video Mode Selection .
2.4 Scroll Mode Selection .
2.5 Special Keys
2.6 System Memory Map .
2.7 I/O Port Addresses
2.8 Program Interrupt Vectors
2.9 8259 Programmable Controller Interrupts .
2.10 BIOS Entiy Point Interrupts
2.11 Special Interrupt Vectors ..........................
3.1 System Bus Signal Names .................
4.1 DIP Switch SWI Setlings .
4.2 DIP Switch SW2 Settings .
4.3 I/O Configuration Data .
5.1 Responses to Interrupt 16H
5.2 Alphabetic Key Scan Codes
5.3 Nonalphabetic Key Scan Codes
5.4 Common Control Key Scan Codes
5.5 Special Function Key Scan Codes
6.1 RAM Bank Select Logic
6.2 System Memory Map .
6.3 Parity Disable Output Port Values
7.1 Power-Up Character Font Selection.
7.2 Monochrome Character/Attribute Selection .
7.3 Color Attribute Byte Logic
7.4 Color Select Logic
7.5 Pallete Structure .
7.6 Video Card to System Interface Signals .
7.7 CRTController Register Functions .
7.8 Video Card Input/Output Port Assignments.
7.9 Video Input/Output Port Selection.
7.10 Color Select Register Logic
7.11 Palette ¹I Selection
7.12 Palette ¹2 Selection
7.13 Mode Select Port 3D8 Logic
7.14 Mode Select Port 3DA Logic
7.15 Character Font Selection
7.16 Status Port 3DA Logic
7.17 Video Input/Output Function Codes .
7.18 Video Mode Function Codes
2.12
2.14
2.15
2.16
... 2.17
2.18
2.19
2.19
220
2.20
3.4
4.4
4.6
4.9
.... 5.3
.... 5.5
5.7
5.10
5.12
6.8
6.10
6.12
7.4
7.10
7.11
7.13
7.13
7.16
7.20
. 7.27
. 7.27
. 7.28
7.28
7.29
. 7.29
. 7.30
. 7.31
7.32
7.34
. 7.35

PageiX
Contents
7.19
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9
8.10
8.11
8.12
8.13
8.14
9.1
9.2
9.3
9.4
9.5
9.6
9.7
9.8
9.9
7.42
. 8.2
. 8.4
. 8.4
. 8.5
. 8.5
. 8.6
. 8.7
. 8.8
. 8.8
. 8.9
. 8.9
. 8.9
... 8.10
. 8.11
.... 9.3
94
95
9.6
9.7
9.8
99
... 9.10
. 9.12
Character Font Selection—Early Video Cards ...........
Parallel Port Address Selection
Parallel Map Format .
Serial Map Format
Serial Byte ¹I Breakdown.
Serial Byte ¹2 Breakdown .
Serial Byte ¹7 Breakdown .
Parallel Device Operation Codes
Serial Device Operation Codes
Mode Select Byte Breakdown
Word Length Selection.
Parity Selection
Baud Rate Selection .
Line Control Status (Register AH)
Modem Control Status (Register AL)
Winchester Head/Cylinder Selection
Mitsubishi Floppy Disk Drive Configuration.
Shugart Floppy Disk Drive Configuration
Disk Drive Input/Output Ports
Drive Identification Codes .
Drive Functions
Drive Parameter Block .
Required Parameters for Function Codes 2 through 5 ..
Drive Error Codes .


Abbreviations
ms
NMI
AEN
ASCII
BIOS
CD
CPU
CRT
CRC
CTS
DIP
DMA
DOS
DSR
ECC
IC
I/O
LSB
MHz
MSB
AddressEnable
American StandardCodeforInformation Interchange
Basic Input Output System
Carrier Detect
Central ProcessingUnit
CathodeRayTube
Cydic RedundancyCheck
Clear toSend
Dual InlinePackage
Direct Memory Access
Disk OperatingSystem
DataSetReady
Error Correction Code
Integrated Circuit
Input/Output
Least-Significant Bit
Megahertz
Most-Significant Bit
millisecond
Non-Maskable Interrupt
nanosecond
ProgrammablePeripheral Interface
RandomAccessMemory
Red, Green,Blue
Read-Only Memory
Volts Direct Current
ns
PPI
RAM
RGB
ROM
VDC


Chapter 1
Introduction andSpecifications
Introduction
This manual is designedwith the programmer in mind. It contains useful informa-
tion about the Z-100~ PC series of IBM PC XT-compatible Zenith Data Systems
Computers.
Here you will find information about the hardware in these computers and how
to use the system Read-Only Memory (ROM) to gain the best performance in
your machine and assembly language programs. This manual is designed to sup-
plement the information in the Programmer's Utility Pack, a software package
that contains a screen editor and the assembly language utilities associated with
MS-DOS. Also, aspart of this manual set, the iAPX 88 Book from Intel is induded
to provide you with a complete, comprehensive, description of the Intel 8088
and its instruction set.
Since most of the information here is concerned with programming the Zenith
personal cornputers,you will notice that there is little information about the circuitry
of those machines. For more information on the technical aspects of the Z-100
PCSeries Computers, a comprehensive set of service manuals is available from
Zenith Data Systems. Theseservice manuals go beyond the simple servicing of
your computer, including complete circuit descriptions aswell asdatasheetreprints
of the more complex integrated circuits that are used in these Zenith personal
computers.
~Z-100 isatrademarkofZenithDataSystems.

Page1.2
Introduction andSpecifications
Specifications
Computer Dimensions
Z-150
Z-160 15.75 x 6.25 x 16.5inches(40.0 x 15.9 x 41.9cm)
19.88 x 8,5 x 19.5 inches(50.5 x 21.6 x 49.5 cm)
62-pin, 8-slot, .825-inch separation, IBM PC XT bus compatible
Keyboard 84 keys with extended function capabilities, 8048 keyboard pro-
cessor
Keyboard Dimensions
Z-150
Z-160
Power Supply
Memory
Processors
18.0 x 7.88 x 1.38 inches(45.7 x 20.0 x 3.5 cm)
18.38 x 7.5 x 1.38 inches(46.7 x 19.0 x 3.5 cm)
168watts
+ 5V@16.4A maximum
+ 12V @5.4Amaximum
—12V@.25Amaximum
+ 12V regulated @1.5Amaximum
100-130VACor200-230VACswitch-selectable input
Intel 8088 or Harris 80C88 8/16-bit microprocessor
Optional Intel 8087Numeric DataCoprocessor
4.77 MHzclock
128KRandomAccessMemory(RAM)minimum standard.
Expandable to320Kon first memory cardwith 64K devices.
User memory expandable to 640K by adding optional second
memorycard.
First memory card optionally expandable to 640K with 256K de-
viceswhenthesebecomereadilyavailable.
Standard IBM PCcolor graphics compatible with red, green, blue
(RGB)colororcompositemonochrome monitors.
0
Video

Page1.3
Introduction andSpecifications
Text 80 characters x 25 lines or 40 characters x 25 lines, soft-
ware selectable.
Graphics: point addressable 640 x 200 pixels or 320 x 200
pixels,softwareselectable.
Eight colors, two intensities for RGBoutput or 16-level gray scale
for monochrome output.
Z-160—internal monitor is 9" amber monochrome display or op-
tional greendisplay.
Audio One 8-ohm, 2-inch speaker
MassStorage One or two 5.25-inch double-sided, double-density, 40-track
floppy disk drives.
MS-DOSVersion 2maximum capacityof360Kperdisk
MS-DOSVersion1.25maximum capacity of320Kperdisk
Optional10M capacityWinchester disk drive with up to four sepa-
rate partitions.
Input/Output One parallel Centronics-compatible printer port
One or twoRS-232serialasynchronousInput/Output (I/O) port(s).
ShippingWeight
Z-150
Z-160 Computer, keyboard, two floppy disk drives: 41pounds(19.1kg)
Computer, keyboard, two floppy disk drives: 55 pounds (25.0 kg)


Chapter 2
SystemOperatingFeatures
Introduction
This chapter contains information concerning the built-in features ofyour computer
with emphasis on those which will be of primary use in programming the various
featuresandfunctions.
Among theitemscoveredarethefollowing:
Monitor ROM
SystemMemoryandI/OAddressMaps
Interrupt Vectors
Support Packages

page2.2
SystemOperatingFeatures
Monitor ROM 0
Your computer contains verypowerful programming,servicing,and testingroutines
that are programmed permanently into the machine's ROM. These routines may
be used to manipulate and program many of the features and functions of your
computer, such asaccessingthe user and video RAM and implementing the varied
video textandgraphicscapabilities.
Also incorporated in theROMcode,are provisions for loading (booting) anoperat-
ing system, such asMS-DOS,fromany disk drive in your system. The Dual In-line
Package (DIP) switches on the Central ProcessingUnit (CPU) card may be set
to implement an autoboot at powerup or a keyboard initiated manual boot. Refer
to theConfigurationsection in Chapter 4 for DIPswitchsetupinstructions.
NOTE:Alsoavailable is the Disk-BasedDiagnostics for the Z-100 PCSeries,Model
CB-5063-13, a highly comprehensive system checkout and servicing utility. Details
on the use ofthisutility are provided with the Disk-BasedDiagnosticspackage.
The Monitor ROM features indude four types of routines: 0
Power-up checks
User-selectedtests
Interactive programminganddebuggingroutines
Programmable I/O facilities
Power-Up Checks
The following hardware checks are automatically made when the computer is
tumed on:
CPU
ROM
User RAM
Interrupt control and timer circuits
Parity RAM
Keyboard microprocessor
Disk drive read
Disk drive seekfunction
Disk controller
Disk DirectMemoryAccess(DMA) overrun
Disk Cydic RedundancyCheck(CRC)
Disk addressmark
Disk sector

Page2.3
SystemOperatingFeatures
Error Messages
Table 2.1 describes possible screen error messages that may occur at powerup
and what you can check to correct the problem. If your action does not resolve
the problem, you will need to have your computer serviced by a qualified indi-
vidual.
Table 2.1. Possible Power-U ostic M sand lan ations
+++ ERROR: CPUfailure!
+++ ERROR: ROMchecksumfailure!
These two messages indicate that the CPU card may be malfundioning. The
checksum message is a result of a mismatch between a predetermined value
and a value derived from the contents of system ROM. Turn the machine off,
then on again. If the same messagereoccurs, you will need to have yoursystem
serviced by aqualiTiedindividual.
+%+ ERROR:RAM failure! Address: XXXX:YYYY, Bit: N, Chip: UXXX t+t
+++ ERROR:Parity hardware failure!Address: XXXX:YYYY, Bit: N, Chip: UXXX ++I
+++ ERROR:Parity failure! Address: XXXX:YYYY, Chip: UXXX +t+
These messages indicate that the CPU is unable to read or write to the RAM
or video RAM memory. If the chip number displayed is a400number, the failure
is on the RAM card. If the chip number is a 300 number, the failure is on the
video card. Before replacing a card, check that the card is properly seated in
the backplane slot and that theCPU DIPswitchesarecorrectlyset for the amount
of memory installed in thecomputer.
+4t ERROR:Timer interrupt failure! t+t
This message indicates that the timing logic on the CPU card may have failed.
Make sure that the card is properly seated and set up for the options installed.
Also checkthatall optional cardsaresetupcorrectly.
Other manuals for Z-100 Series
3
Table of contents
Other Zenith Desktop manuals

Zenith
Zenith Z-100 Series User manual

Zenith
Zenith Z-100 Series User manual

Zenith
Zenith Z-171 Service manual

Zenith
Zenith SM-Z-89 User manual

Zenith
Zenith Z-100 Series User manual

Zenith
Zenith H-100 User manual

Zenith
Zenith Z-150 User manual

Zenith
Zenith Z-171 User manual

Zenith
Zenith Z-200 series User manual