Zenith Z-100 Series Reference Manual

Other manuals for Z-100 Series: User Manual, User Manual

Summary of Z-100 Series

  • Page 1

    Programm er' s reference manual i i ' data systems.

  • Page 2

    Programm er' s reference manual z-100 pc series computers fapifh d a t a systems.

  • Page 3

    Limited rights legend contractor is zenith data systems corporation of st. Joseph, michigan 49085. The entire document is subject to limited rights data provisions. Trademarks and copyrights zenith is a registered trademark of zenith electronics corporation. Z-100 and z-dos are trademarks o( zenith ...

  • Page 4: Contents

    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 ke...

  • Page 5

    Page iv contents number of floppy drives . Memory size autoboot from selected drive monitor sync frequency . Programming cpu functions . S ystem functions.... . . . . . . . . . . . . . . . . . . . . . . . . . . Interrupt 5h — print screen contents interrupt iih — determine i/o configuration . Interr...

  • Page 6

    Page v 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 2 00) graphics high resolution (640 x 2 00) graphics crt...

  • Page 7

    Page vl 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 — select scroging mode custom character creation early video cards character font selection light pen polarity monitor synchronization chapter 8 serial an introduction . Configuration ....

  • Page 8

    Page vll 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 c ommon control keys ... . . . . . . . . . . ...

  • Page 9: Tables

    Page viii contents tables „0 2.1 possible power-up diagnostic messages and explanations . 2.2 f lag register messages . 2.3 v i deo mode selection . 2.4 s croll mode selection . 2.5 s pecial keys 2.6 system memory map . 2.7 i / o port addresses 2.8 p r ogram interrupt vectors 2.9 8 259 programmable ...

  • Page 10

    Page ix 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 c haracter font selection — early video ca...

  • Page 12: Abbreviations

    Abbreviations ms nmi aen ascii bios cd cpu crt crc cts dip dma dos dsr ecc ic i/o lsb mhz msb address enable american standard code for information interchange basic input output system carrier detect central processing unit cathode ray tube cydic redundancy check clear to send dual i nline package ...

  • Page 14: Introduction

    Chapter 1 introduction and specifications introduction this manual is designed with 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 ...

  • Page 15

    Page 1.2 introduction and specifications 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 ke y s with extended function capabilit...

  • Page 16

    Page 1.3 introduction and specifications text 80 characters x 25 lines or 40 characters x 25 lines, soft- ware selectable. G raphics: point addressable 640 x 200 pixels or 320 x 2 0 0 pixels, software selectable. Eight colors, two intensities for rgb output or 16-level gray scale for monochrome outp...

  • Page 18: System Operating Features

    Chapter 2 system operating features introduction this chapter contains information concerning the built-in features of your computer with emphasis on those which will be of primary use in programming the various features and functions. Among the items covered are the following: monitor rom system me...

  • Page 19: Monitor Rom

    Page 2.2 system operating features monitor rom 0 your computer contains very powerful programming, servicing, and testing routines 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 as...

  • Page 20

    Page 2.3 system operating features 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...

  • Page 21

    Page 2.4 system operating features table 2.1 (continued). Possible power-up diagnostic messages and explanations + + + error: invalid/no keyboard code received! A message of this type indicates that the keyboard did not send the proper code at powerup to indicate proper functioning. The most likely ...

  • Page 22: User-Selected Tests

    Page 2.5 system operating features user-selected tests in addition to the automatic checks, you may select test sequences from a menu to check the following devices and parameters: disk drives keyboard memory power-up status these tests will produce a display that shows you the test name, number of ...

  • Page 23

    Page 2.6 system operating features after a test is selected a second screen appears, with the test name at the top of the screen and the message type to abort in the bottom left comer of the screen. The test count is displayed in the center of the screen. To end the test, press the esc key. The coun...

  • Page 24: Monitor Rom Routines

    Page 2.7 system operating features monitor rom routines another feature of your computer is the collection of monitor rom routines. While these routines are primarily designed for use in writing, testing, and debugging machine language programs, some of the commands and features can provide an effic...

  • Page 25

    Page 2.8 system operating features command: help syntax: ? Purpose: displays a list of commands and syntax diagrams. 0 command: boot from disk syrttax: b[drive type] [drive number] [ipnrti tion] purpose: reads the operating system boot code from disk and executes it. If an error is detected an error...

  • Page 26

    Page 2.9 system operating features example: d3313; 0, 13e return in this example, the screen will display the contents starling at memory address 33120h and ending at address 3325eh. O command: examine memory syntax: eaddress address value. -~ innmber value.-~ innmber... Purpose: examines and/or cha...

  • Page 27

    Page 2.10 system operating features command: execute (go) syntax: g[ =addressl [b reakpoint]. . . Purpose: initiates program execution with up to eight breakpoints. When a break- point is encountered, the routine saves the processor status for the r and g commands and displays the microprocessor reg...

  • Page 28

    Page 2.11 system operating features command: move memory block syntax: mrauge, address purpose: moves the block of memory specitied by range to the destination, address. The move is implemented in a fashion which prevents overlapping moves from writing over other data. Example: m3219: fedc, ffff, 39...

  • Page 29

    Page 2.12 system operating features the fl (flags) register contents are not displayed in hexadecimal, but as a two-letter abbreviation representing the specific flag's condition as defined in table 2.2. Table 2.2. Flag register messages fiag on ov ( o verflow) dn (down) ei (enabled) ng ( n egative)...

  • Page 30

    Page 2.13 system operating features command: trace program syntax: t[=address] [, value] purpose: traces a user program. Single steps through the program beginning at address, displaying the microprocessor register contents a' each instruction is executed. The value determines how many times to exec...

  • Page 31

    Page 2.14 system operating features command: set video/scroll syntax: v [mvideo otode] [sscroll mode] [100[ [150[ purpose: this command is used to set the current video mode or scroll mode. Use 100 or 150 to determine which hardware mode to use (100 signifies z-100 bit-mapped graphics with z-319 bit...

  • Page 32

    Page 2.15 system operating features table 2.4 indicates the scroll modes obtainable with the vs command. The scroll mode determines the manner in which information on the screen is handled once the screen is full. Table 2.4. Scroll mode selection code scro l l mode software compatible scroll mode. I...

  • Page 33: Special Keys

    Page 2.16 system operating features special keys table 2.5 defines the keyboard keys and associated functions recognized by the rom diagnostics. These keys permit certain editing operations and control the format of the screen display. Table 2.5. Special keys funcrlon press to correct typographical ...

  • Page 34: Maps

    Page 2.17 system operating features system memory and i/o address maps this section shows the memory layout scheme of your computer and the locations of the i/o ports. Table 2.6 is a general memory breakdown of the system. Table 2.6. System memory map hexdeci mal address type of memory 1st ram card ...

  • Page 35

    Page 2.18 system operating features table 2.7 indicates the i/o port addresses and the respective device assignments. For further breakdowns of the individual device i/o ports, refer to the chapter that covers the specific device. Table 2.7. I/o port addresses hexadecimal address range device 000-oo...

  • Page 36

    Page 2.19 system operating features interrupt vectors the interrupt vectors recognized by the microprocessor in your computer allow the different devices on the i/o bus to halt cpu operation when an operation related to the device requires service. Table 2.8 lists the interrupt vectors which may occ...

  • Page 37

    Page 2.20 system operating features table 2.10 lists the basic input/output system (bios) entry point interrupts. Table 2.10. Bios entry point interrupts vector func t ion 10 11 12 13 14 15 16 17 18 19 ia video i/o determine i/o configuration determine memory size disk i/o serial i/o (rs-232 i/o) no...

  • Page 38: Support Packages

    Page 2.21 system operating features support packages you may also be interested in the optional plug-in cards, and the various program- ming languages, applications, and utility packages, available for your computer from zenith data systems. These options include detailed implementation of many of t...

  • Page 40: System Input/output

    Chapter 3 system input/output introduction this chapter describes the manner in which information is passed between the different elements that make up the computer system. The information contained in this chapter is intended as a general overview of the system only. It provides preparatory materia...

  • Page 41

    Page 3.2 system input/output system layout figure 3.1 shows the overall block diagram of the system. W inchest e r f loppy d i s k drive(s) drive f loppy d i s k c ontroll e r power si/pply w inches t e r drive controller k eybo a r d cpu s y s t e m i/o b u s system memory optional cards video / gr...

  • Page 42: Central Processing Unit

    Page 3.3 system input/output as you can see, the main artery for system communication is the i/o bus, which acts as the main trunk for information transfer. What is not readily apparent from the block diagram, is that the cpu acts as the main traffic control element for information flow. Central pro...

  • Page 43

    Page 3.4 system input/output connection to the bus by the cards in the system is also made through the edge connectors on the backplane board. Each of the standard cards, and any custom add-on cards, interface with the cpu through one of these connectors. This chapter will be limited to defining the...

  • Page 44

    Page 3.5 system input/output table 3.1(continued). System bus signal names pin definition signal b5 b6 a25 a26 a27 a28 a29 a30 a31 bl b2 b3 b4 b7 b8 b9 bio bll b12 b13 b14 b15 b17 b16 b18 ior* iow* a7 a6 a5 a4 a3 a2 al ao gnd reset +5 vdc irq2 memr+ dack3+ drq3 dacki* — 5 vdc drq2 — 12 vdc n.C. +12 ...

  • Page 45

    Page 3.6 system input/output table 3.1 (continued). System bus signal names p in sig n a l b27 t/c b28 ale b20 clk b21 irq 7 b 22 irq 6 b 23 irq 5 b 24 irq 4 b 25 irq 3 b 19 dac k o b 26 dac k 2 b 29 + 5 vd c b30 osc definition dma acknowledge 0. Assigned to timer ¹1. Initiates memory refresh cyde. ...

  • Page 46

    Chapter 4 central processing unit introduction the cpu in your computer contains an 8088 microprocessor, dma and interrupt processing circuitry, system clock, and timing and control generation circuitry. From a programming standpoint, the cpu functions are largely accessed through the built-in rom r...

  • Page 47: Configuration

    Pay. 4.2 central processing unit configuration configuration of the hardware features and options in your system is selected by dip switches sw1 and sw2 and by jumper block p203. P203 is a rom size select jumper block, which is set at the factory, and should not require changing. Dip switches refer ...

  • Page 48

    Page 4.3 central processing unit figure 4.2 shows sw1 set for a typical system configuration. Refer to table 4.1 for the proper switch settings for your system. Top of card f loppy d r i v e s a t t a c h e d ? 8 087 c o p r o c e s s o r i n s t a l l e d ? 0 1 a l eft r i g h t b ase size of m e m...

  • Page 49: Floppy Drives Present

    Page 4.4 central processing unit table 4.1. Dip switch swl settings section and selting function confi g u ration one or more none 0 right floppy disk drives 8087 coprocessor monitor line length memory device 64k base size installed not installed 80 characters 40 characters 1 left right 2 3 left lef...

  • Page 50: Memory Device Base Size

    Page 4.5 central processing unit memory device base size sections 2 and 3 of sw1 indicate the base memory device size. 64k is the only presently acceptable option. Sections 2 and 3 are both positioned to the left; any other combinations are reserved. Monitor line length sections 4 and 5 of sw1 defin...

  • Page 51: Memory Size

    Page 4.6 central processing unit table 4.2. Dip switch sw2 settings function configuration p o sition and setting 0 128k 192k m emory 2 5 6 k size 320k 384k 448k 512k 576k 640k 0 i 2 3 4 r ight r i g h t r ight r i g h t r ight r i g h t l eft rig h t l eft rig h t l eft rig h t l eft rig h t r ight...

  • Page 52: Monitor Sync Frequency

    Page 4.7 central processing unit monitor sync frequency section 7 of sw2 tells the cpu at what vertical sync frequency the monitor should run. Select the position that corresponds to your ac power line frequency. Nor- mally, this will be 60 hz in north america..

  • Page 53: Programming Cpu Functions

    Page 4.8 central processing unit programming cpu functions the portion of this manual on programming the cpu operations will, of necessity, be brief. The operations are largely "housekeeping" types of routines. Also included are functions which cannot be otherwise put into the other sections. Indude...

  • Page 54

    Page 4.9 central processing unit table 4.3. Vo configuration data bit ¹ 0 meaning disk drives installed in system. 8087 coprocessor installed. Amount of base ram (device size) installed on the user memory card(s). 16k 32k 48k 64k 0 0 0 i i 0 i 1 4 & 5 initial video mode 0 0 0 i c) 6 & 7 unused 40 x ...

  • Page 55: Jump Vectors

    Page 4.10 central processing unit interrupt 12h — determine memory size when this function is called, a value representing the number of contiguous ik blocks of user memory is returned in register ax. For example, a value of 256 would indicate that the system contains 256 kilobytes of ram. Interrupt...

  • Page 56

    Page 4.11 central processing unit sound waveform to the speaker sound programming sound may be programmed in one of three different ways: • puls e train generated by toggling a program control register bit • the o u t put of channel 2 of the timer/counter programmed to deliver a • cloc k input to th...

  • Page 58: Keyboard

    Chapter 5 keyboard introduction the keyboard entry point permits an application program to determine the status of the keyboard or to receive characters entered through the keyboard..

  • Page 59: Input/output

    Page 5.2 keyboard interrupt 16h — keyboard input/output three operation codes are used with this interrupt to determine the function to be performed. 0 — get a character from the keyboard 1 — determine if a key code is waiting in the keyboard's buffer 2 — return the keyboard's shift status to use th...

  • Page 60

    Page 5.3 keyboard table 5.1. Responses to interrupt 16h operation code condition character not entered character entered response ascii code will be in register al. Scan code will be in register ah. C haracter i s r e m oved f r o m the keyboard buffer. P rocessing will halt until a k e y i s presse...

  • Page 61: Keyboard Configuration

    Page 5.4 keyboard keyboard configuration this section repeats much of the information found in the user's guide and operaffons manual. It describes the various groups of the keyboard, how they are typically used in software applications, and the codes produced by each key undervarious conditions. Fi...

  • Page 62

    Page 5.5 keyboard not shifted (shift) shifted the scan codes generated from the alphabetic keys are listed in table 5.2. The least-significant byte of the scan code is the value returned as the ascii code. Table 5.2. Alphabetic key scan codes (ctrl) control caps lock on (alt) alternate n 0 p f 0 r s...

  • Page 63

    Page 5.6 keyboard the nonalphabetic keys, identified in figure 5.2, include the numbers 0 through 9, the common punctuation marks, and the special programming characters that make up the remainder of the printing ascii character set. Since each of these keys has one character, the upper character is...

  • Page 64

    Page 5.7 keyboard not shifted table 5.3. Nonalphabetic key scan codes key top (shift) shifted (ctrl) control (alt) alternate 0231h 0221h 7800h 0332h 0340h 0300h 7900h 0433h 0423h 7aooh 0534h 0524h 7booh 0635h 0625h 7cooh 0736h 075eh 071eh 7dooh 0837h 0826h 7eooh 0938h 092ah 7fooh oa39h oa28h 8000h o...

  • Page 65

    Page 5.8 keyboard table 5.3 (continued). Nonalphabetic key scan codes not shifted (shift) (ctr l ) (alt) shifted con t ro l alt e rnate key top 2822h 2827h 333ch 332ch 343eh 342eh 353fh 352fh 2b7ch 2blch 2b5ch.

  • Page 66

    Page 5.9 keyboard the common control keys are shown in figure 5.3; the scan codes and the usual software function are listed in table 5.4. : : : ' : : : • ' : =' e3 f 2 fj f j. • w e r t y u i 0 p ) ) 8 9 6 a 8 d f g h j k l " 8, „ 5 6 + 26 f6 fj f8 o ) --- oo ff fj j figure 5.3. Common control keys.

  • Page 67

    Page 5.10 keyboard c 2 cjj cj cd cd 0 0 0 cjj cjj 0 cjj 0 e 0 r cjj cd cn z 0 cn cd cjj cn 0 0 c 0 qj cn c 0 0 o 0 cn cn 9 o d' o cjj cn cn =„2 d cn cjj cjoy ) o w l a > oi x c j j «f) fv o cjj 0 cn cjj j=' i l cjj 0 c/ j 0 q ~o x «d x a x cd «d «x3 «d «d cd c 0 v a 0 0 x cd 0 x z n «d x e «d a cd v.

  • Page 68

    Page 5.11 keyboard the special function keys are identified in figure 5.4. The scan codes and usual function (if any) are listed in table 5.5. Note that the keypad special functions are shown in this figure and table, along with the codes for the numeric function, although they are not specifically ...

  • Page 69: Keyboard

    Page 5.12 keyboard oj m g 4 r co 0 iv a z 0 0 i o w i 0 o c a co c qo c f ) cp a 0 c o c a c 0 c 0 0 0 0 0 0 0 0 0 0 c o 0 a o 0 o o a 4 . M cr. M ( x . W h . M m m .A a .A a . A a a a a g d 3 . O g ~ + c z k i/> 0 a> a 0 6 a) ~ e $ i -" 5 0 x x oxx o o o o s s o o o o oo m c oo m o tq ~ 8 ~ co cd c...

  • Page 70

    Page 5.13 keyboard.

  • Page 71

    Page 5.14 keyboard 0 a o o o 4> z 0 p 4 4,9p o o ~ 5 x x c) x co c) c> c 0 x cd c) j a x c) x co c) c> c 0 x cd c) j a.

  • Page 72

    Page 5.15 keyboard.

  • Page 73

    Page 5.16 keyboard the control keys are identified in figure 5.5. The alt and ctrl keys do not generate a code but modify the codes of the other keys. The esc key generates ascii code ibh (scan code oiibh). A the esc function is often used by software to stop the execution of a program or, when used...

  • Page 74

    Page 5.17 keyboard the minus key (-) produces the scan code 4a2dh and the plus key (+ ) produces 4e2bh. The enter key produces the same scan codes as the return key' (1codh in the shifted and unshifted modes and 1coah when used with the cirl key) and is usually used in the same way. 4 fl ff 0 w e r ...

  • Page 75

    Page 5.18 keyboard increasing keyboard buffer size you may increase the keyboard buffer size if you find fifteen characters are insuffi- dent for your applications. To set a buffer size to some value other than these fifteen characters, first determine the size of the buffer that you wish to establi...

  • Page 76: Keyboard

    Page 5.19 keyboard the following assembly language example sets put aside the top sk of unused z-100 pc monitor ram as a 4k character keyboard buffer. Monitoilsegment segment at (ofoooh) keymuffdegment equ ocsh key%off%tart e q u ocah keybuffend equ occh fr8&3em equ 2000h end~m equ 3fffh monitor seg...

  • Page 77

    Page 5.20 keyboard to compile the above code using the macro assembler, enter the following com- mands: masm bi gkbuff; link bigkbuff; exe2bin bigkbuff. Exe . Com the masm file is only on the programmer's utility pack distribution disk. The link and exe2bin files are both on the second distribution ...

  • Page 78: System Memory

    Chapter 6 system memory introduction this chapter contains information and descriptive material related to programming operations as they apply to the system memory (ram) banks. Refer to the information in chapter 2 under rom diagnostics which applies to memory access and manipulation, specifically ...

  • Page 79: General

    Page 6.2 system memory general 0- the memory cards contain the main user-accessible dynamic ram and associated timing and multiplexing circuitry. These cards interface with the system through one of the parallel i/o connectors located on the backplane board. Connection with the cards is implemented ...

  • Page 80: Dip Switches

    Page 6.3 system memory the ram ics feature on-chip refresh which is initiated when a given address is read. The card also provides the necessary circuitry to control wholesale refresh at required intervals, to arbitrate read, write, or refresh requests, and to properly time the various memory access...

  • Page 81

    Page 6.4 system memoly m i gg i m mm memory card figure 6.1. Memory canl select jumper locations.

  • Page 82: Theory Of Operation

    Page 6.5 system memory theory of operation o in order to darify exactly how memory is accessed and manipulated, the following description of memory circuit operation is provided. Refer to the memory card block diagram in figure 6.2 for the general functional description of the memory circuits which ...

  • Page 83: Memory Access Operations

    Page 6.6 system memory memory access operations a memory access cyde may be initiated by one of three requests: memory read, memory write, or refresh. The address enable signal (aen) must also be active for any of these requests to initiate access. Contention between these requests, timing, and row ...

  • Page 84

    Page 6.7 system memofy the ninth memory address bit, ma8, connects to pin 1 on each of the ram sockets. Since pin i has no internal connection on 6665 or 4164 ics, ma8 is only used when 256 kilobit chips are installed. The heart of the memory card is the memory itself. The supporting circuitry serve...

  • Page 85: Data Buffer

    Page 6.8 system memory 0 0 0 0 0 i 0 i 0 0 i i i 0 0 table 6.1 graphically illustrates the bank select logic. Table 6.1. Ram bank select logic b ank fir s t a 1 9 a 1 8 a17 a16 r a stim m emory range first block (card 1) 0 i 0 i i 0 2 i 0 3 i 0 4 i 0 second block (card 2) 0 0 0 i 0 0 2 0 0 3 0 i 4 0...

  • Page 86

    Page 6.9 system memory parity generation and error detection when a write operation is being processed, the parity generator looks at the 8-bit data word and determines if an odd number of logical ones (is) are present or not. If not, the parity generator places a logical i in the corresponding memo...

  • Page 87: System Memory Map

    Page 6.10 system memory system memory map 0 table 6.2 shows the location of user memory in the system memory scheme. Table 6.2. System memory map hexadecimal type of memory address 00000-4ffff 50000-9ffff a0000-affff b0000-b3fff b4000-b7fff b8000-bbfff bc000-bffff c0000-effff f0000-f3fff 1st ram car...

  • Page 88: Programming User Memory

    Page 6.11 system memory programming user memory in general, programming user memory is very simple and straightforward. Most of the access operations can be performed directly from the built-in rom routines or from assembly level programs written using the programmer's utility pack typical memory ac...

  • Page 89

    Page 6.12 system memory for example, the value 3f3f:5b11 would represent memory address 44f01 hexadecimal (282369 dedmal), since 3f3f shifted left equals 3f3fo (259056 deci- mal) plus 5b11 (23313 decimal) equals 44f01h. Since the least-significant digit of the segment is always 0, it should be appar...

  • Page 90: Video Graphics Programming

    Chapter 7 video graphics programming introduction this chapter provides hardware and software programming information for the video card in your z-100 pc series computer. Among the features covered are: character font and monitor synchronization selection text mode programming medium and high resolu...

  • Page 91

    Page 7.2 video graphics programming the following are features, functions, and capabilities of the video card: addressing, reading, and writing to the 16k video ram with no timing restric- tions or display interference foreground, background, and border color selection text mode or pixel addressable...

  • Page 92: Video Graphics Programming

    Page 7.3 video graphics programming • a • • video card video card figure 7.1. Video card jumper incations.

  • Page 93: Light Pen Polarity

    Page 7.4 video graphics programming light pen polarity if you are using a light pen with a positive-going pulse output, position j301, the light pen jumper, to "+". If your pen outputs a negative-going pulse, position j301 to "— ". The light pen option currently is not supported by zenith data syste...

  • Page 94

    Page 7.5 video graphics programming e a q oo a b r e 0 a 0 0 0/ n f 0 u a e 0 i/2 v4 a 1 n 0 0 figure 7.2. Character rom contents.

  • Page 95

    Page 7.6 video graphics programming monitor synchronization selection if you are using an external rgb monitor which requires composite (horizontal and vertical) sync, position j304 to "c". If your monitor requires separate horizontal and vertical sync, position j304 to "v". Position j303 to the car...

  • Page 96

    Page ?.? Video graphics programming major components the videod rcuitry is comprised of the following major components. Crt controller a 6845 crt controller ic provides the proper drive signals for a raster scan crt. The device is highly programmable with regard to raster and character manip- ulatio...

  • Page 97: Character Generator

    Page 7.8 video graphics programming character generator the rom character generator on the video card, when in text mode, generates software-selectable characters from dot p atterns stored in the rom. Four character configurations are provided: 7 x 7 double-dot width, 5 x 7 single-dot width, and und...

  • Page 98

    Page 7.9 video graphics programming modes of operation the video card can operate in one of two major modes: text mode and pixel addressable graphics mode. Additional submodes are available within each mode, for either color or monochrome display. Text mode in text mode, the display formats in eithe...

  • Page 99

    Page ?.10 video graphics programming text mode display architecture a 2-byte character and attribute format is used to define each character display position as shown in figure 7.3. A tt r i b u t e b y t e ( m+t ) c harac t e r b y t e ( m ) 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 figure 7.3. Character/att...

  • Page 100

    Page 7.11 video graphics programming table 7.3 shows the attribute byte breakdown. As before, bits 7 and 3 determine blink and intensity, respectively, of the foreground character. Table 7.3. Color attribute byte logic background bits 6 5 4 color foreground bits 2 i 0 0 0 0 0 0 0 0 0 i 0 0 i 0 i 0 0...

  • Page 101

    Page 7.12 video graphics programming medium resolution (320 x 200) graphics pixel information is stored in video memory in two banks of 8000 bytes each, as shown in figure 7.4. Address b8000 contains color selection data for the pixels in the upper left corner of the display area. Addresses b8000 to...

  • Page 102

    Page 7.13 video graphics programming for a given pixel bit pair composed of bits co and cl, the following logic, as shown in tables 7.4 and 7.5, determines which color is selected from one of four colors: the current background color or one of the three colors from the current palette. Table 7.4. Co...

  • Page 103

    Page 7.14 video graphics programming high resolution (640 x 200) graphics the high resolution (640 x 200) graphics submode may only be implemented in a monochrome format because of memory limitations. Addressing and mapping is the same as medium (320 x 200) resolution but formatting of the data is d...

  • Page 104: Crt Controller Signals

    Page 7.15 video graphics programming prograauning video graphics in the following descriptions all address and register values are given in hexadeci- mal notation. The term "set" in a given bit position indicates a logic i state. The term "reset" indicates a logic 0. The memory used by the video int...

  • Page 105

    Page 7.16 video graphics programming table 7.6. Video card to system interface signals signal name cs+ do to d7 ao to ai9 description the 20 system address lines used to access memory locations. Bidirectional data lines which transfer information between the cpu and the internal registers of the 684...

  • Page 106

    Page 7.17 video graphics programming table?.6. (continued) video card to system interface signals signal name description enables the internal vo buffers and docks data into and out of the internal registers via the data buffers. In your computer, the e input connects to the system eclk signal. Sync...

  • Page 107: Screen Memory And

    Page 7.18 video graphics programming screen memory and character generator signals there are two sets of signals provided by the 6845 to implement screen memory and character generator logic interface. Mao through ma13 are screen memory address outputs and rao through ra4 are the raster address sign...

  • Page 108: Programming The Registers

    Page 7.19 video graphics programming the other eighteen registers are selected by the pointer information in the address register. Then the cpu directs the information at address 3ds to be loaded into the selected register. Transfers of address and parameter information to and from the registers is ...

  • Page 109

    Page 7.20 video graphics programming 5 8 x ~~ o z ao o x l (d cci cj cci ccrc cci cci 4 8 0 c q 0 0 0 n ccc x ccc 0 n 0 o o m 8 g,5 0 n m x m 0 i zl col.

  • Page 110

    Page 7.21 video graphics programming.

  • Page 111

    Page 7.22 video graphics programming.

  • Page 112

    Page 7.23 video graphics programming the first group of registers, ro through r3, establishes the horizontal format and timing parameters. Registers r4 through r9 determine vertical format and timing parameters. The remaining registers, r10 through r17, deal with cursor characteristics, screen memor...

  • Page 113

    Page 7.24 video graphics programming vertical timing and format registers registers r4 through r9 are normally loaded at system startup and are not nor- mally changed later. The point of reference for these registers is the top-most character position displayed on the monitor screen. The vertical to...

  • Page 114

    Page 7.25 video graphics programming the scan line spedfied in rio is the first scan in which the cursor signal is to be set and it will remain set until the scan line specified in rll has been completed. Accordingly, if you want the cursor symbol to occupy a single scan line, the same value must be...

  • Page 115: Raster Scan Signals

    Page 7.26 video graphics programming raster scan signals the raster scan outputs, rao through ra4, provide the interface between the 6845 and the character generator logic. These outputs may represent scan line counts of from 0 to 31, or up to 32 scan lines per character row. Register r9, the scan l...

  • Page 116

    Page 7.27 video graphics programming video card input/output devices table 7.8 defines the i/o registers contained on the video interface and the port assignments. Table 7.8. Video card input/output port assignments port address r e gister 3do 3di 3d8 3d9 3da 3db 3dc 6845 6845 mode control color sel...

  • Page 117: Color Select Register

    Page 7.28 video graphics programming color select register the color select register, located at address 3d9, is a 6-bit output only device (it cannot be read) that can be written to using the i/o out command. Only the six lsbs of the instruction are used, as shown in table 7.10. Tabk 7.10. Color se...

  • Page 118

    Page 7.29 video graphics programming if bit 5 is a logical 0, color is determined by the logic of table 7.12. Table?.12. Palette 4 2 selection cl c o b a c k g r o und color 0 0 defi n e d by bits 0-3 of port 3d9 0 i green i 0 red i i brown mode select registers the mode select registers are also wr...

  • Page 119

    Page 7.30 video graphics programming the output register at 3da functions according to the logic of table 7.14. Table 7.14. Mode select port 3da logic bit description a logical i overrides the video enable signal from 3d8. Eliminates monitor display flicker when in text mode. Character font selectio...

  • Page 120

    Page 7.31 video graphics programming table 7.15 further defines the manner in which character font selection is deter- mined. Table 7.15. Character font selection mode select status port port3da 3da j305 j302 4 b it 1 b i t 5 bit 6 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 1 ...

  • Page 121

    Page 7.32 video graphics programming status register the status register, an 8-bit read only buffer, resides at input port address 3da. Table 7.16 summarizes the logical operation of this register. Table 7.16. Status port 3da logic bit description logical i indicates that a horizontal or vertical re...

  • Page 122: Video Interrupt Vector

    Page 7.33 video graphics programming programming interface information t he information in t hi s section repeats much of t h e f oregoing, but i s arranged in a format designed to darify and link together related concepts and operations. Specific instrudions are presented here, which, together with...

  • Page 123

    Page 7.34 video graphics programming video input/output function codes table 7.17. Function code registers affected operation 0 i 2 3 4 5 6 7 8 9 10 al ch, cl dh, dl dh, dl, ch, cl ah, dh, dl, ch, bh, bl al al, bh, ch, cl, dh, dl al, bh, ch, ci dh, dl ah,al, bh al, bh, bl, ch, cl al, bh, ch, cl bh, ...

  • Page 124: Function

    Page 7.35 video graphics programming function code 0 — set v ideo mode to set the desired video mode, a value from 0 to 7 is placed in the al register before implementing the interrupt command. The recognized modes and their function codes are presented in table 7.18. Table 7.18. Video mode function...

  • Page 125: Function Code 5 —

    Page 7.36 video graphics programming function code 3 — read cursor position upon return from this call, dh will contain the cursor row, and dl the cursor column position. Function code 4 — read light pen position upon return, ah will contain the light pen trigger/switch status, 0 or 1. If ah is 0, t...

  • Page 126: Screen Down

    Page 7.3? Video graphics programming function code 7 — scroll an area of the screen down this code allows you to define an area of the screen to be scrolled downward a desired number of lines. Load registers the same as for scrolling up. Function code 8 — read character and attribute this function c...

  • Page 127

    Page 7.38 video graphics programming if bh is odd, one of the two available palettes is selected by the value in bl. If bl is 0, the green (i), red (2), yellow (3) palette is selected; if bl is i, the cyan (i), magenta (2), white (3) palette is selected. The values in parentheses represent the color...

  • Page 128

    Page 7.39 video graphics programming function code 15 — return current video state returns to the current video status. Al will hold the current video mode (function code 0), ah the screen width in character columns, and bh the currently active video page. Function code 10~ e l e c t scrolling mode ...

  • Page 129: Custom Character Creation

    Page 7.40 video graphics programming custom character creation normally when in graphics mode, characters called from the computer's rom are the first 128 characters of the character font in addition to these standard characters, you may create your own 128 custom character set using the following p...

  • Page 130

    Page 7.41 video graphics programming proceed in this manner to define each character in your set. When you have all the characters defined and placed in memory, the first character will have a hexadecimal code of 80 and the last a code of ff. All that remains now is to reset the pointer at interrupt...

  • Page 131: Early Video Cards

    Page 7.42 video graphics programming early video cards if your computer is an early system, it may use a different video card instead of the present design. The two cards are easily distinguished from each other. The early card has seven configuration jumpers instead of eight, and the two connectors...

  • Page 132: Monitor Synchronization

    Page 7.43 video graphics programming monitor synchronization if you are using an rgb (color) monitor which requires composite (horizontal and vertical) sync, position j303 to "c". If your monitor requires separate horizontal and vertical sync, position j303 to "v'. Position j305 to the video card ma...

  • Page 134: Introduction

    Chapter 8 serial and parallel input/output introduction as with most of the other programmable features of the z-100 pc series com- puters, the easiest and most direct means of manipulating the flow of serial and parallel data to a real world device (usually a printer), is by means of the routines p...

  • Page 135: Configuration

    Page 8.2 serial and parallel input/output configuration configuration hardware jumpers are provided on the floppy disk controller card for the serial i/o ports and on the standard memory card for the parallel interface. Serial port configuration serial port ¹i (c omi), physically the top connector o...

  • Page 136

    Page 8.3 serial and parallel input/output serial/parallel input/output tables o figure 8.1 graphically illustrates the format for the serial and parallel device param- eter mapping. Parallel device + 1 parallel d evice + 2 r om en t r y interrupt 1 7 h from parallel d evice + 3 serial d evice + 1 ro...

  • Page 137: Parallel Format

    Page 8.4 serial and parallel input/output parallel format the format for each of the three parallel maps is shown in table 8.2. Table 8.2. Parallel map format byte para m e t er description bits 0-3 perform a map bit 4 strips parity on the output bit 6 maps l owercase to uppercase pad character afte...

  • Page 138

    Page 8.5 serial and parallel input/output table 8.4 further defines byte ¹ i by bit. Table 8.4 bit serial byte ¹1 breakdown parameter description compatibility bit if logic i, ibm-compatible dtr and rts high. If logic 0, handshake determined by bit l. Protocol bit. If logic 0, hardware handshake. If...

  • Page 139

    Page 8.6 serial and parallel input/output table 8.6 further defines byte ¹7. Table 8.6. Serial byte ¹7 breakdown bit parameter description word size number of stop bits define parity; yes/no odd/even 0&i 2 3 &.4 5,6,&7 baud rate.

  • Page 140

    Page 8.7 serial and parallel input/output interrupts the interrupts recognized by the system for the serial and parallel devices are 17h for the parallel i/o ports and 14h for the serial i/o ports. The following operation codes, when placed in the 8088 ah register, will result in specific actions as...

  • Page 141: Serial Port

    Page 8.8 serial and parallel input/output serial port the following operations are recognized using the serial interrupt, 14h. As before, ah is loaded with the operation code corresponding to the desired function. Dx is loaded with the serial device designator, 0 or i, before the interrupt is execut...

  • Page 142

    Page 8.9 serial and parallel input/output table 8.10. Word length selection bit i bi t 0 w o r d length 0 0 don ' t care 0 i don ' t care i 0 7 bit s i i 8 bit s table 8.11. Parity selection bit 4 bit 3 sel e ction no parity odd parity don't care even parity table 8.12. Baud rate selection bit 7 bit...

  • Page 143: Serial Port

    Page 8.10 serial and parallel input/output function code 2 — receive character from the serial port upon return from this call, bits 7, 4, 3, 2, and i of ah will contain the data transfer status. Again, refer to function code 3. If ah is logic 0, the routine reads a character properly into al lf ah ...

  • Page 144

    Page 8.11 serial and parallel input/output table 8.14. Modem control status (register al) bit status cts line has changed state. Dsr status has changed. End of ringing pulse detector. Carrier detect (cd) signal has changed state. Status of cts line. Status of dsr line. Ringing indicator. Carrier det...

  • Page 146: Disk Drives

    Chapter 9 disk drives introduction this chapter contains hardware and software programming information for the floppy disk drives, winchester drives, and the drive controller cards. Refer also to the section on the central processing unit for the correct dip switch settings for the desired system co...

  • Page 147

    ~ 9 . 2 disk drives configuration various configuration jumpers and a switch on the winchester drive controller are employed on the drive controller and drive signal separator cards to implement optional operational modes. This section will discuss the positioning of those jurn- pers for your partic...

  • Page 148

    Page 9.3 disk drives also located on the winchester controller card is a 4-section switch, sl, which selects the number of hard disk heads/cylinders in use. Table 9.1 defines the head and cylinder seledion for the section settings. The on position of a section represents a logic i and off represents...

  • Page 149

    Page 9.4 disk drives jumper configuration drive a (o) hc hm hs mx ds3 ds2 ds1 ds drive c (2) hc hm hs mx ds3 ds2 ds1 dso drive b (1) hc hm hs mx ds3 ds2 ds1 dso drive d (3) hc hm hs mx ds3 ds2 ds1 ds flat cable connector strip terminator jumpers power connector p rog r a m m i n g jumpers figure 9.2...

  • Page 150

    Page 9.5 disk drives shugart floppy disk drive configuration if your system is equipped with one or more shugart floppy disk drives, use this section to configure your system. Refer to figure 9.3 and table 9.3 to configure the drive(s) by jumpering the appropriate pins. Remove the terminating resist...

  • Page 151: Drive Function Calls

    Page 9.8 disk drives drive function calls table 9.6 defines the drive functions recognized by the system. Table 9.6. Drive functions code fun c tion 8 9 5 6 7 reset disk system. Read disk status. Read specified sectors into a buffer. Write buffer contents to desired sectors. Verify that selected sec...

  • Page 152: Function Code 1 —

    Page 9.9 disk drives function code 0 — reset disk system this call resets the disk software for each drive in the system. For floppy drives, interrupt vector 1eh should point to a drive parameter block as defined by table 9.7. Table 9.7. Drive parameter block byte para m eter disk controller mode by...

  • Page 153: Function

    Page 9.10 disk drives table 9.8 defines the parameters required by function codes 2 through 5. Table 9.8. Required parameters for function codes 2 through 5 register p a r ameter dl dh ch cl drive id code as previously defined. Head (side) number. 0 to i for floppy drives 0 to 7 for winchester drive...

  • Page 154: Function Code 8

    Page 9.11 disk drives function code 8 — return current drive parameters when completed, dl contains the number of active winchester drives, dh contains a number representing maximum usable heads, ch contains a number represent- ing maximum usable cylinders, and cl contains a number representing maxi...

  • Page 155: Error Status Codes

    Page 9.12 disk drives error status codes all of the drive function calls will return a status code in register ah upon comple- tion. Ah will either contain 0 if the carry flag is not set, or a value representing a specific error if the carry flag is set. Table 9.9 defines the error codes. Table 9.9....

  • Page 156

    Page 9.13 disk drives booting an operating system an operating system may be booted from a specified drive. Register dl should contain the drive number, and if the drive is a winchester, al should contain a partition number between 0 and 3 expressed in ascii (30h to 33h) with 0 representing the defa...

  • Page 158: Index

    Index note: to locate a subject in this manual, first check the contents for the location of general subjects or illustrations. 8088 microprocessor, 1.2, 3.3 8087 coprocessor, 1.2, 3.3 dip switch setting, 4.4 80c88 microprocessor, 1.2 a address logic, 6.6 alphabetic keys, 5.4 audio speaker, 1.3 auto...

  • Page 159

    Index 2 index cpu, 3.3 card, 2.2, failure, 2.3 subsystem, 3.3 system functions, 4.8 coprocessor, see 8087 coprocessor crc error, 2.4 cursor characteristics, 7.23 movement, 7.25 cursor, 7.18 d dip switches, 2.2, 2.3 disk-based diagnostics, 2.2 disks, error messages, 2.4 formatting, 9.10 disk drives, ...

  • Page 160

    Index 3 index i ibm pc, 6.3, 8.2 color graphics, 1.2, 2.14 xt, 1.2 input from port, 2.10 input/output, 1.3 intel, see 8087 coprocessor, 8088 microprocessor interrupts, 2.7 invalid address mark detected, 2.4 invalid/no keyboard code received, 2.4 k keyboard, 1.2, 2.4 buffer, 5.18 operation codes, 5.2...

  • Page 161

    Index 4 index monitors, 1.2 graphics, 7.9 rgb color, 1.2, 2.5, 7.1 monochrome composite, 1.2, 7.1 monochrome display, 7.11 polarity, 7.6 rom, 2.2 see rom, monitor sync frequency, 4.7 monitor line length, 4.4, 4.5 move memory block, 2.11 ms-dos, 1.3, 2.2, 2.7 n nonalphabetic keys, 5.6 numeric data co...

  • Page 162

    Index 5 index program execution, 2.10 program interrupt controller, 3.3 prompt, see rom monitor prompt protocol, 8.5 r random access memory, see ram ram, 2.5, 6.2 video ram, 2.2, 2.3, 2.5 failure, 2.3 read-only memory, see rom resolution, 7.11 rgb color monitor, see monitor rom, monitor prompt, 2.7 ...

  • Page 163

    Index 6 index v video, card, 1.2, 2.5 enable bit, 7.19 mode selection, 2.14 vsync, 7.18, 7.24 w winchester drives, 1.3, 9.10, 9.13 winchester drive controller, 9.2 configuration, 9.2.