TECHNICAL REFERENCE MANUAL - X-Files

340
TECHNICAL REFERENCE MANUAL Xerox Professional Computer 1984 Xerox Corporation'. 610P72384

Transcript of TECHNICAL REFERENCE MANUAL - X-Files

TECHNICAL REFERENCE MANUAL

Xerox Professional Computer

1984 Xerox Corporation'. 610P72384

Reprint permission granted by Zilog, Inc .. forZiiog Reprint on pages 49-108.

Reprint permission granted by ShugartAsso'iat~$ fp.r,~A 14030 Controller Reprint on pages " ~ iv.· - . ,.' . _. •

253-278.

Reprint permission granted bYVVest~rn 'plglt,ill for .WesternOigltal Reprint on pages 279-

302.

ZlIog, Z80~, and Z80-A are trademarks of Zllog, Inc., WIth whom the publisher IS not

associated.

6086 is a trademark of Intel Corporation.

IBM, IBM PC, and IBM PCXT are trademarks of International Business Machines.

Xerox~, 820'·,820-11'·, and 1618·M are trademarks of Xerox Corporation.

CPIM<», CP/Mw-80, and CPIM-86~ are registered tr~~e,marks of Digital Research, Inc ..

MS 1M is a trademark of Microsoft Corporation.

WARNING: This equipment has been certified to comply with the limits for a Class B

computing device, pursuant to Subpart J of part 15 of FCC Rules. Only peripherals

(computer input/output devices, terminals, printers. etc.) certified to comply with the Class

B limits may be attached to this computer. Operating with non-certified peripherals is

likely to result in interference to radio and TV rece~tion.

WARNING: This ,eqUipment generates and uses radio frequency energy and if not

installed and used /properly, that is. in strict accordance with the manufacturer's

IIlstructions, may cause interference to radio and televiSion reception. It has been type

tested and found to comply with the limits for a Class Bcomputing device in accordance

with the specifications III Subpart J of part 15 of FCC Rules. which are designed to provide

reasonable protection against such interference in a residential installation. However.

there is no guarantee that interference will not occur in a particular installation. If this

equipment does cause interference to radiO or television reception. which can be

determined by turning 'the equipment off and on, the user is encouraged to try to correct

the interference by one or more of the following measures:

Reorient the receiVing antenna.

Relocate the computer With respect to the receiver.

Move the computer away from the receiver.

Plug the computer into a different outlet so that computer and receiver are on

different branch cirCUits.

If necessary. the user should co~sult the' dealEi'f.ior·an:eiq~·etlenced radio/television

technician for additional suggestions. The user may find the following booklet prepared

by the Federal Communications Commission helpful. This booklet is available from the U.S.

GOVERNMENT PRINTING OffiCE, WASHINGTON.:D~C. -20402, STOCK NO. 004-000-00345-4.

"HOW TO IDENTIFY AND RESOLVE RADIO-TV'PROBLEMS"

Xerox Corporation reserves the fI~ht to make improvements to products without inculClng

any obligation to incorporate such improvements in,Products previously sold.

THIS PAGE INTENTIONALLY BLANK.

Table of Contents

Introduction Introduction & Miscellaneous Information

• Hardware Description • Configurations and Product Codes • Functional Description • Hardware Interface • Operating Systems:

CP/M-80 CP/M-86 MS-DOS

Hardware Miscellaneous Hardware Information

• Dimensions • Electrical Requirements • Operating E'nvironment • Di-sk Drive Storage • Disk Drive Format • Display Specification, Functional Description,

and General Information • System Bus Expansion Slot - Electrical &

Environmental Requirements • Hardware Interface - Connectors:

J 1 (Disk), J2 (Keyboard), J3 (Printer), J4 (Comm) J1 Illustration J8111ustration J5, J6 (Power Supplies), J7 (Video Connector) J8 (Parallel Connector) Parallel Connector Illustration J9 (COMM Port Strapping Options) J9 (COMM Port Strapping Options),(Etch 2 CPU) J 13 (System Bus) J12 (Disk Access) J 1 (Floppy Disk) J 1 (Rigid Disk)

2 3,4 4,5 5,6

6-9 9,10

10,11

13 13 1 3 14 14

15- 1 7

18

19 20 21 22 23 24 25 26

27-32 33-37

38 39

Hardware continued

Theory of Operation

• CPU • ROM and RAM Memory • 6 - 8k ROM Memory • 64k RAM • Counter Timer Circuit • Serial 1/0 Controller • Serial 1/0 Ports • Parallel 1/0 Controller • Parallel Port • CRT Controller • CRT RAM Memory Allocation • Scroll Register . • Speaker • Disk Drive Daughter Board • Rigid Disk Drive Caution • System Bus • Keyboard Interface

Zilog Reprint (510, PIO, CTC, & CPU Data sheets) .

Schematics: #1 Etch 1 CPU - Power Distribution #2 Etch 1 CPU - CRT Controller #3 Etch 1 CPU - CRT Controller #4 Etch 1 CPU - U16, U26, U28, U32, U37-U41. U54,

U57, U58 #5 Etch 1 CPU - U41, U54-U58, U66-U73 #6 . Etch 1 CPU· RAM #7 Etch 1 CPU - CTC #8 Etch 1 CPU - GP, PIO, 510 #9 Etch 2 CPU - Power Distribution

#10 Etch 2 CPU - CRT Controller # 11 Etch 2 CPU - CRT Controller #12 Etch 2 CPU - U16, U26, U28, U32, U37-U41, U54,

US7, U58 #13 Etch 2 CPU - U41, U54-U58, U66-U73 #14 Etch 2 CPU - RAM # 15 Etch 2 CPU - CTC, Keyboard, PIO # 16 Etch 2 CPU - GP, PIO, 510

41 41 42 42 42 42

42,43 43 43

43,44 45 46 47 47 47 48 48

49-108

109 110 11 1 112

113 114 115 116 117 118 119 120

121 122 123 124

Hardware continued # 17 Floppy Controller - Power Distribution # 18 Floppy Controller # 19 Rigid Controller #20 8086 Processor - Power Distribution & Connectors #21 8086 Processor- U21-U24, U29-U32 #22 "8086 Processor - U27, U33-U42 #23 8086 Processor - U 1-U 16, U 18-U20, U25, U26,"U28 #24 Memory Expansion PWB - 8086

Software Device Initialization

• How the ROM works Counter Timer Circuit System PIO Controller General Purpose PIO Controller 510 Controller Channels A & B Baud Rate Generator

• Monitor Commands - Summary Table Display Memory, Modify Memory Xtended Memory, Fiil Memory Copy Memory, Verify Memory Block, GoTo Input, Output Load From Disk Read Disk Sector, Write Disk Sector Baud Rate, Typewriter, Host Terminal Mode Host Terminal Options

. Host Terminal Command Set Protocol

Operating System Interface • Accessing BIOS • Logical/Physical Device Mapping • I/O Port Assignments • ROM Oper"ating System Interface"~ • CRT Entries • Execute Physical Drive"r Entries • Printer Entries • Communications Entries

125 126 127 128 129 130 131 132

133,134 134 134 135 135 136 137

138,139 139

140,141 141,142

142 143 144

145,146 141,148 148,149

151,152 153-155 156,157

158 158-160 161,162 163,164

165

Software continued • Keyboard Entries • 10BYTE Directed I/O • Programmable Functions

Sample Code,Sequence • Miscellaneous Functions - Cold, Warm, Getsel,

Day tim, Config, Start Screen Print

CRT Control & Interface • Modes of Operation • Text Character Set • Graphics Character Set • Display Manipulation • Control Sequences • Escape Sequences

Peripherals Keyboards

• ASCII • Low Profile (LPK)

Disk Drive Specifications

Disk Parameter Headers

Disk Formats

20 & 40 CPS Printers • 20 CPS Operating Switches • 20 CPS Command Codes • 20 CPS Command/Control/Hex Code Chart • 20 CPS Specifications • 20 CPS Cabling Requirements • 40 CPS - HPR05 Board • 40 CPS Operating Switches • 40 CPS Command Codes • 40 CPS Command/Control/Hex Code Chart • 40 CPS Electrical Interface

.166 167-169 17-0-176 177-179

177-182

183 184 185 186

186-188 189-193

195-199 200-206

207-212

213-218

219-226

227-230 231-233

234 235,236

236 237

238-240 242-244

245 246-250

Peripherals continued

• 40 CPS Specifications 251-252 • 40 CPS Cabling Requirements 252

SA1403D Manual Reprint 253-278

Western Digital Reprint 279-302

Appendices A. BIOS Entry Vector Table A1-~6

B. Monitor Entry Vector Table B 1-B2

C. Documented System Storage & Structures • Z80-A Mode 2 Interrupt Vectors Cl, C2 • Keyboard Interface C1 • Logical to Physical Drive Mapping Table C2 • Physical Driver Address Table & Request Block I C3 • Time-ot-Day and Timer Variables C4

D. Program Samples • How to make Monitor Calls with BASIC D1-D3 • Bank Program & Switching D4

E. ROM Listings E1-E110 • (BIOS E7-E 12

F. Macros & Symbols FI-F24

G. Cold Start Loader G1-G6

H. BIOS Jump Table H1-H18

I. Banked Physici;11 Driver 11-112

J. Position-Encoded Keyboard Handler J1-138

Introduction

The purpose of this manual is to provide technical reference material for the Xerox 820-11 and 16/8 Professional Computers for programmers and engineers involved in hardware, software, and interface design. It is also intended for interested persons who have a desire to know how the Xerox 820-11 and 16/8 operate and how to access their many features.

A list of the abbreviations·and naming conventions used in this manual can be found in Apper:'dix N.

SYSTEM OVERVIEW The modular design of the 820-11 and 16/8 systems enhance the flexibility provided by the operating systems. The combination of.operations provided by the system gives it a flexibility that allows it to be tailored to the needs of each user.

Introduction

Appendices continued

1<. Code Charts • Baud Rates Kl • Decimal to ASCII to Hex K2

L. Additional References L l-L2 M. Contacts/reference: Ml-M2

• Diablo • Digital Research • Microsoft • Shugart

N. Abbreviations Nl-N2

Overview of Xerox Personal Computers

Xerox Personal Computers are comprised of four components:' display/processor, disk drives, keyboard, and optional printers. Both the 820-11 and 16/8 use the CP/M(!)-80 2.2 Operating System from Digital Research,lnc. Additionally, the 16/8 PC includes CP/M-86® 1.land MS '''­DOS Version 2.0 as standard operating systems.

HARDWARE DESCRIPTION System Board The system board uses a Zilog Z80-A(!)-based microprocessor operating on a 4 megahertz clock with 64k RAM and 8k ROM. It is a single-board computer and uses a daughter board to interface with the disk drives. The 820-11 is equipped with three user-accessible 1/0 ports. Twa of the ports are located on the back of the display/processor; the third is located on the CPU board. On the back are the printer and the communications ports (both RS232C). The port inside the display is a dual parallel port (most printers and other devices that follow a sta'ndard Centronics 36-pin interface can be successfully attached).

The 16/8 has all of the above features as well as an Intel 80861~-based microprocessor operating with a 4.772 megahertz clock. The 8086 is equipped with 128k of RAM which is expandable to 256k total by addi ng a 128k daughter board to the 8086 board.

The 820-11 and 16/8 are capable of having up to 8k of read only memory (four 2k ROMs): the 820-11 has 6k 9f this 8k occupied; the 16/8 uses the full SK. The last 2k on the 16/S is used for decoding the position-encoded Low Profile Keyboard. The firmware contained in the ROM is capable of doing such things as executing a one-sector loader from disk; i.e., loading CP/M, emulating a terminal, operating in typewriter mode, etc. The monitor also has other commands that are useful for debugging hardware and software. The mother board also contains a speaker as well as an expansion slot (used by the 16/8 for the 8086 board). Ther~ are two types of daughter boards: one interfaces the display/processor to floppy disks and the other interfaces the display/processor to a rigid disk controller.

2 Introduction

Display The display/processor houses the video display, the CPU mother board, the disk drive daughter board, and the 8086 processor board if so configured. The video display is a standard 241ine by 80 characters. It uses a 7 x 10 dot matrix for each character in all text modes and displays white characters on a black screen. For graphics characters, it uses a 4 x 4 pixel resolution. The display attributes can be changed to display either in blink, highlightllowlight, inverse, or graphics characters.

820-11 Display/processor for floppy disks 820-11 Display/processor for rigid disk 16/8 Display/processor for floppy disks 16/8 Display/processor for rigid disk

Keyboards

Product Code #U03 Product Code HUOS Product Code #H69 Product Code #H70

The 820-11 and 16/8 use either a standard 96-character ASCII or Low Profile keyboards. Both keyboards include additional keys to the right of the keyboard, a 10-key numeric key pad and a set of keys for software control of the cursor. The low profile keyboard also includes 12 function keys that can be software-enabled and other keys such as Accept, Delete, Next, Previous, Home, and Undo ..

ASCII Keyboard Low Profile Keyboard

Disk Drives

Product Code #X928 Product Code #G2S

Five disk drive options are offered for the 820-11: Dual Sf" single-sided floppy disk drives Product Code #X929 Dual St" double-sided floppy disk drives Product Code #T66 Dual 8" single-sided floppy disk drives Product Code #X973 Duat' 8" double-sided floppy disk drives Product Code #F10 One 10mb rigid disk drive with Product Code #U07

an 8" double-sided disk drive

Three disk drive options are offered for the 16/8: Dual 8" single sided floppy disk drives Product Code #X973 . Dual 8" double sided floppy disk drives Product Code #F10 One 10mb rigid disk drive with Product Code #U07

an 8" double sided disk drive

Printers 40 CPS Printer and 20 CPS Printer As their names imply, the printers have a printing speed of 20 and 40 characters per second (CPS) respectfully. Both printers have a wide range of print styles available. The 20 CPS Printer supports 10, 12, and 15 pitch as well as Proportional Spacing (PS), while the 40 CPS Printer supports either metal or plasticprintwheels in 10, 12, 1 S, and PS. More detailed information on these printers can be found in the Printer section under Peripherals.

The standard RS232C printer connector and dual parallel port are available to·interface with many types of serial and parallel printers.

40 CPS Printer 20 CPS Printer

FUNCTIONAL DESCRIPTION

Product Code # 080 Product Code # UOl

The 820-11 and 16/8 systems are a collection of four components working in unison -- the display, keyboard, disk drives, and printer. The computer itself is housed in the display.

System Monitor· ROM The system monitor contained withiri the 8k ROM controls the essential functions of initializing and controlling all system input/output resources, and also provides a number of monitor commands that cao be used to assist in, programming. .

Ports Three ports are standard on the 820-11 and 16/8: two serial ports located at the back of the display unit and an additional dual parallel port inside the di'splay unit. These allow printers, communication devices, and other peripheral equipment to be interfaced with the system.

Operating Systems The 820-11 uses Digital Research's 2.2 CP/M-80 Operating System. The 16/8 can use Digital Research's 2.2 CP/M Operating System, as well as their CP/M-86 1.1 Operating System and Microsoft's MS-DOS 2.0 Operating System. These operating systems provide the user with a general environment for program construction, storage, and editing, along with assembly and program checkout facilities.

Introduction

CP/M-80 operating system software as implemented on the 820-11 and the 1618 is logically divided into four parts:

ROSR BIOS BOOS CCP

ROM Operating System Routines (hardware dependent) Basic 1/0 System (hardware dependent)-Basic Disk Operating System* Console Command Processor*

*Oisk resident portions of CP/M-80

ROSR provides code in ROM that can be executed without th~\ presence of the CPIM system disk and provides the primitive operations necessary to access the disk drives and to interface with peripherals.

BIOS provides the interface between BOOS and ROSR.

BOOS provides disk management by controlling one or more disk drives containing independent file directories.

CCP provides symbolic interface between the user's console and the remainder of the CPIM system.

HARDWARE INTERFACE The 820-11 and 16/8 are equipped with six input/output connectors. Four are on the back of the display unit and two are inside the display.

Disk Drive Used for connection of either the 8" or the 5t" Dual Floppy Drives, or the 8" Rigid Disk Drive. This is determined by the type of disk daughter board installed in the display processor.

Keyboard Used for connection of either the ASCII or Low Profile keyboard.

Printer A serial printer can be attached to this RS-232-C connector.

COMM COMM is a second RS-232-C connector and can be used for a modem.

5

Parallel Port A dual parallel port inside the display cabinet is also provided.

Expansion Slot The expansion slot inside the display cabinet provides all of the Z80-A microprocessor control signals for connection to custom devices for future expansion. This slot is used for the 8086 co-processor if you have a 16/8.

CP/M-SO

The CP/M-80 2.2-C disk for the 820-11 contains the standard Digital Research software development and checkout programs. Xerox issues additional utility programs that are unique to the 820-11. A description of each program is listed below:

Digital Research Files ASM.COM The Assembler allows you to create a program

DDT.COM

DUMP.COM

ED.COM LSO.COM

LOAD.COM M80.COM

MOVCPM.COM

PIP.COM

STAT.COM

SUBMIT.COryl

which can be read and executed by the 820-11. The Dynamic Debugging Tool is used to debug a Z80-A assembly language program. Allows binary command files that are not displayed on screen to be displayed showing the hexadecimal value for each byte. A line-oriented screen editor. Reads an .REL file created with the Macro-80 Assembler Program and outputs a command file. Reads a .HEX file and creates a command file. Converts a program written in Assembly Language to a relocatable (.REL) file and (optionally) a printer listing file (.PRN). Lets you modify and move the CP/M system image to allocate a specific lesser memory size. Allows you to selectively copy a file or files from one disk to another or on the same disk. The status utility is a frequently-used transient command for all system housekeeping; i.e., checking the amount of space available on a disk. Used to submit afile of commands for batch processing.

Introduction

SYSGEN.COM

XSUB.COM

Xerox Files BACKUP.COM

CONFIGUR.COM

IntrArI"rtinn

Used to generate a CP/M-80 system image and copy the operating system to another disk. Same as Submit.com, but has the facility to include line input to programs as well as the console command processor.

A multi-option utility that allows you to archive and retrieve files, delete files, list directories.of any drive, and to verify data integrity of a floppy or rigid disk. Using Configur.com, you can select seven different options: 1. Record Restart Command - lets you enter a one­

line command which will automatkally load a program .. For example, you could enter DIR a~ the restart command and every time you boot the system, it will automatically display the directory for you. Or you could enter the name of your application software package and it would automatically load that application package for you. This command is recorded on the disk and you can have a·different one for each disk.

2. Select Printer Port Options - allows you to determine printer protocol. This option allows configuration for alternate printers without modifying the BIOS.

3. Select Communications Port Options - a convenient method for setting up the communications port on the 820-11 or 16/8; that is, baud rate, protocol, stop bits,.etc.

4. Select I/O Device Assignments - lets you select alternative inputJoutput device assignments; i.e., set up the system so that everything displayed on the screen automatically prints on the printer.

5. Select Keyboard Data Format -lets you choose 7-bit or 8-bit mode for the keyboard.

6. Select Screen Attributes - includes blink, inverse video, highlightJlowlight, and graphics modes.

7

COPY.COM FMT.COM

HELP.COM

INIT.COM

KILLESC.COM

SET.COM·

SWAP.COM

TiME.COM

WHATSA.~OM

R

7. If you have a floppy disk system, Select Floppy Disk Head Step Rate will appear as selection 7. If you have a rigid disk system, Configure Rigid Disk will appear (program must be loaded from floppy or the first partition of the rigid). a. Select Floppy Disk Head Step Rate -lets you

adjust the floppy head step rale for optimum performance.

b. Configure Rigid Disk -lets you divide the eight megabyte rigid disk into sections (e.g., 4 Mb, 2 Mb, 1 Mb, 1 Mb).

Makes an exact copy of a disk, track for track. Allows you to format (initialize) a rigid disk. Verification of the rigid disk is performed using the Backup.com utility. . A guide for CP/M-SO users that contains basic information about CP/M-SO commands; also c(oss­references to additional information in the CP/M-SO reference manual, Reorder #9RS044S. Prep~res new (or used) disks for storing information. It will also alert the user to any flawed sectors on the disk. Turns offthe<CTRL> + <ESC> feature to enable use of <CTRL> + <ESC> for other purposes; for example, setting margins and tabs on a 40 CPS printer uSeS a <CTRL> + <ESC> sequence. A convenient method to temporarily change communication and printer port options in RAM. A utility that allows the user to swap drive names. For example, "A" and "E" for a rigid disk drive. By designating an alternate drive as the" A" drive, you can load software directly from that drive. Many CP/M-SO application packages have been written to be executed from the "A" disk drive only. Using Swap. com allows you to place your application software on any disk drive and load. Displays the time and date on screen. Since there is no battery backup, however, you must re-enter the time and date each time you reload the system. This utility lists the logical and physical names for each disk drive, as well as the density, number of

Introduction

sides, and types of disks logged into the system, (e.g., double density, single-sided 8" floppy).

CP/M-86

The CP/M-80 2.2 and CP/M-86 1.1-F disks for the 16/8 contain the standard Digital Research software development and checkout programs. These disks contain the same files as described in the CP/M-SO section as well as the following files.

Digital Research Files ASM86.CMD The Assembler allows you to create a program

DDT86.CMD

ED.CMD GENCMD.CMD

GENCMD.COM

GENDEF.CMD

GENDEF.COM

HELP.CMD

LMCMD.CMD

LMCMD.COM

PIP.CMD

1_ .. __ ...J •• ,...+i_ro\

which can be read and executed by the 8086. The Dynamic Debugging Tool is used to debug a 8086 assembly language program. A line-oriented screen editor. Uses the hex output of ASM-86 and other language processors to produce a .CMDfile. Uses the hex output of ASM-86 an"d other language processors to produce a .COM file. Reads a 16-bit file containing the disk definition statements, and produces a 16-bit output file containing assembly language statements which define the tables necessary to support a particular drive configuration. " Reads a 16-bit file containing the disk definition statements, and produces an 8-bit output file containing assembly language statements which define the tables necessary to support a particular drive configuration. Provides summarized information for all of the CP/M-86 commands described in the Digital Research Users manual. Operates in exactly the same manner CIS

Gencmd.cmd, except Lmcmd also accepts an Intel L­module file as input. " Operates in exactly the same manner as Gencmd.com except Lmcmd also accepts an Intel L­module file as input. Allows you to selectively copy a file or files from one disk to another or on the same disk.

STAT.CMD

SUBMIT.CMD

TOD.CMD

Xerox Files CPM86.COM 86CON.COM GOBACK.CMD LOAD86.COM REBOOT.COM

SOFTKEYS.COM

The status utility is a frequently-used transient command for all system housekeeping, i.e., checking the amount of space available on a disk. Used to submit a file of commands for batch processing. Time of day.

Used by Load86.com to boot the 8086. Switches from Z80-A console to the 8086 console. Switches from 8086 console to the Z80-A console. Loads the 8086 for concurrent processing. From the concurrent mode, reboots the system as a Z80-A standalone. Used to set up the lO-key pad with programmable functions ( < CTRL > + one of the 10-key pad keys).

MS-DOS

The MS-DOS 2.0 disk for the 16/8 contains the standard Microsoft software development and checkout programs.

Microsoft Files ANSI.SYS

COMMAND.COM

CONFIG.SYS CHKDSK.COM CREF.EXE DEBUG.COM DISKCOPY.tOM EDLlN.COM EXE2BIN.EXE FC.EXE FIND.EXE FORMAT.COM L1NK.EXE : MORE.COM

10

Allows programs that use the standard ANSI driver to be executed. This is the MS-DOS command processor. It is recommended that this file be placed on every application program disk. Configures system at boot. Checks disk. Assists in debugging assembly language programs. Debugger supplied with MS-DOS. Copies a disk. Line-oriented screen editor. Converts .EXE files to binary format. Compares two files for similarity. Finds a string in a list of files or standard input. Formats an 8" floppy or a rigid disk. Linker. Used to display text in 23-line segments.

Introduction

MASM.EXE PRINT.COM RDCPM.COM

RECOVER. COM SORT.EXE

Xerox Files SAMPLE.TXT

Macro Assembler for MS-DOS. Print spooler. Reads a CP/M-80 file and converts data to MS-DOS­readable file:, Recovers bad or damaged disks. Used to sort text.

Provided to assist going through MS-DOS' Handbook.

11

Notes

12 Introduction

Sped fications This section details the following specifications: dimensions., electrical requirements, operating environment, and disk drive capacities of the Xerox 820-11 and 16/8 PCs.

Dimensions Equipment Height Depth Width Weight 820-11-16/8 Display 12.20" 14.75" 15.00" 301bs. ASCII keyboard 3.75" 9.50" 20.00" 101bs. Low profile keyboard 1.60" 8.25" 19.90" Sibs. S·t" Floppy disk drives 7.00" 10.20" 7.00" 101bs. 8" floppy disk drives 10.50" 17.50" 14.50" 481bs. 8" Rigid disk drive 10.50" 17.50" 15.50" S4lbs. 40 CPS printer 10.00" 17.50" 15.50" 561bs. 20 CPS printer 9.25" n.50" 24.00" 451bs.

Electrical Requirements All Xerox products listed below require voltage of 115 VAC, a frequency of 60 Hz, and a two-pole, three-wire grounded duplex receptical.

Equipment 820-11-16/8 Display 8" floppy disk drives 8" Rigid disk drive 40 CPS printer 20 CPS printer

Operating Environment

Current 1.1 Amps 2.0 Amps 2.2 Amps 2.0 Amps 1.0 Amp

All Xerox equipment is tested to perform between 50 and 90 degrees fahrenheit with a relative humidity factor between 20% and 80%. .

. l\/licr.c.lI::>n<>AIlC l-j"lrrlW'lrp Information

Disk Drive Storage Unformatted Formatted Usable 5i" SS/SD 125 k 90k 81 k 5i" SS/DD 250 k 168 k 155 k 5i" DS/SD 250 k 180 k 172 k 5i" DS/DD 500 k 338k 322 k 8" SS/SD 400k 250 k" 241 k 8" SS/DD 800k 497 k 482 k 8" DS/SD 800k 500k 490 k 8" DS/DD 1.6Mb 997 k 980 k 8" Rigid (DS/DD) 10.67 Mb 8.4Mb 8.192 Mb

Disk Drive Format Bytes Number per of

Equipment Tracks Sectors Sector Heads Si" SS/SD 40 18 128 1 5i" SS/DD* 40 17 256 1 5t" DS/SD 80 18 128 2

)

5i" DS/DD* 80 17 256 2 8" SS/SS 77 26 128 1 8" SS/DD** 77 26 256 1 8" DS/SD 1S4 26 128 2 S" DS/DD** 154 26 256 2 8" Rigid DS/DD 1,024 32 256 4

*Track 0 of 5i" double density disks has 18 sectors of 128 bytes. **Track 0 of 8" double density disks has 26 sectors of 128 bytes.

For more specific information on disk formats, see the Disk Drive Specifications section.

1A Miscellaneous Hardware Information

DISPlA V SPECIFICATION

SIZE: TYPE:

RESOLUTION:

CHARACTER CELL: BUSINESS GRAPHICS:

CHARACTER SET:

CHARACTER LINES: CHARACTERS/LINE:

VOLTAGE: RIPPLE:

VIDEO BIT RATE: BITS/HORZ LINE:

HORZ SYNC PULSE: TOTAL BITS/LINE:

HORZ RATE: LINES/FIELD:

VERT BLANKING LINES: VERT SYNC PULSE:

VERT RETRACE (lines): TOTAL LINES/FIELD:

FIELD RATE: REFRESH RATE:

VIDEO RATE:

12 inch, landscape mode Aluminized P4 FI uorescence White (W) Phosphorescence White (W) Persistence Short • 240 active line raster adjusted to 8.5 x 5.3

inch usable area • Brightness level 30 (± 2) foot-Iamberts • Resolution at centers (within 1" diameter

circle) -100 lines/inch minimum 7xl0 4x4 Pixel Resolution 4 sets of 128: (1 U.S. font, 1 Graphics

font) (1 U.S. font, Inverse Video font)

24 80 + 12(± 5.0%)VDCat2.0ADCmaximum 50 MV Pop synchronous or nonsynchronous with refresh or power frequency. 10.694 MBPS (93.51 nanoseconqs) 560 126 (11.78 microseconds) 686 15.59 KHz (64.14 microseconds) 240 20 20(1.28 milliseconds) 8TYP 260 59.95 Hz 61 Hz 15 MHz

(16.68 milliseconds)

""':- __ I ..... _""I>_f." 11 ..... ,..J •• 4"' .. ,... l_f"' .. r'Y'I_:'\tinn 11\

FUNCTIONAL DESCRIPTION, XEROX DISPLAY

The display has the following functional characteristics:

• 241ine display • 80 characters per line • 7x 1 0 dot matrix per character • White characters on black • Software-selectible character attributes

Inverse Video Blink Low Intensity Graphics with 4 x 4 pixel resolution

• Brightness adjust

DISPLA V CONTROLLER

The Display Controller is based 'on displaying characters within a 7x10 cell (7 dots horizontally by 10 scan lines vertically). To guarantee spaces between characters, one dot on each side of the cell is blanked by hardware. Also, to guarantee spaces between character lines, the top two scan lines are blanked by hardware. This gives an actual active character size of 5 dots horizontally by 8 scan lines vertically.

For Business Graphic~, the hardware is configured to eliminate the automatic blanking and allow continuous lines both horizontally and vertically. However, the Display Controller is still based on displaying a character within a 7 x 10 cell. The controller design and available refresh memory allows one byte per character. The maximum number of unique characters that can be defined by any 8 bits is 256. Since the standard text font set contains 128 characters, the Ii mit on unique characters for graphics that can be displayed together with text is 128.

The character set for Business Graphics divides the cell intq blocks of 4 dots horizontally by 4 scan lines vertically. Since the total number of scan lines per character is 10, the character set actually consists of two sub-sets of 4-4-2 and 2-4-4.

Each subset divides the cell into 6 parts requiring 64 possible combinations or unique characters. Therefore, the total number of unique characters forthe complete grap/:1ics set is 128. With this

16 Miscellaneous Hardware Information

character set, any combination of adjacent 4 x 4 blocks can be chosen. Also, at the character cell boundary, the 4 x 4 blocks can be set vertically by 2 scan lines. Since the total number of horizontal dots per cell is 7, there will be an overlap of one horizontal dot in the center of the cell for diagonal blocks within the cell.

It should be also noted that for the standard text font containing 128 unique characters defined by 7 bits, the eighth bit is used to set the attribute function. For Business Graphics. since both text characters and graphic characters can be displayed simultaneously, it requires all 8 bits to define the character. Consequently, display attributes are not available in graphics mode.

1\11 i Io:rI'!ll <lnpn •• " HMciwMe Information 17

SYSTEM BUS EXPANSION SLOT

ELECTRICAL The DC system power available at the expansion slot is as follows:

PIN 50 PIN45

+5VDC + 12V DC #1

5t" system lo2A 0.3A

8" or Rigid system 2.1 A

1.75 A

ENVIRONMENTAL The following temperature, humidity and altitude environmental requirements are specified:

Operating Non-operati ng

Temp. COCelsius) ,

10 to 32 -77 to 66

Rel.Hum. (%)

20 to 80 15 to 90

Altitude (miles) 1830 7620

Any optional or additional electronic assembly using the expansion slot must be capable of performing to design specification when the host is subjected to the environmental range, above. Furthermore, the presence of such an assembly in the expansion slot must not degrade performance with regard to. the above environmental requirements.

18 Miscellaneous Hardware Information

MONITOR PI -L' 9

I I -L& I I

-La

HARDWARE INTERFACE

J.1 Pl I VERT PR I 3 I I I I HORZ DR I 4 I I I VIDEO 5

. J7 I

T .!. I

J.

MAIN PWA J3 I P3 I 1 GND

±I 23 ~~f~R~AN~D~AT~A~ ______ ~ -; REC DATA RElol TO SEND ± i gh§RsWA~~gy i + ~ ~!81R~ DETECT ~

I I I I I I I I I I T 20

I

I I I I I I I

: DATA TERMINAL READY I 29

I KEYBOARD

P. P2 Jf I I I I

I

-- .5 -T::=~PB~Q~=+ • --L.. 16 of .4 ..!.. ..L .3 pB. 2 .J..

I I I

J4 ..L. .4 .5 .J.. I 11 DB2 3 .J.. I II2 ± -L.. 9 DBa·: .J.. I 19 .7.!. ±

I 7 DB4 ± -L ..L. 8 I~ -L ..L 5 PB5 6 .J.. -L ..L. 6 19 ..!.. -L.. 3 DB6 7 .J.. : ..!.. 4 20 ..!.. I

I I OW 8 ..!.. I

I I I

I P,4 CHA~SIS otlD

2 I fAA DATA REQ QA f~

3 RECIO SENP 4 CLEAR TO SEND 5 DATA SEt REAM ~ SIG GND 8 CARRiER PETECT

I I I I

: 1

I ~ I 4 I 5

P 8

T 2 I 2 • ..!..1 I I 27 NSTROB I

..!.. 26 2LJ~ T : 15 -:--,T",AiQAN""-'i§""IG,",EIOJL~T1.LIMIllWINLIolG~+.5 + .7 ;-.... R"'E"'C..:.S"'IG ....... EL .. T!.!I"'M'"IN"'G~-+.7

I ...!.. 20 DATA TERMINAL READY 20

Miscellaneous Ha_rdware Information

SERIAL PRINTER

MODEM

1 9

J 1 illustration

")n

I" fUl'PY .ruo DRlvt IAI5II lA.iIIU

IP. Pl JI Pl Jl IW SwITCH 2- IW SWITCH '2-

3.!.. I 3..!. 8.!.. ' a.!.

M~~IO~12 9+ ' 9 ' I ED : '01= '0-

g~ ", slo SEl ··F ,13, , ", .5- ':;1:

HEAD LOAD 17f- HEAD EL 0 , , ,8- !:+ IN[!~X :t NO x

,20,

READY : 21r EAOY 121T" j22:c ,22r

OAIVE SEll ,23, 23-I 126!.

, 2B r: 21t DAIVE SEl 2 ,27 t-,"" 128j'"

pRIVE 5Eb ;] ,~:c ,2\1, , 3.i.

1 30 ,

pAlW SEl1 , 32' ~ ORIVE SEt ~ , 31 i"

:~F 132j'"

OIASH :~+ '35'

STEP ']61: 1 351 137!..

I Je, WRITE DA ~.

38 L ~illrfL ATA : ~!~ WAIT GA , 39t- T A I 39'j

'''OF 40,. 1 TRACK 00 ,41 A 1 41 •

, 12, 1 42 • WAllE PAoJEct I~I ,"'3r

14 r ::! READ DAT6 I ::C A <IS.!.. 7 ' .. 1L '47 L

FlXID IFiXIO DRIVI COHTROUIR $A11Nl4

$A,.o30 J21tlfWJl J2 +1 1~~"E~flfCII 1+ I':,,:, -i_ . K I'

±IO + AlA lOT , 13 _ "'" WAllE OAIA '3l T:; ! l.li1.4 RfAn OA14 !~ I'I - MfM REA[) OAIA 'I

10 SAIOOoI DH\I/I; UNl Y

'0

JIG DAIsY CHA'N CONNlcrOR

,2 , '. : EAO AD 2

INDEX 2

~EAOY ,3

" , o V : 2 ,

Ell , , , , , EL , , 1EP :.

WRITE DATA :' wRIT GATE ,

" TRACK 00

" WRIT PR TE t· •

Mic;rpllrlnpnllS Hardware Information

J8 illustration

820·11 PARALLEL J8 P8 ·PAlNTER

-30 PB2 DATA STROBE 1-PAD DATA BIT 0

-6 PAl DATA BIT 1 2-

-8 I5A2 DATA BIT 2 3--10

PA3 DATA BIT 3 4-

-12 PM DATA BIT 4

5--14 PA5 DATA BIT 5

6--16 PA6 DATA BIT 6

7--18 PA7 DATA BIT 7 8--20 PB7 ACKNOWLEDGE 9--40

PB4 BUSY 10-

-34. PB6 ON LINE

11--38 PBO AUTO LF

13--26 GND. 14--37

GND. 16-

-1" GND. 19--5 GND. 20--7 GND. 21--9 GND. 22--11

GND. 23-

-13 GND.

24--15 GND. 25--17

GND. 26-

-19 27--21' GND.

28.-GND. -3 GND. 29-

-35 GND.

30--39

GND. 33..-

-28 36-

Miscellaneous Hardware Information 21

r---POWER SUPPlY

~2 P'JI ~3_

ACN , li2.SA

GND 1

~I I

'---

Power Supplies, and Video Connectors

IIAlNPWA

PS JS ~12VOC I 1,

.'2VDC CPU!: 2J.

tl2VDC !DISKI: 3 ± DC RET '4

DC RET : sl DC RET 6+

+ 12VDC ICAT~ 7+

.SVDC 8J. +5VOC 91.

J6 PI!

I~ I ;Y~~M GNP

J71 -9 .1, -8

J21 -I 12

JI PI t 12VOC P2

" + l'

~i-l:_!I-'U:2.,!;A!5E.!.T_L1.,r;::.~-+ 9 I t 5VOC t::i 7 I .S RET t::i 31

IRIGHTNESS CONTROL

I LH5.25" DISC DRIVE

J2 I, 2+ 1

: ·t i-' I

IIONITO!! PWA

JI PI

P2A , I

r-"1 I I.C2 ,hE2

I

RH 5.25" DISC DRIVE J2

'T 2J. .l 31

Miscellaneous Hardware Information

Parall~1 Port Connector (J8)

39 1 00000000000000000000

00000000000000000000 40 2

J8

Pin Value 2 Port A Strobe 4 PortA Ready 6 PortA Bit 0 8 PortA Bit 1

10 PortA Bit 2 12 PortA Bit 3 14 PortA Bit 4 16 PortA Bit 5 18 PortA Bit 6 20 PortA Bit 7 22 Port BReady 24 Port B Strobe 26 Port B Bit 0 28 Port B Bit 1 30 Port B Bit 2 32 Port B Bit 3 34 Port B Bit 4 36 . Port B Bit 5 38 Port B Bit 6 40 Port B Bit 7

Odd # Pins Ground

Miscellaneous Hardware Information 23

~~ri~-:;- FIRST PLUG (not used)

24 Miscellaneous Hardware Information

COMM Port Strapping Options

39 00000000000000000000 00000000000000000000

40

Pin 5--6 7··8

9--10 11··12 13--14 15··16 17--18 19··20 21--22 23··24 25--26 27··28 29--30 31··32 33--34 35··36 37--38 39--40

J9

Value (M) TXO to Pin 3 (T) TXO to Pin 2 (M) RXO from Pin 2 (T) RXO from Pin 3 (M) RTS to Pin 5 (T) RTS to Pin 4 (M) CTS from Pin 4 (T) CTS from Pin 5 (M) OTR to Pin 8 (T) OTR to Pin 20 (M) OCO from Pin 20 (T) OCO from Pi n 8

2

Clock supplied to Modem as RX Clock Clock supplied to SID with RX Clock Modem supplies SID with RX Clock . Clock supplied to SID with TX Clock Modem supplies SID with TX Clock Clock supplied to Modem with TX Clock

The filled-in pins indicate the options as they are jumpered on an 820-11 or 16/8.

Note: (M) indicates modem (data communications equipment) function. (T) indicates terminal data equipment) function. For instance, exercising the (M) strap option will allow communication with a modem; exercising the (T) strap option will allow communication with a terminal. The above shows factory settings for (T).

- "',"~ I'~~ ....... 'I ...... .J •.•• ~""_ .. I_S __ -.. .... +i.,..." .. .

. 29

30

. J9 (Etch 2 CPU)

000000000000000 000000000000000

Pin 3--4 5-,-6 7--8

(M) TXO to Pin 3 (T) TXO to Pin 2 (M) RXO from Pin 2 (T) RXO from Pin 3 (M) RTS to Pin 5 . (T) RTS to Pin 4 (M) CTS from Pin 4 (T) CTS from Pin 5 (M) OTR to Pin 8 (T) OTR to Pin 20 (M) OCO from Pin 20 (T) OCO from Pin 8

2

9--10 11--12 13--14 15--16 17--18 19--20 21--22 23--24 25--26 27--28 29-=30 Clock supplied to Modem as RX Clock

The filled-in pins indicate the options as they are jumpered on an 820-11 or 16/8.

Note: To change from ASYNC to SYNC on the Etch 2 CPU requ.ires a modification to the operating system rather than moving jumpers.

. .

Note: (M) indicates modem (data communications equipment) function. (T) indicates termioal data equipment) function~ For instance, exercising the (M) strap option will allow communication with a modem; exercising the (T) strap option will allow communication with a terminal. The above shows factory settings for (T).

26 Miscellaneous Hardware Information

System Bus Connector

J13

01 1 2 IRO 00 3 4 IMEMRQ 07 5 6 1I0RQ 02 7 8 IWR 06 9 10 IREFRESH 05 11 12 IM1 03 13 14 AO 04 15 16 A1

SYSRESET 17 18 A2 A4 19 20 A3 A6 21 22 AS

A15 23 24 A7 A13 25 26 A14 A12 27 28 Al0

A9 29 30 All A8 31 32 IBUSRQ

WAITRQ 33 34 IBUSAK PCI 35 36

IINTRQ 37 38 IHALT 39 40 ICLOCK SPKR 41 42 IMEM8

43 44 IMEM4 +12V 45 46 +12V 47 48 GNO GNO 49 50 +5V

Pin Pin S!lmbol # Name Meaning DO 3 Data bus Data Bus (Tri-state, inputJoutput, 01 1 Data bus active high) cbnstitutes an 8-bit 02 7 Data bus bi-directional data exchange 03 13 Data bus with memory and 1/0 devices. 04 15 Data bus OS 11 Data bus 06 9 Data bus 07 5 Data bus AO 14 Address bus Address Bus (Tri-state, output, A1 16 Address bus active high) makes up a t 6-bit A2 18 Address bus address for up to 65k bytes of A3 20 Address bus memory for 1/0 devices data A4 19 Address bus exchange. I/O addressing uses AS 22 Address bus the lower 8 bits for direct A6 21 Address bus selection of up to 256 output A7 24 Address bus ports. AO is the least significant AS 31 Address bus address bit. During refresh time, A9 29 Address bus the lower 7 bits contain a valid Al0 28 Address bus refresh address for dynamic All 30 Address bus memories. A12 27 Address bus A13 25 Address bus At4 26 Address-bus A 15 23 Address bus IWR 8 Write· Write (Tri-state, output, active

low) indicates that the CPU data bus holds valid data to be stored in the addressed memory or I/O device.

IRD 2 Read Read (Tri-state, output, active high) indicates that the CPU wants to read data from memory or an I/O device. The addressed 1/0 device or memory should use. this signal to gate data onto the CPU data bus.

IIORQ 6 I/O Request InputJOutput Request (Tri-state, output, active low) signal indicates that the lower half of

?R Miscellaneous Hardware Information

IHALT

IMEMRQ

IREFRESH

IMl

39

4

10

12

Halt

Memory Request

Refresh

Machine Cycle One

the address bus holds a valid I/O address for an 1/0 read or write operation. This signal is also generated with a "/M1" signal when an interrupt is being acknowledged to indicate that an interrupt response vector can be placed on the data bus. Interrupt Acknowledge operations occur during "/M1" time, while 1/0 operations never occur during "/M1" time .. Halt (Output, active low) signal indicates that the C;:PU has executed a Halt Software instruction and is awaiting either a non-maskable or maskable interrupt before operation can resume. Memory' Request (Tri-state, output, active low) signal indicates that the address bus holds a valid address for a memory read or memory write operation. Refresh (Tri-state, output, active low) indicates that the lower 7 bits of the address contain a refresh address for dynamic memories and the "/MEMRQ" signal should be used to perform a refresh cycle for all dynamic RAMs in the system. During the refresh cycle" AT' is a"logic zero and the upper 8 bits of the address bus contain the "I" register. Machine Cycle One (Tri-'state, output, active low) indicates that the current machine cycle is in the op-code fetch cycle of an instructi"on. Note

29

that during the e?<ecution of two-byte op-codes, "'M1" will be generated as each op-code is fetched. These two-byte op-codes always begin with a CB, ~O, ED, or FO. "1M 1" also occurs with ""ORQ" to indicate an interrupt acknowledge cycle.

IBUSAK 34 Bus Bus Acknowledge (Output, Acknowledge active low) is used to indicate to

the requesting device that the . CPU address bus, data bus, and

control bus signals have been set to their high impedance states and the external device can now control the bus.

IBUSRQ 3~ Bus Request Bus Request (Input, a~tive low) signal is used to request the CPU address bus, data bus, and c~ntrol signal bus to go to a high impedance state so that other devices can control those buses. When "'BUSRQ" is activated, the CPU will set these buses to a high impedance state as soon as the current CPU machine cycle is finished and the "'BUSAK" signal is activated.

IINTRQ 37 Interrupt Interrupt Request (Input, Request active low) signal is generated by

110 devices. A request will be honored at the end of the current instruction if the internal software controlled interrupt enable flip flop (IFF) is enabled and if the "/BUSRQ" signal is not active.

IWAITRQ 33 Wait Request Wait Request (Input, active low) indicates to the CPU that the addressed memory or 1/0 device is not ready for a data transfer. The CPU continues to enter wait states

30 Miscellal)eous Hardware Information

for as long as this signal is active. This signal allows memory or 1/0 devices of any speed to be synchronized to the cpu. Use Of this signal postpones refresh as long as it is held active.

ISYSREST 17 System Reset System Reset (Output, ~ctive low) indicates that a reset has been generated either from push button reset or the power on reset circuit. The system reset will occur only once per reset and will be approximately 10 microseconds in duration.

ICLOCK 40 Processor Processor Clock (Output, active Clock low) is a single-phase system clock

of4 MHz. PCI 35 Priority Priority Chain In (Input, active

Chain In high) is used to form a priority-interrupt daisy chain when more than one interrupt-driven device is being used .. A high level on this pin indicates that no other devices of higher priority are be~ng serviced by a CPU interrupt service routine.

IMEM4 44 . Memory Memory. Expansion Expansion (Output,.active low) signal is low

during "/MEMRQ" for a block of addresses from" 4000 thru 7FFF" if the Bank Switch is set for the ROM side of memory.

IMEMS 42 Memory Memory Expansion Expansion (Output, active low) signal is low

during "/MEMRQ" for a block of addresses from "sooo thru BFFF" if the Bank Switch is set for the ROM side of memory.

ISPKR 41 Speaker Speaker pin provides access to the speaker on the CPU Board. This pin is connected to the open collector output of the speaker

I\l1icrAIl::.nA"",c H:u.hM::.r", Infnrmrltinn 31

+5VDC 50 GND 49,48

+ 12VDC 47,45

36 38 43 46

32

DC Power Ground

DC Power

Not Used Not Used Not Used Not Used

driver (75451). This output is normally connected thru the speaker and parallel 100 ohm resistor to a + 12 VDC, but can be disconnected by jumper option. + 5VDC system power. Ground-System is signal ground and DC return. + 12VDC system p~wer.

Miscellaneous Hardware Information

Disk Access Connector

J12

01 1 2 IRO DO 3 4 IMREQ 07 5 6 IIORQ 02 7 8 IWR 06 9 10 IBUSAK 05 11 12 IMl 03 13 14 AO 04 15 16 Al

RST 17 18 A2 A4' 19 20 A3 A6 . 21 22 A5

A15 23 24 A7 A13 25 26 A14 A12 27 28 AI0

A9 29 30 All A8 31 32 IBUSRQ

16MHz Clock 33 34 IBUSAKl IHALT 35 36 11797CS

INT 37 38 PRIO PPS 39 40 4 MHz Clock PP2 41 42 PP4 PPl 43 44 PPO

+12V 45 46 NMl GNO 47 48 GND

OSKWAT 49 50 +SV 51 52 +5V

j 1-19 53 54 J 1-1 0 J 1-18 55 56 H-9 Jl-17 57 58 H-8 J 1-16 59 60 Jl-2 H-IS 61 62 Jl-3 J1-14 63 64 J1-4 H-13 65 66 H-5 J1-12 67 68 Jl-6 J 1-11 69 70 J1-7

71 72

.1 .. "' ••.• 1.£_ ... __ .. _ .. : __

Symbol

DO Dl D2 D3 D4 D5 D6 D7 AO Al A2 A3 A4 AS A6 A7 A8 A9 2Al0 All 2A12 A13 A14 A15 PPO PPl PP2 PP4 PP5 PRIO fDSKWAT fRD

fMREQ

Pin #

3 1 7

13 15 11 9 5

14 16 18 20 19 22 21 24 31 29

8 30

7 25 26 23 44 43 41 42 39 38 49

2

4

Pin Name

Data bus Data bus Data bus Data bus Data bus Data bus Qata bus Data bus Address Bus Address Bus Address Bus Address Bus Address Bus Address Bus Address Bus Address Bus Address Bus Address Bus Address Bus Address Bus Address Bus Address Bus Address Bus Address Bus SYS-PIO Port A SYS-PIO Port A SYS-PIO Port A SYS-PIO Port A SYS-PIO PortA SYS-PIO Disk Wait Read

Memory Request

Meaning

Data Bus (Tri-state. inputJoutput. active high) constitutes an 8-bit bi-directional data exchange with memory and 110 devices.

Address bus AO-A 15 provides addresses for 6Sk bytes of memory. Bit AO and A 1 while under fRD and IWR control select the register to receive transfer of data on DO-07: A1 AO fRO IWR o 0 Status REG Command REG o 1 Track REG Track REG

o Sector REG Sector REG . , 1 Data REG Data REG

AS while under fRO and IWR Control Select Density:

o = double density 1 = singledensity

Port A bit 0 Port A bit 1 ; PortA bit 2 PortA bit 4 PortA bit 5

Generates Wait signal to CPU. Controls input on the data registers 00-07. IMREQ indicates that the address bus holds a valid address for a memory read or memory write operation.

Mic;cp.llaneous Hardware Information

IIORQ 6 I/O Request IIORQ indicates that the lower half of the address bus holds a valid 1/0 address for an 1/0 read or write operation. IIORQ is also generated concurrently with 1M 1 during an interrupt ackn~wledge cycle to indicate that an interrupt response vector can be placed on the data bus.

IWR 8 Write Controls output on the data registers 00-07.

IBUSAC~ 10 Bus IBUSACk indicates to the Acknowledge requesting device that the CPU

address bus, data bus, and control signals IMREQ, IIORQ, IRO, IWR have entered the high impedance states. The external circuitry can now control these lines.

IM1 12 Machine 1M 1, together with fM REQ Cycle 1 indicates that the current

machine cycle is the op-code fetch cycle of an instruction execution. 1M 1, together with fIORQ, indicates an interrupt acknowledge cycle.

IBUSREQ 32 Bus Request IBUSREQ has the highest priority and is always recognized at the end of the current machine cycle. IBUSREQ forces the CPU address bus, data bus, and control signals IMREQ, IIORQ, IRD, and IWR to go to a high impedance state so that other devices can control these lines.

IBUSAKl 34 Bus IBUSAK 1 is daisy-chained Bus Acknowledge Acknowledge output which

indicates to the reqw~sting device that the CPU address bus, data bus, and control signals IMREQ, JlORQ, IRO, IWR have entered the high impedance states. The

Mi .. callaneow; Hardware Information 35

external circuitry can now control these lines.

I 1797CS 36 Chip Select 11797CS logic low selects the Floppy Disk Controller chip and enables computer communication with the device.

INT 37 Interrupt INT is generated by I/O devices. , Request The CPU honors a request at the

end of the current instruction if the internal software controlled interrupt enable flip-flop (IFF) is enabled.

NMI 46 Non-Maskable NMI is always recognized at the Interrupt end of the current instruction,

independent of the status of the interrupt enable flip-flop and automatically forces the CPU to restart at location 0066h.

IHAlT 35 .Halt IHAlT indicates that the CPU has executed a Halt instruction and is awaiting either a non-maskable or a maskable interrupt (with the mask enabled) before operation can resume. While halted, the CPU executes NOPs to maintain memory refresh.

16MHz 33 Clock 16 MHz clock. ClK 40 Clock 4 MHz clock. Jl-2 60 Device 110 All interface lines use

Interface negative logic. J 1-3 62 Device I/O Interface Jl-4 64 Device I/O Interface J 1-5 66 Device I/O Interface Jl-6 68 Device I/O Interface Jl-7 70 Device I/O Interface Jl-8 58 Device 110 Interface J 1-9 56 Device I/O Interface J 1-1 0 54 Device I/O Interface J1-11 69 Device I/O Interface J 1-12 67 Device I/O Interface J 1-13 65 Device I/O Interface J 1-14 63 Device I/O Interface

"Jh _Miscellaneous Hardware Information

J 1-15 61 Device 1/0 Interface J 1-16 59 Device 1/0 Interface J 1-17 57 Device 1/0 Interface J 1-18 55 Device I/O Interface J 1-19 53 Device 1/0 Interface +12VDC 45 DC Voltage + 12 Volts DC GND 47 Ground Ground and DC Return GND 48 Ground Ground and DC Return +5VDC 50 DC Voltage + 5 Volts DC +5VDC 52 DC Voltage + 5 Volts DC RST 17 Reset Reset indicates that a System

Reset has been generated either from push button reset or power on reset.

51 Not Used 71 Not Used 72 Not Used

. Mi<;rallilneolls Hardware Information 37

38

MAIN PW;" L.H.8" DISK DRIVE

Jl Pl . P1 Jl _ 4 ___ IN_D ... E .... X.....-_

L-

-22 DRIVE SEL 1 - 5 ....... ..;.;..0.=-.;;..;;;;.::;;'-"-

c-p-

-23 DRIVE SEL 2 - 6 ...=..:.:...:...:..:;=c..::..

3-R-

-24 READY 1 -17---=::':";':;;~- '"

4-

~--35 HEAD LOAD -8--;;;;';';';;;:;""':;:"""""--

1 .......

K--26 DIR SEL -9

9-u-

-27--S~T~E~P---10-~~--

"1-\1-

-28 WRITE DATA -11....;.;. ...... .:;...;;:;..:..;.,;~ 8---N-

=;~ WRITE GATE

-30 TRACK 00 2 -13 _~=-;....;:.o,,"-

19--X-0-Y-

- 341 WRITE PROTECT 2 -1

1---z-

-32 READ DATA ·2 -15' .

2--a-

-33 SID ~EL 2 -7--.;.;;; ........ ;;..:;:...~

3-H ........

-25----- 7--3----~ E~ -21-....... -.....-- 5-"-

1

P1 INDEX

DRIVE SEL 1

DRIVE SEL 2

READY

HEAD LOAD

DIR SEL

STEP

WRITE DATA

WRITE GATE

TRACK 00

WRITE PROTECT

READ DATA

SID SEL

R.H.8" DISK DRIVE

A Jl

L­lO­P-13-R-14-M-11-K-9-u-17-V-18-W-19-X-20-Y-21-Z-22-a-23-­H--7-

~-5-

Miscellaneous Hurdwilre Informiltion

MAIN PWA. L.r~. S.:!su DISK :JR!VE

J1 P1 _ 4 _~I:..;N:::.O:::.t:A:.;.' __

-22-~=-:-~­_ 0 _-,S;:;.oE;;.;L;;....-'.:...._

-23-~:=':"""~-_ 6 _....:S:::E::..:;;L:..:-2 __ _

-24 -'::::S':':'IO:-S:::-E:=":L~-- 7 ~---......... -----25-~-___ -_ 9 DIR SEL

-27 ~-S""'T--E-P---10--=-";"::';--

J1

D-4-E-5-F-6 -:--T-6-1-(-

g -----L-0-M-

-2B WRITE DATA 1 -11 ........ ..:.:.:..;~~..:.. ,-N-

-29 WRITE GATE 1 -12 ........ '""'""..-...... ...............

2-P-'

~30 TRACK 00 -13 --........ ---.; ........ -

3-R-=~1 WRITE P"ROTECT 1

-32 , 4--15 READ DATA

..... 33 -+~5:'-V:"':':[~)C:::--­-19 -+':"5~V"":"';:R~ET!:::---37 -18 _",,~'2:-Vof,::D,:,:":C=-~ -36' +12 RET

2 B/N5 "

=20==t

S-5 ----4-3-1~

7~

Miscellaneous Hardware Information

, J

P1 INDEX

SEL·'

!:5I=L-2

SID SEL

OIA SEL

STEP

WAITE DATA

WRITE GATE

TRACK 00

WRITE PROTECT

READ DATA

+5VDC +5V RET + 12VOC +12RET

I R.H •. 5.25" DISK DRIVE

A J1

0-4-. E-5-F-6-T-16-K-9-L-10-M-11-N-12-P-13-R-14-S--15-4-3-1-2-

39

Notes

40 Miscellaneous Hardware Information

Theory of Operation

The display processor houses the system board, disk drive daughter board, the CRT, the power supply, and one bus expansion slot.

The system board has the following:

CPU

• Central Processing Unit (CPU) • 6 to 8k of Read Only Memory (ROM) • 64k of Random Access (ReadIWrite) Memory (RAM) • Counter Timer Circuit (CTC) • Serial Input/Output Controller (SIO) • Parallel Input/Output Controller (PIO), • Two RS-232-C Serial 1/0 Ports • Dual 8-bit Parallel Ports • CRT Controller and CRT Refresh Memory • Speaker • Disk Drive Daughter Board Connector • Bus Expansion Connector

• 8086 Co-processor (1618 system) • Parallel Keyboard Interface

i ,I

The CPU is a Zilog Z80-A operating with a clock rate of 4 Mhz. It is initialized to use Interrupt Mode 2 by the ROSR monitor at power on. The Z80-A also provides refresh to the 64k of dynamic memory on the system board. Therefore, the I and R registers should not be altered by an application program.

ROM and RAM Memory The System Board has two banks, of memory. Bank 1 has 64k of RAM. Bank 0 has up to 8K of ROM.

When power is turned on or RESET is pressed, the Monitor, ROMICRT RAM (Bank,o), is enabled by the hardware and the contents of the monitor ROM are moved by the CPU to the program memory starting at location fOOOH. When the move is complete, the CPU transfers control to

A1

location FOOOH and RAM (Bank 1) is enabled. Bank 0 is also enabled when a character is sent to the screen.

6-8k ROM The CPU board has provisions for 4-2k x 8 Read Only Memory devices. The first 3 (U33, U34 & U35) store the firmware for the ROSR monitor. The fourth (U36) provides translation tables and related firmware for the position-encoded low profile keyboard.

64k RAM The 64k byte (65536 x 8) RAM provides space for a portion of the ROSR monitor (upper 4k FOOOh - FFFFh), and 60k (OOOOh - EFFFh) is free for programs to execute in such as an operating system and an application program. This RAM is dynamic and refresh is provided by the Z80-A CPU.

Counter Timer Circuit (eTC) The CTC has four independently-programmable counter/timer channels, each with a readable downcounter and a selectable 16 or 256 prescaler. Downcounters are reloaded automatically at zero. Each channel is­programmed with two bytes. Once started, the CTC counts down, reload~ its time constant automatically, and resumes counting. Internally, the CTC generates a unique vector for each channel.

SeriallnputlOutput Controller (S10) The Serial,l/O Controller has two independent, full-duplex channels with separate control and status lines for modems or other devices. Data rates are from 50 to 19,200 bits/second. Channel A (modem) supports both Asynchronous and Synchronous protocols. Channel B (printer) is dedicated to Asynchronous. The receiver is quadruple-buffered and the transmitter is double-buffered. The controller also supports daisy-chain interrupt vectoring for interrupts without external logic.

Serial I/O Ports The 820-11 CPU board contains a Z80-A SIO that provides two user­accessible serial ports to the 25-pin printer and modem connectors on the rear of the display processor. The Communications port is capable of operating in synchronous or asynschronous modes, while'the Printer port is only cap~ble of operating asynchronously. On an Etch 2 CPU, there is a 30-pin connector. Selection of synchronous or asynchronous mode is under program control as opposed to the Etch 1 CPU (with a 40-pin

.47 Theorv of Operation

connector) where a physical change is required to make the sync or async selection.

Parallel Input/Output Controller (PIO) There is a System and a General Purpose Parallel 110 Controller which provides direct interface between the CPU and the peripheral devices. Each controller has two 8-bit 110 ports. The System PIO is dedicated for keyboard input, memory bank and CRT font selection, and floppy disk drive and side selection. The General Purpose PIO provides the user with a dual 8-bit parallel 110 port for interfacing with peripherals.

Parallel Port The Z80-A General Purpose PIO is accessible on the main CPU board on connector J8. This PIO is programmed by the ROSR monitor at power-on to provide a parallel Centronics-compatible interface for a parallel printer. A transceiver is physically located between the Z80-A PIO and the J8 connector. Jumpers must be installed on option connector J 11 to select whether the transceiver will transmit or receive data. See also page 24.

CRT Controller The CPU board contains the 2k of refresh RAM where the characters that are to be displayed on the screen are stored. It also has the necessary electronics to provide the control signals (sync and video) to the CRT monitor. The CPU board has two character font ROMs; each font ROM contains two character sets.

US7 Normal white on black font Reverse video font

US8 Normal whi~e on black font Graphic chqracter font

I

The CRT driver in the ROSR monitor translates character-level escape sequences into commands as to which of the font ROMs to select and which of the two fonts inside the selected font ROM to select. Basically, characters that are stored in the CRT's refresh memory address the selected font ROM; the font ROM provides dot information to the video input of the CRT so the character can be displayed. .

ThoarH o-fI'Ioor"ltinn ... 4~

The characters on the CRT can have one of the following attributes:

Blink Inverse video Graphics Low intensity

The most significant bit of the character stored in the CRT's refresh memory determines if the character is to be displayed with its attribute enabled.

The ROSRmonitor provides a character-oriented command format for controlling the screen and font ROM selection. It is recommended that programs use this method to control the CRT and its attributes.

Theory of Operation

CRT RAM Memory Allocation The CRT RAM occupies 3000H - 3fFFH in bank 0 (System Bank). Each 80-character line on the CRT is allocated 128 bytes in the CRT RAM. Listed below are the starting and ending addresses for each of the 24 rows in the CRT RAM. The example (at the bottom) shows some character locations in CRT memory. (Assumes scroll register = 23)

Row Starting Address Ending Address

0 3000H 304FH 1 3080H 30CFH 2 3100H 314FH 3 3,180H 31CFH 4 3200H 324FH 5 3280H 32CFH 6 3300H 334FH 7 3380H 33CFH 8 3400H 344FH 9 3480H 34CFH

10 3500H 354FH 11 3580H 35CFH 12 3600H 364FH 13 3680H 36CFH 14 3700H 374FH 15 3780H 37CFH 16 3800H 384FH 17 3880H 38CFH 18 3900H 394FH 19 3980H 39CFH 20 3AOOH 3A4FH 21 3A80H 3ACFH 22 3BOOH 3B4FH 23 3B80H 3BCFH

Row Column CRT Memory Address

0 0 3000H 0 79 304FH 1 1 3081H 1 5 30B5H

23 0 3B80H 23 1 3881H 23 79 3BCFH

45

Scroll Register To eliminate the delay associated with software scrolling, hardware scrolling is employed. Writing into the scroll register (Port 14h) adds an offset to the line address developed by the line counter. Fqr instance, with an offset of zero (scroll register = 0), the data at locatjon 3000H (in the CRT refresh memory) will be displayed on the bottom row of the . display. If the offset is 23, the data at location 3000H will be displayed on the top row of the screen. The scroll register is loaded from AS to A 15 rather than 00 to 07. Therefore, the scroll value must be in the B register' if an indirect OUT instruction is used.

Scroll Register Row 0, Column 0 Row 23, Column 0 23 3000H 3BBOH

n 30BOH 3BOOH 21 3100H 3ABOH 20 31BOH 3AOOH 19 3200H 3980H 18 3280H 3900H 17 3300H 3880H 16 3380H 3800H 15 3400H 37BOH 14 3480H 3700H 13 3500H 3680H 12 3580H 3600H 11 3600H 3580H 10 3680H 3500H 9 3700H 3480H 8 3780H 3400H 7 3eOOH 3380H 6 3880H 3300H 5 3900H 32BOH 4 3980H 3200H 3 3AOOH 31BOH 2 3A80H 3100H 1 3BOOH 3080H 0 3BBOH 3000H

46 Theory of Operation

Speaker The 820-11 and 16/8 have an audio speaker connected to two I/O ports (28h and 29h). Outputting to one I/O port causes the speak~'!r cone to be pushed out; outputting to the other I/O port pulls in the speaker cone. The actual value output to these ports has no significance. To generate a beep, the application program can simply send an ASCII Bell character to the CRT. To generate a tone other than the standard bell character, the program must move the speaker cone in and out at the desired frequency.

Disk Drive Daughter Board The disk drive connector on the rear is a "dual personality" connector, depending on which disk drive daughter board is installed on the mother board. Presently; there are two types of disk interface:

Shugart SASI interface controller suitable for interfacing to a SA 14030 Rigid Disk Controller.

Floppy-only interface suitable for interfacing to Shugart SA800/SA400USA8S0/SA450 dual daisy-chained disk configurations.

The ROSR monitor detects which daughter board is installed at power-on and selects the appropriate physical disk driver firmware to process physical disk drive requests.

Caution: If a rigid disk drive unit (U07, U08) is connected to a floppy display/processor (U03JH69, U04), the rigid controller PWB will be destroyed when power is switched on. The rigid disk drive unit must be connected only to a rigid display/processor (U05/H70, U06). Connecting a floppy disk drive unit (929IT66/973/Fl 0, E41/E44/E42/E89) to a rigid display/processor (UOS/H70, U06) may c'ause the processor PWB to fail. Before connecting any disk drive unit to a display/processor, check that the configuration of the display/processor is compatible with the disk drive unit. The configuration can be determined in one of two ways. (1) Check the product code of the display/processor. The product code is the first three digits of the serial number, located on the underside of the display processor. (2) Verify that the proper drive interface PWB is installed by checking the part number. .

47

System Bus The System Bus contains an 8-bit Data Bus (Tri-state, Input/Output) bi­directional Data exchange with memory and I/O devices. It has a 16-bit Address Bus to address up to 64k of memory for 1/0 devices data exchange.

Keyboard Interface The keyboard FIFO (Etch 2 CPU only) has space for 16 (decimal) entries. Associated with the keyboard FIFO are input and output position pointers and a count of the number of entries curr'ently in the FIFO.

The available memory pointers provide the addresses bounding the available unused RAM in the memory reserved for system use. Although these pointers are a supported feature, there is no guaranteed available memory size.

There are twotables used to disk map a logical disk to its physical driver; The first table, Seltab, associates a logical disk number with a physical disk number; The second table, Drvtab, identi'fies which physical disk driver is appropriate to use with the selected physical disk.

The physical driver command block is a collection of all information necessary for the disk system to perform the requested disk activity.

The timer and clock variables are a collection of locations used for main.taining the one second timer and the time-of-day clock and calendar; The console command line buffer immediately follows these variables.

48 Theory of Operation

t.IoI.£U~~, _'tnJ-c6 -...,. ....... _.rl1 ....... g.a,.,cnwa-...- .... ~ • ... ~~ ... lt*""

~~::!.~';J u,..;.7w..77,; ....... ,.If. l' ...

~n~~..q,~~

U'5' S: " 56 62 .. -0 :

"'" U,J-~,s'.~.r' fir: ,. ~

VU 'I 1 ,

(IS' ~ 14

.. --~-~ U~'...wlI I_'~

~'''U'''''''''.",

E>i;;=:.o-..,.,~,{:sz~;:~ JrO".Dr".JlS~

.",.......~:

= ~

~ ~ iBr .~

~ ~

~':J .... • l..

- ~~----~----+-----------~ .JtJ·"S

~l·'" .~

I~: .•.. ...:;!"-------.L.--------..,.t .... I .....

".. JU ••

. :llili = ~ liUli ~

~ ~ ~ ~ m .N

-~ ~ Z • . .

~ ~ ---.0 ==-=--:= -0 --

~~ --- .. -. =<16 [

o

VI ,.... :::r til 3 CI ~. ,.... VI

[ .. r-- r:"":I . . .. · -.. , · .. "J .. Ny

,Jt . .. :l~ ::: ',- ~~ .... I

pU ... .. . -- . 1-< I .. . -~ · ~. . -.=0. ......

_UUr,J ...... .... . .... J,;;:.' ;-

... -~

-......

~ -:i;-

~ .. - tk"'~.~ -• ~I"-- . -.. .--'fCi"L_I~'lttJ

~ , . CII _ •• ,

.... ..,.. [D....!...---------.:...----~.~:_t__:'~;p.'---_I_...:=---~ ~ .... -1

...--' ...... '-!!!!I'" .... ~

.~.-~ G@~r.B~----------------------------------JL------------_r~~~

~6~C~~~~L-----------------~------------------~--------~~~~

VI f'\ ::r II> 3 ~. f'\ II'

V\ ,... ::r ttl 3 OJ ~. ,... '"

"".lI".c.-,1.!~~·-"'-' _____ -B:

.... *'

.n-flt "109 ..............

... I'" all -It .0-101. PI" ~ M!!2 ~.'$ ... --

"" .u

orr.

iiill

IA-S-. .., ... I.U-'

" ..

~"f1

J'"

::!.~D7 : ::::

... ,

".,

.!!t •• -1

£De ....

rf""'"-o .... + ......... ..,.,

-.,j

'.

... ·..c.;!CII'''''_-=-I • .."c-c, ..... ,...-,_ .... _ ,-..r51. ....... ~.\o .......... ~ ... , .... ~.o,c!.

• .... ·IC· •• ft •

.. .,·1' .• · .• :... : .. ! .• I''''''':X>':-;'.'A~!

~~~2:~I.;~~~i' u

u:::.·,r.J7·"i •• ,. ~'U •• ~ •••

~.~~.""U._ u!,.. .... I"'.r. r~

V" v" ... u.:.S •• t _ ...

IIJ1'I,JD'

• _.~..cC_"_5 ~,. lAIr , __ ,'-:;

ell IC ... ".~..:'I#._ ... ,., ~. -

E>::;r::;~~~~,:;;'...~~~ N7":'~'" MJWe._~

" ", " u '",

.& ..,w_--..crlnulIOI.lt i~J • SMIII ... ,. .. ,

"l1l..Sot: ~

:!Gr ~ ~ ~

~

~ ~ ~ 4>'-~ 7 ~

.­... .. :;:.~ ,­~ . ... .

.. .• "'!!!!-r--+_.L._-+--..l..--t---I

:.:~ -.....,'--I---------.....L---'."' .. ~ .. "." ~~_~~ __________ -=~ __ ~4

., ... ----..J ..... _-_. ~:..==3

~ ... -~ .III·"_U ,JI,·tU Jl1.",r ....... ~.~,

~

lSli .2!..!.!!I..L

~ fu ~

.lI/..I.a

~ ~ ~ ~ ~ ~c

••· ... IEl ...... +----!.·.!I :". )

.. 1 .... 1'·' [Dr""'''---- --I---t-1~I'----------.J ............ I£DI-'mm"'·=·---

ou

'"

IV o

__ ,-.c;",'W'-T"--

... 10,."

-- - -I

_~'_;~~i:¥=:¥gl'l

Specifications

Print Speed:

Character Set:

Printwheels:

Character Spacing:

Column Spacing:

Print Line:.

Print Buffer:

Paper Width:

Carriage Speed:

Tabulation:

Line Spacing:

Paper Feed:

20 & 40 CPS Printers

Up to 40 characters per second with metalized pri ntwheels.

88, 92, or 96 printable characters per printwheel. Switch-selectable program support for APL and all English language printwheels.

88, 92, 96 character Xerox - Metal 96 character Diablo - Plastic

la-pitch = 10 characters/inch (3.94 ch/cm) 12-pitch = 12 characters/inch (4.72" chiem) 15-pitch = 15 characters/inch (5.91 chiem) Proportional Space (PS) - see HMI, page 241.

1/120 inch (.21mm) minimum.

13.2 inches (33S.3mm) 132 columns la-pitch 158 columns 12-pitch 198 columns 15-pitch

2688 bytes.

16.53 inches (419.9mm) maximum - friction feed without Top Paper Out switch. 16.00 inches (406.4mm) maximum - friction feed with Top Paper Out switch. 15.25 inches (387.4mm) maximum - full width with optional forms tractor (14.75 inches/-374.7.mm between holes). 3.25 inches (82.55mm) minimum with forms tractor (2.75 inches/69.85mm between holes).

400 msec maximum fc;>r 13.1 inches (332.77mm) of motion.

Left or right.

1/48 inch (.53mm) minimum.

Bidirectional, except with unidirectional forms tractor and unidirectional pin feed platen.

251

Paper Feed Speed:

Paper Thickness:

Sensors:

Other Features:

Power Requirements:

Cabling Requirements

4 inches (101.6mm) per second plus 40 msec (typical) settling delay time .

. 000 - .0tO inch (.2S4mm) at low setting (1-3 part forms) .010 - .027 inch (.254 - .686mm) at high setting (4-6 part forms)'.

End of ribbon, paper out, and cover open.

Self test; host program control through escape sequences; data receive/transmit speed selection.

Strappable for operation from nominal 100, 120, 220, or 240 volt (+ 10%/-15%) AC inputs, 49-61 Hz. 350W maximum power consumption. Factory preset for 120 VAC. Check your printer's serial plate for proper input power.

A standard RS-232-C interface cable is required for connection between the screen and the printer. This cable must be equipped with DB-2SP connectors with the following pins connected:

PIN CCITT TELCO NO. DESIG. DESIG. DESCRIPTION

1 101 AA Protective Ground 2 103 BA Transmitted Data 3 104 BB Received Data 4 105 cA Request To Send 6 107 CC Data Set Ready * 7 102 AB Signal Ground

20 108 CD Data terminal Ready

* Pin 6 must be HI to receive or transmit data.

')0 1t /1('\ rpc;. 'Printl'>ro;.

1.0 INTRODUCTION

The SA 14030 Controller consists of a micrprocessor based controller with on-board data separator logic and is able to control a maximum of four drives. The drives can be any combination of Shugart SA 1000 fixed disk drives. SA800 floppy disk drives. or SA850 floppy disk drives. The floppy disk track formats are compati­ble with IBM 10/20 track formats. The SA 14030 can be mounted on the SAl 000 drive.

Commands are issued to the controller over a bidirectional bus connected to the host computer. The data separator/"serdes" logic serializes bytes and converts to FM/MFM data. and deserializes FM/MFM data in­to 8-bit bytes.

Due to the microprogrammed approach utilized in the controller. limited diagnostic capabilities are im­plemented. This methodology increases fault isolation efficiency and reduces system down time. Error jetection and correction will tolerate media imperfections up to 4-bit burs't errors.

:'-lOTE: This device utilizes neaative logic (i.e .. OV = logical 1)

1.1 SA1403D CONTROLLER FeATURES

OVERLAPPED SEEK

AUTOMATIC SEEK AND VERIFY

FAULT DETECTION

AUTOMATIC HEAD AND CYLINDER SWITCHING

DATA ERROR SENSING AND CORRECTION

LOGICAL TO PHYSICAL DRIVE CORRELATION

ON BOARD SECTOR BUFFER

EFFICIENT HOST INTERFACE PROTOCOL

SECTOR INTERLEAVE

000 PARITY

FIXED SECTOR SIZE

In multiple drive configurations the host can issue seeks to different drives without waiting for the fi rst drive to complete its seek.

A seek command is implied in every data transfer command (READ. WRITE CHECK. etc.). If the heads are not positioned over the correct cylinder. a seek is initiated and a cylinder verification is performed after the seek completes.

Three classes of fault detection are provided for fault diagnosis: 1) Disk related faults. 2) Controller related faults. 3) Host comma~d or 110 timing faults. Fault detection is available from the interface as a status message and is also visibly displayed on a row of status LED's on the controller PCB. .

If during a multi-block data transfer the end of a track is reached. the con­troller automatically switches to the next track. If the end of a cylinder is reached. the controller issues a seek and resumes the transfer.

. -If a data error IS detected during a disk data transfer. the controller indicates whether or not it is correctable. If correctable, it can be automatically corrected. (This applies to the SAl 000 only. CRC error detection is used on floopy disc drives.)

Logl~~. Unit Number (LUN's) are independent of physical port numbers. All accesses specify LUN's.

A sector buffer is provided on the controller to eliminate the possibility of data overruns during a data transfer.

A bidirectional bus between the controller and host provides a simple. yet effi­cient communication path. In addition. a high level command set permits effective command initiation.

Sector interleaving is programmable with up to a 16 way interleave.

The 8 data bits on the interface bus can have odd parity. Depending on user preference. parity can be disabled.

The sector size is fixed at 256 bytes of data for the SA 1000.

·SA 1403D Controller Reprint 253

~~UMBER OF DRIVES

The controller will connect to a maximum of four (4) drives. The drives can be any combination of SA 1000' S andlor SA850's andlor SA800's

1.1.1 OPTIONAL FEATURES

MICRO DIAGNOSTICS A set of diagnostic PROM's are available to allow stand alone diagnostic test­ing of both drive and controller. Reference Appendix A.

1.1.2 SYSTEM CONFIGURATION

The controller and data separator comprise a single PCB that can be mounted onto the SA 1000 drive. A max­imum of four (4) drives may be .connected as shown in Figure 2 ..

1.2 TRACK FORMATS AND CAPACITY

A) 32 sectors of 256 bytes per sector (SA 1 OOOonly). C) 26 sectors of 256 bytes per sector (Floppy only). 0) 26 sectors of 128 bytes per sector (Floppy only.)

IBM 10/20 TRACK FORMAT

Track format for Floppy Disk drives can be sel~cted under program control in real time. The track formats are: 1) Single density, single sided 2) Single density, double sided 3) Double density, single sided 4) Double density, double sided

SA800

SA850

SA1002

SA10Q4

26 SECTOR

2001

4003

N/A

N/A

32 SECTOR

N/A

N/A

16383

32767

TABLE I.

FormatlCaoacity Relationship MaxlmLlm Logical Sector Address Shown

2.0 SPECIFICATION SUMMARY

2.1 ENVIRONMENTAL LIMITS

Operating Storage

Temperature FIC 32°/0° to 131 °/55° -40°/-40° to 1670175°

Max. Wet Bulb 85°F non condensing

Relative Humidity 10% to 95% 10% to 95%

Altitude Sea level to 10,000 ft Sea level to 15,000 ft

254 SA 14030 Controller Reprint

2.2 POWER REQUIREMENTS

Three power supply voltages are required for the SA 1400 series controllers. The maximum current re­qUirements are as follows:

+ 5VDC :!: 5% at 4.6 Amps - 5VDC :!: 5% at 0.5 Amps + 24VDC :!: 10% at 0.1 Amps

Power is applied to the SA1400 series controller via J10 which is a 6 pin AMP Mate-N-Lok conl1ector (PIN 1-380999..Q) mounted on the component side of the board. The recommended mating connector, P10, is an AMP PIN 1-480270-0 utilizing AMP pins PIN 60619-1. The J10 pins are labeled on the connector. Figure 1 shows the pin assignments.

... 24V RETURN CD 0 4-... 24 VDC

·5VDC CD 0 . SV RETURN

... SV RETURN~ ® <D SVDC

I.!::=~=:::J

FIGURE 1. J10 DC POWER CONNECTOR

2.3 PHYSICAL PARAMETERS

Length: Width: Height: Weight:

13.7 inches (34.8cm) :t .030" (.076 cm) 8.25 inches (21 cm) :!: .010" (.025 cm) 0.5 inches (1 .3cm) :t .030" (.076 cm)

1.12 Ibs (0.5Kg) :t .010 Ibs (0.25 g)

3.0 SA1403D DISK DRIVE INTERFACE

Shugart.SA 1000 and SA8001850 disk drives are interfaced to the controller via J1 , J2, J3, J4 and JS. Refer to Figure 2 for connection blqck diagram.

HOST INTERFACE

SA14030 SERIES CONTROLLER

J6 50 PIN

SOCKET

Jl0 6 PIN

SOCKET

Jl 50 PIN EDGE

J2 20 PIN

SOCKET

J3 20 PIN

SOCKET

J4 .20 PIN : SOCKET

JS 20 PIN

SOCKET

CONTROUDA TA. SA I 000/SA800/SASSO

"',..,. ____ .1"' ... DATA SAl 000 ... .,r----"",

","'\._--, DATA '--"" .....

"'-..r-' SA1000 . L. __ ,..", ,.,,-1. ___ -.

DATA I ... ...r-., I I :...J" ....

"l . ,SAl 000 ,." -:'1 '---. ,." .... DATAl ...

'l"j, I '----"" ...

SAl 000 '----",."

FIGURE 2. SA1403D INTERCONNECT DIAGRAM

SA 14030 Controller Reprint 255

NOTE: The last physical device on the contrOl cable (drive to be terminated) must be an SA 1000.

J1 is a 50 pin edge type connector which connects all drives ill a daisy, chain configuration. This connector carries control and data information for the floppy disk drives and control information only for the SA 1000 disk drive. Maximum cable'length should not exceed 20 feet (6 meters).

The recommended mating clmnector for J1 is a 3M Scotchflex ribbon connector PIN 3415-0001.

J2 through J5 are 20 pin socket type connectors used to radially connect the SA 1000 data lines to the con­troller. Maximum cable length should not exceed 20 feet (6 meters).

The' r,ecommended mating connector for J2 through J5 is a 3M Scotchflex PIN 3421-3000. Figure 3 shows the pinouts for J1 and J2 through JS.

Jl SAl 000 SA800 SA8S0

1 2 ·IWSWITCH ·IWSWITCH

4

6

8 • SEEK COMPLETE

10 • TWO SIDED

12

14 • HEAD SEL 2° · SIDE SEL·,

16

18 • HEAD SEL 2' • HEAD LOAD • HEAD LOAD

20 • INDEX · INDEX • INDEX

22 · READY · READY • READY

24

26 • DRIVE SEL 1 · DRIVE'SEL 1 · DRIVE SEL 1

28 · DRIVE SEL 2 • DRIVE SEL 2 · DRIVE SEL 2

30 • DRIVE SEL 3 • DRIVE SEL 3 · DRIVE SEL 3

32 • DRIVE SEL 4 · DRIVE SEL 4 · DRIVE SEL 4

34 • DIRECTION SEL • DIRECTION SEL · DIRECTION SEL

36 • STEP · STEP · STEP

38 • WRITE DATA • WRITE DATA

40 • WRITE GATE • WRITE GATE · WRITE GATE

42 · TRACK 000 · TRACK 00 · TRACK 00

44 • WRITE FAULT · WRITE PROTECT · WRITE PROTECT

46 · READ DATA · READ DATA

48

49 50

J2 THROUGH J5

. DRIVE SELECTED 1 2 GROUND

4 I 51 6

7 8 GROUND

... TIMING CLOCK 9 10 • TIMING CLOCK

GROUND 11 12 GROUND

... MFM WRITE DATA 13 14 · MFM WRITE DATA

GROUND IS 16 GROUND

... MFM READ DATA 17 18 · MFM READ DATA

GROL/ND 19 20 GROUND

FIGURE 3. SA1403D DRIVE CONNECTOR PINOUTS

SAJ403DContro/ler Rpnrint

------------,-----_. __ .-

3.1 CABLE TERMINATION

The last physical drive at the end of J1 (50 pin) cable must be properly terminated. Termination networks are provided on the drives (refer to SA 1000. SA800 or SA850 OEM manuals for location of termination networks). Termination networks must be removed from all drives except the last drive on the cable to avoid multiple termination.

NOTE: If a combination of fixed and floppy drive are used., the last drive at the end of the control cable must be an SA 1000.

4!O HOST CPU INTERFACE

The SA 1400 series controller interface is a general purpose 8 bit parallel D MA.

The Host CPU is interfaced to the controller via connector J6t J6 is a 50 pin socket type connector. The· recommended mating connector'for J6 is a 3M Scotch flex ribbon connector PIN 3425-3000. The J6 interface cable should not exceed 20 feet (6 meters).

4.1 HOST CPU ELECTRICAL INTERFACE

All Host CPU interface signals are negative true. The signals are "Asserted" at 0 VDC to 0.4 VDC. The signals are "Deasserted" or inactive at 2.5 VDC to 5.25 VDC.

4.1.1 HOST CPU INTERFACE TERMINATION

All Host CPU interface timing lines are terminated with a 220/330 ohm network. The Host CPU adapter should be terminated in a similar fashion (see Figure 4).

The devices driving the controller inputs should be open collector devices capable of sinking at least 48 milliamps to a voltage level of less than 0.5 VDC (7438 or equivalent). ' ,

Jhe devices receiving the controller outputs s'hould be of the SCHMITT trigger type to improve the noise margin (74LS240. 74LS14. or equivalent). The Host adaptor should not load the bus with more than' stan­dard TTL input load per line.

SA' 4030 CONTROLLER

7438 2200

3300

2200

3300

FIGURE 4.

SA 14030 Controller Reprint

+5 +5

+5

TYPICAL INPUT

TYPICAL HOST AOAPTOR

7438

74LS240. 74LS14 OR EaUIVALENT

HOST ADAPTOR BUS TERMINATION

2

~-t1.2 HOST CPU SIGNAL INTERFACE

The Hos! CPU signals are interfaced via J6. See figure 5 for J6 pinouts.

J6 GROUND

2 • DATA BIT 0 (DBO)

4

6 2

8 3

10 4

12 5

14 6

16 • DATA BIT 7 (DB 7)

18 • PARITY BIT

20

22

24

26 FOR FUTURE USE

28

30

32

34

36 • BUSY (BSY) ... OUTPUT

38 • ACKNOWLEDGE (ACK) II INPUT

40 • RESET (RST) .. INPUT

42 • MESSAGE (MSG) .... OUTPUT

44 • SELECT (SEL) .. INPUT

46 • CONTROUDATA (C/O) .... OUTPUT

48 • REOUEST (REO) ... OUTPUT

49 50 • INPUT/OUTPUT (110) ... OUTPUT GROUND

NOTE: ALL SIGNALS ARE TIL NEGATIVE TRUE

FIGURE 5. J6 HOST INTERFACE CONNECTOR PINOUT

4.2 SA14030 HOST BUS

4.2.1 THEORY OF OPERATIONS

Disk commands are issued to the SA 14030 via the host bus following a defined protocol. The host initiates a command sequence by selecting the controller on the bus. If the controller is not busy, it requests command bytes from the host for task execution. (Command structure is described in 4.5). Depending on the type of command. the controller wilrrequest either 6 or 10 bytes. Upon reception of the last command byte, the con-troller begins execution of the command. .

258 SA 1403D Controller Reprint

For the data transfer commands. a check is performed on the disk address and status flagged if It exceeds tne drive limits. The data IS stored In a sector buffer before transfer to the host or disk drive. This buffer eliminates any possibility of data overruns between the host and the disk.

Upon completion of the command. the controller will send completion status to the host. Further delineation of the completion status may be requested by issuing the appropriate sense commands.

Odd parity is' generated by the SA 14030 for all information that it puts on the I/O bus. If ena,bled. the SA 14030 checks all information that it receives for odd parity.

4.3 SIGNAL DEFINITION

Unidirectional Signals Oriven By Controller

110

c/o

BUSY

MSG

Input/Output. When asserted. the data on the bus is driven by the controller; when deasserted. the data on the bus is driven by the host adapter. The host adapter will use this line to enable its drivers onto the data bus.

Control/Data. When asserted the data transmitted across the bus will be the command or status bytes; when deasserted the data will be the disk data bytes.

This bit is asserted as a tesponse to the SEL line from the host adapter and to indicate that the host bus is currently in use.

Message. When asserted indicates that the command is completed and status has been transferred. The assertion of this bit is always followed with the assertion cf I/O, and the assertion of REO, to cause a message byte transfer.

REO Request. This bit operates in conjunction with 1/0. C/O, & MSG. When asserted and 1/0 is asserted. REO will mean that the data on the host bus is driven by the contr.oller. When asserted' and 1/0 is deasserted, REO will mean that the data is driven by. the host adaptor (HI A).

1/0 C/O MSG Meaning

d a d Get command from H/A d d 'd Get data from H/A a d d Send data to H/A a a d Send status byte to H/A a a a Command done to H/A

TABLE 2.

a = asserted. d =. deasserted, H/A = host adaptor

4.4 UNIDIRECTIONAL SIGNALS DRIVEN BY HOST ADAPTOR

ACK Acknowledge. This bit is asserted as a response to REO from the controller. The timing re­quirements on this-signal with respect to thF' data is cescribed in REQuest section. ACK must be returned for each REQ assertinn

SA 1403D Controller Reprint

/.

259

RST Reset. Assertion by the Host causes the controller to cease all 9perations and return to an idle condition. This signal is normally used during a power up sequence. A reset during a write operation would cause incorrect data to be writter on the selected disk. The con­troller may take a maximum of 2 seconds to respond to the select sequence following deassertion of the RESET line.

SEL Select. When asserted indicates the beginning of the· command transaction. The H/A asserts SEL to gain the attention of the controller. Data bit zero on the host bus must also be asserted during SEL time to select the controller address. The controller will return BUSY within approximately 1tLs.

4.4.1 DATA BUS BITS 0·7 (DB)

These bidirectional data lines are used to transfer 8 bit parallel data to/from the Host adaptor. Bit 7 is most signifant bit. NOTE: All ifF lines utilize negative logic.

4.4.2 PARITY BIT

This bit is asserted to maintain odd parity on all data and status information transfered to the Host. If enabl­ed, the controller will test for odd parity on all command and data information transfered to the controller (see section 9:1).

4.5 HOST INTERFACE PROTOCOL

There are 4 sequences required to initiate and complete a command to the SA 14030 series controller:

1) Controller Selection Sequence

2) Command Transfer Squence

3) Data Transfer Sequence

4) Status and Message Transfer Sequence

4.5.1 CONTROLLER SELECTION SEQUENCE

In order to gain the attention of the controller it is necessary to perform a selection sequence. Refer also to Figure 6.

The Host must first test BSY to determine if the controller is available. If BSY is deasserted. the Host will assert data bit 0 (cortroller 10) and then assert SEL. The controller will then respond by asserting BSY. At this point the Host must deassert SEL and data bit O. 110 will remain deasserted throughout the selection se­quence.

4.5.2 COMMAND TRANSFER SEQUENCE

Following the selection sequence the controller will assert REO (see Figure 6). The Host will then place the first byte of the command descriptor block (see section 5.0) on the data bus. The Host will then assert ACK (if ACK is not asserted within 256 microseconds after the assertion of REO. the controller will abort the com· mand transfer sequence and attempt to transfer a status byte). The controller will respond by reading the byte on the data bus and then deasserting REO. The Host then must deassert ACK to begin the next I REO/ACK handshake. This handshake must be completed to assure that all command and data bytes are .. transferred.

260 SA 1403D Controller Reprint

Rev.-A

-' f-250 NS MIN --, 10~S MAX

· RST

. DB (J.7

• SEL ~ t-'I'S TV? D. -l I-460 NS MI'N (NOTE 11

l..j I . BUSY

690 NS MIN-l f-I I ~ · em

690 NS MIN --I I 1-1 =~~ ~~x I- -1 1-----460 NS MIN I ~ MINri I I

I W-l 1-0 NSMIN I NO MAX

. REO

. ACK o NS MIN I NO MAX 4

NOTE 1 ·2 SEC IMMEDIATELY AFTER" RESET

FIGURE 6. SELECT SEOUENCE TIMING

4.5.3 DATA TRANSFER SEQUENCE

Following the command transfer sequence, the controller will respond on one of four ways:

1) Begin seeking the drive.

2) Begin accepting write data from the Host.

3) Begin transferring read data to the Host.

4) Return status to the Host. .

If the command sent to the controller involves a data transfer (see Figure 7), the controller will deassert the C/O line to indicate a data transfer. If the data transfer is from the Host to the controller (write data) the 110 line will be deasserted. If the data transfer is from the controller to the Host (read data) the I/O line will be asserted. The controller will then set the REO line to request a byte transfer. The Host will respond by transferring a byte across the data bus and then asserting ACK (if ACK is not asserted within 256 microseconds after the assertion of REO, the controller will abort the data transfer sequence and attempt to transfer a status byte - see section 4.5.4). The Host will then deassert ACK and wait for the next assertion of REO. This handshake continues until all data has been transferred

SA 1403D Controller Reprint 261 Rev.-A

·c.o

:::J L690 NS MIN .

-I~--~~----------------------------------------------I . 110

• DB C).7 VA~IO

READ DATA TRANSFER SEOUENCE {CONTRO~~ER TO HOSTI

·ClO

·110 1--690 NS MIN.

{~--------~----~ I • ACK '-----i~--!l__·O MIN.

I-NOMAX.

WRITE DATA TRANSFER SEOUENCE {HOST TO CONTRO~~ERI

- F1GURE 7. DATA TRANSFER SE~UENCE TIMING

4.5.4 STATUS AND MESSAGE TRANSFER SEQUENCE

Following a command transfer or data transfer, the controller will initiate a status byte and completion message transfer.

When a status byte transfer is required, the controller will assert C/D and 110 (see Figure 8). The controller will then assert REO. The Host must then read the status byte on the data bus and then assert ACK (if ACK is not asserted within 256 microseconds after the assertion of REO, REO will be deasserted. REO will then be asserted again).The controller will then deassert REO. The host will then deassert ACK.

.. Following the s~atus byte transfer, a completion message byte of all zero's will be transfered to indicate operation complete. The controller will assert the MSG line (along with 1/0 and C/O) and then assert REO. The Host may read the completion message byte on the data bus and assert ACK (if ACK is not asserted within 256 microseconds, the controller will deassert the MSG line and attempt to transfer a status byte). The controller will respond by deasserting REO. The Host will then deassert ACK. At this pOint BSY and all other controller 1/0 lines will be deasserted and the controller will return to an IDLE LOOP awaiting the nexi­selection sequence.

262 SA 1403D Controller Reprint ._Rev.·A ..

• C/D

·1/0

• DB ().7

• REO

·ACK

VALID COMPL.

100 NS MIN.

--l 690 NS MIN. ~

~---------------I--~I ~ ·MSG

• BUSY . -

FIGURES. STATUS AND COMPLETION SEQUENCE TIMING

5.0 CONTROLLER COMMAND DESCRIPTOR BLOCK

Follow(ng the controller 'selection sequence the controller will request a command descriptor block (CDS)' which, depending on the class of command, may be either 6 or 10 bytes in length. The first byte of the CDS co~tains ~he command class and the command operation code. The re!!'Jalning b¥tes. specify the drive. logical unit number (LUN), logical sector address, number of ~ectors to be transfered or a destination device (Copy Command), and a control field byte.

Commands are categorized into four classes as indicated:

Class 0 Class 1 Class 2-5,7 Class 6

- Utility, Data Transfer and Status Commands - Disk Copy Commands - Reserved - Floppy Disk Track Format Selection

The command descriptor blocks in Command Class 0 and 6 are 6 bytes'long, and those in CI9-sS 1 are 10 bytes long.

The controller will check all incoming command descriptor blocks for validity ana will also check (if enabled) all COB's and data for odd parity (see section 9.1). A parjty error will cause an immediate halt of the com­mand or data transfer. This will not cause incorrect data to be written because the write does not occur until the sector buffer has been filled. An error in the command structure will cause a status byte transfer to occur' upon completion of the CDS transfer.

SA 1403D Controller Reprint

Rev.-A 263

5.1 COMMAND DESCRIPTION (CLASS 0)

*'* WARNING!"'* Commands READ and WRITE require that the floppy diskette used be formatted. If unformatted, the con­troller will appear to "hang" - i.e., continue waiting for a data address mark. (Reset to clear this condition if it should occur).

Opcode (Hex)'

00

01

02

Description

Test drive ready - Selects the drive and verifies drive ready. The ready condition is in­dicated by the status byte. A no~-ready drive .will cause bit 1 of the status byte to be set.

Recalibrate. Positions the RIW of selected drive arm to Track 00, clears error status in the drive.

Request Syndrome - returns two bytes of error offset and syndrom to the Host System for Host error correction capability (see Table 3). The first byte is offset in the data field of the error location. The most significant 3 bits of the second byte point to the beginning of the error location. The least significant 4 bits of the second byte are the syndrome which is a data correction mark to be exclusive or' ed with the faulty data. This command is only valid of the automatic data correction has been disabled.

MSB LSB

7 I 6 I 5 I 4 I 3 I 2 I 1 I O.

BYTE 1 BYTE OFFSET

BYTE 2 BIT OFFSET I 01 SYNDROME

TABLE 3

03 Request Sense. This command must be issued immediately after an error. It returns 4 bytes of drive and controller sense for the specified LU N: (See copy block for exception)

04 Format Drive. Formats all blocks with 10 field set according to interleave code. The data field contains E5 Hex.

05 Spare.

06 Format Track. "'Formats the specified track with bad block flag cleared in all blocks of that track. Writes E5 Hex in the data fields.

07 Format Bad Track "'(bad block flag). Formats the s'pecified track with bad block flag set in the 10 fields (bit 7 of the Head Address byte set). Writes E5 Hex in the data fields.

08 Read. Reads the specified number of blocks starting from initial block address given in the COB. (See Warning above!)

09 Reserved.

OA ~ Write. Writes the specified number of blocks starting from initial block address given in the COB. (See Warning above!) , .

OB Seek. Initiates seek to specified block and immediately returns completion status before the seek is complete for those drives capable of overlap seek.

The track is addressed via the logical sector address, which may be any address within the desired track.

jkA - ------ ------____ <:.ll_1.L1n~r:'\,("'I'·u·'I~ .. 1"'\ II "',. 0"' ..... : ... 010

5.1.2 COMMAND DESCRIPTION (CLASS 1)

Opcode (Hex)

00

Description

Copy Siocks. Copies the specified number of blocks from Source LUN starting at the specified Logical address to Destination LUN starting at the specified Logical address. The number of sectors transferred may be from 1 to 256. The completion status byte will in­dicate the source LUN. If an error occurs, a Request Sense command is issued to the source LUN. The sense will indicate the type of error for the appropriate LUN. Note the, data in the blocks will be truncated or appended with undefined data if the Source and Destination block sizes are not the same (e.g. Source block size - 128 bytes/sector, and Destination block size - 256 bytes/sector). '

5.1.3 COMMAND DESCRIPTION (CLASS 6)

Opcode (Hex)

00

Description

Define Floppy Disk Track Format. The Track format code in byte 6 of the CDS defines the track format for the LUN. The Track Format Codes are as follows:

Track Fcnnat Code (Hex) Description

00 Single Density, Single Sided. All tracks - FM recording, 128 bytes/sector, 26 sectors/track.

01 Single Density, Double Sided. All tracks - FM recording, 128 bytes/sector, 26 sectors/track.

02 Double Density, Single Sided. Side O. Cylinder a -FM Recording, 128 bytes/sector. 26 sectors/track. All other tracks· MFM recording, 256 bytes/sector. 26 sectors/track.

03 Double Density. Double Sided. Side A, Cylinder 0- FM recording. 128 bytes/sector. 26 sectors/track. All other track - MFM recording, 256 bytes/sec­tor, 26 sectors/track.

NOTE: If track format information for floppy is not specified after each reset or power-on. the default mode will be taken from the drive type selection dipswitch as follows:

Switch Setting Mode

OFF-ON Single density, single sided (same as track format code 00)

OFF-OFF Single density, double sided (same as'track format code 01)

Refer to Section 9.2 for switch setup instructions.

5.2 COMMAND FORMAT

SA 1403D Controller Reprint 265

5.2.1 CLASS 0 COMMANDS

byte #1

byte #2

byte #3

byte #4

byte #S

byte #6

7 I 6

0 0

LUN

I 0

5 4 I 3 I 2 t 1 J 0

opcode

logIcal adr2·· (MS)

logIcal adr 1 ••

logIcal adrO· • (LS)

number of blocks·

contro'·· •

• Interleave factor for Format, Check Track Format commands. ·"Refer to Section 5.5 Logical Address .

.... The control field is defined as follows:

'---..... --...1--""---....1.---.11...- I spare (set to zero)

'------- disable data· error correction = 1 L-________ disable retry = 1

CONTROL FIELD

5.2.2 CLASS 1 COMMANDS

266

byte #1

byte #2

byte #3

byte #4

byte #S

byte #6

byte #7

byte #8

byte #9

byte #10

7 6

0 0

o I LUN/s

o I LUN/d

5 4 1 .3 I 2 I , J 0

, opcode

logical adr2ls* (MS)

logical adr' Is *

logical adrO/s * (LS)

number of blocks

logical adr2/d* (MS)'

logical adr1/d*

logical adrO/d* (LS)

spare

control (section 5.2.')

where 's' indicates the source device and 'd' indicates the destination device. * Refer to Section 5.5 Logical Address

SA 1403D Controller Reprint

5.2.3 CLASS 6 COMMANDS

7 6 5 4 I 3 I 2 I. 1 I a

byte #1 1 1 a opcode

byte #2 LUN N/A

byte #3 N/A

byte #4 N/A

byte #5 N/A

byte #6 Track Format Code

NOTE: See Class 6 Command Description for more information and default modes for floppy drives.

5.3 STATUS FORMAT

5.3.1 Completion Status Byte Format

At the normal termination of a command or following a fatal error. the controller will cause a status byte to be transferred from the controller to the Host. Bit 0, the least significant bit of the status byte, will be set equal to 1 if the controller detects a parity error during a command o·r data transfer to the controller. Bit 1 will be set = 1 if the controller detects an error condition. Bits 5 and 6 represent the LUN of the device where the error occured. If no error occurs, bit a -4 will be set equal to O. .

Following the transfer of the status byte, the MSG line will be asserted to indicate a completion message. At this time the message consists of a single byte transfer with all bits set = O.

Prior to an error condition the controller, unless diabled (see section 5.2.1 Control Field), will retry 3 times before posting the error.

7

o

Bit a Bit 1 Bit 2-4 Bit 5-7

6 5 4

MS LS LUN

3. 2

spare (set = 0)

1 o

t t Parity error ~Error Parity error during transfer from host to controller .. Error occured during command execution. Spare (set to zero). Logical unit number of the drive.

SA 14030 Controller Reprint 267

5.3.2 DRIVE AND CONTROLLER SENSE BLOCK

Following an error indication from the status byte. the Host may perform a REQUEST SENSE command to obtain more detailed information about the error.

The REQUEST SENSE command will transfer a block of 4 bytes to the Host system.

byte #1 7 6 ·1

5 1

4 3 1 2 1 1 0

t 1 Error·code

Error type t spare (set to zero) Block address valid

byte #2

byte #3

byte #4

7 . 6 5

LUN

4 3 2

logical adr2*

logical adr1 •

logical adrO·

* Refer to Section 5.5 Log.ical Address

5.4 ERROR CODES

5.4.1 TYPE 0 (DRIVE) ERROR CODES

o 1 2 3 4 5 6

No error No Index Signal No Seek Complete Write Fault (SA 1000 only) o rive not ready Drive not selected (SA1000 only) No Track 00

5.4.2 TYPE 1 (CONTROLLER) ERROR CODES

1 0

o 10 read error. ECC or CRC (floppy) error in the 10 field (uncorrectable). 1 Uncorrectable data error during a read. 2 10 Address Mark not found (pOSSibly unformated disk). 3 Data Address Mark not found. 4 Record not found. Found correct cylinder and head but not sector. S Seek error. R/W head positioned on a wrong cylinder and/or selected a wrong head. 6 OMA Data time out error. No Host acknowledge within 256JLs. 7 Write protected. (SA800/850 only) 8 Correctable data field error. ECC error (automatic correction if not disabled). 9 Bad track found A Format Error. The controller detected that during the Check Track command. the format on

the drive was not as expected.

268 SA 1403D Controller Reprint

5.4.3 TYPE 2 (COMMAND) ERROR CODES

o 1

2

, Invalid Command received from the host. Illegal logical sector address. Address is beyond the maximum address for the type of drive. Illegal function for the specified drive.

5.5.4 TYPE 3 (MISC) ERROR CODES

o RAM error. Data error detected during Sector buffer RAM diagnostic.

5.5 LOGICAL ADDRESS

The logical address is computed as follows:

Logical adr = (CYADR * HDCYL + ~DADR) * SETRK + (SEADR)

Where: CYADR = cylinder address HDADR = head address SEADR = sector address HDCYL = number of heads per cylinder SETRK = number of sectors per track

Bit 0 at Logical adr 0 = the least significant bit. Bit 4 of Logical adr 2 = the most significant bit.

Note: All addresses begin with 00.

SA 14030 Controller Reprint 269

6.0 SECTOR INTERLEAVE CODES

In order to tailor host system data transfer speed to the disk rotational speed, sector interleaving is offered. Sixteen interleave codes are offered numbered 1 to 16. Not all interleave codes will result in optimum sector interleave, therefore the interleave should be chosen carefully. In order to maintain IBM floppy disk com­patibility in interleave code of 1 should be used. This will result in a non-interleave condition.

6.1 SELECTING THE RIGID DISK INTERLEAVE CODE

The interleave code given during the format command is used to calculate the logical sector number for the rigid disk as follows: Logical Sector = (Physical Sector x Interleave code) (mod 32). Note: when the logical sector number exceeds 31 the next logical sector is the lowest available physical sector. This does not always create a true modulo function.

Two examples of interleave codes are shown:

Interleave code of 2:

Physical: o 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Logical: o 2 4 6 8 1 0 1 2 14 1 6 1 8 20 22 24 26 28 30

Physical: 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Logical: 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31

I nterleave code of 11:

Physical:

Logical:

Physcial:

Logical:

270

o 2 3 4 5 6 7 8 9 10 11 12 13 14 15

o 11 22 12 23 2 13 24 3 14 25 4 15 26 5

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

16 27 6 17 28 7 18 29 8 19 30 9 20 31 10 21

Minimum Number Number of Diu Revolutions Time available to Transfer oile of Idle Seeton

Code Required to Read One Trac:k Byte of Data (including c:ontroller time) Between Reada

11 3 4.7f'S 2

8 4 7.0,,5 3

6 6 9.~5 4

5 7 1.1.7,,5 5

4 8 16.4,,5 7 0,

3 11 23.4f'S 10

2 16 35.1,,5 15

1 32 72.5f'S 31

• \tor SA 1400 series controllers operating with SAI000 series drives· double density. 32 sectors. 256 bytes/sector.) Note: Other codes will work. but require more revolutions of the disk to read all sectors of one track.

TABLE 3. INTERLEAVE CODE SELECTION CHART"

SA 14030 Controller Reprint

7.0 DIAGNOSTIC PHILSOPHY

7.1 BOARD RESIDENT MICRODIAGNOSTIC

Fault Isolation Microdiagnostic (Optional) The controller can be further checked out off-line by initiating explicit microdiagnostic routines via optional firmware diagnostic sets. The routines are initiated by a ·set of control switches. Errors will be dislayed in a set of LED's. Each microdiagnostic checks the funtionality of a particular section of the controller and is able to isolate failures in the following major categories: .

ALU Registers Sector Buffer ECC Logics

F~ult-isolation .techniques can be concentrated on the failing section.

SA 14030 Controller Reprint 271

8.0 STATUS LED ERROR INTERPRETATION

Drive/controlier error conditions are displayed on the 8 LED display lights provided near the J1 0 DC power connector (see Figures 11). The following list of hexadecimal numbered error codes describe error mean­ings. Note that these error codes do not necessarily match the request sense block error codes. LED number 7 is the MSB.

01 No Index Detected

02 No Track Zero Detected

03 Illegal Logical Sector Address - beyond maximum sectors available for type of drive

04 Drive Not Selected (SA10000nly)

OS No Seek Complete Detected

06 10 Address Mark Not found (unformatted)

07 . Data Address Mark Not found

08 Seek Error - R/W head not positioned on correct track

09 Record Not found - found correct cylinder and head but not sector

OA 10 ECC or CRC error (uncorrectable)

OB DMA Timeout Error - no Host acknowledge within 256ILsec after request.

OC Invalid Command Received from Host

00 Incorrect Data Address Mark

OE Incorrect 10 Address Mark

OF Incorrect Cylinder Address

10 Incorrect Sector Address

11 Incorrect Head Address

12 Uncorrectable Data Field ECC or CRC error

1 3 Correctable Data Field ECC error

, 1 4 0 rive Not Ready

15 Write Fault (SA 1000 and SA4000/4100 only)

16 Spare

17 Write Protected (SA800/8S0 only)

18 RAM Diagnostic Error

19-1 F Spare

20 Parity Error

21 Bad Sector found - a sector within a track that has been flagged bad has been found.

22 Invalid function for this drive type.

272 SA 1403D Controller Reprint

9.0 CONTROLLER OPTION SELECTION

9.1 PARITY SELECT JUMPERS

Odd parity may be used by the Host system for data integrity verification. The controller will always output odd parity to the Host system.

Odd parity checking by the controller may be allowed or inhibited by moving a 3 position jumper plug at W2 located near the J6 Host connector (see Figure 11). With jumper at position A + B the controller will test for odd parity on all data input to the controller. With jumper at positon B + C the controller will not check for parity (normally shipped in A + B).

9.2 DRIVE TYPE SELECTION DIPSWITCH

The dipswitch settings for various types of drives for the SA 14030 are shown below:

Prom Set AS30 -I, II, III, IV CUSTOMER FIRMWARE: (DIP SWITCH set-up procedure)

Location: 2H

Switch Bits

Field

Definition

EXAMPLE:

LOCATION: 23

8 7 6 5 4 3

LUN 0 LUN 1 LUN 2 Drive Drive Drive Type Type . Type ,.

Drive Switch

Type

0 1 2 3

8

Setting Description

Even

on on off off

7

LUN 0 Drive Type

on on

Odd

on SA1002 off SA1004 on SA800 off SA850

6 5 4 3

LUN 1 LUN 2 Drive Drive Type Type

off on on off

Drive 0 is set up for SA 1002 Drive' is set up for SA800 Drive 2 is set up for SA 1004 Drive 3 is set up for SA850

SA 1403D Controller Reprint

2

LUN 3 Drive Type

1

o F F

o N

2 heads, 256 cylinders 4 heads, 256 cylinders 1 head, 77 cylinders 2 heads, 77 cylinders

2 1

LUN 3 Drive Type

off off ,

o F F

o N

273

10.0 TRACK FORMAT DESCRIPTION

10.1 26 SECTOR FORMAT

The 26 sector format is an IBM compatible format which employes FM single density encoding on all tracks of the single density format (IBM 3740 compatible) and on track O. side 0 of the double density format. This format yields ~6 sectors of 128 bytes per sector.

The remainder of the tracks on the double density formats are encoded with MFM double density which yields 26 sectors of 256 bytes per sector (IBM system 34 compatible). Figure 9 shows the two type of en­coding utilized.

~rl~ ____________________________ ~1L REPeATED 26 TIMES (lea BYTES!

PAE INDEX INDEX INDEX GAP 1 S~~C 10 SEC! DATA DATA DATA

.. GAP SYNC AIo.I AM TRI< HO SEC LEN. CI'IC GAP 2 SYNC AM FIELD CRe GAPS GAP 4

HEX DATA FF 00 FC FF 00 FE X a x a x FF 00 FB X x FF FF

NU M. OF BYTES 40 6 I 26 6 1 1 1 1 1 2 II 6 1 128 2 27 247 INOM.I

WRITE UPDATE / I FM FORMAT IBM 3740

REPeATED 26 TIMES (372 BYTES)

PAE PAE PAE PAE INDEX INDEX INDEX INDEX GAP 10 10 10 SEC GAP DATA DATA OAT,.. DATA' UAP GAP SYNC AM AM 1 SYNC AM AM TRI< HD SEC LEN CRe 2 SYNC AM AM FIELD CRC 3 GAP 4'

HEX DATA 4E 00 AI FC 4E' 00 AI FE X x x 01 x 4E 00 AI FB X X 4E 4E

NU M. OF BYTES 80 12 3 1 50 12 3 1 I , , I 2 22 3 258 2 54 598

INOM.I

WRITE UPDATE

MFM FORMAT IBM SYSTEM 34

FIGURE 9. 26 SECTOR FORMAT - SASOO/S50

10.232 SECTOR FORMAT

The 32 sector format employs M FM encoding on all tracks of the SA 1000. This format yields 32 sectors of 256 bytes per sector. Figure 10 shows the 32 sector format.

~~ ________________ ~n~

DATA HEX NU

OFB 1.4.

YTE!

GAP I

4E

IS

WRITE UPDATE

274

PRE PRE SYNC 10 10 CYL H.I SEC ECC GAP 2 DATA DATA DATA ECC GAP 3 GAP~

_\ .... ---------REPEATEO 32 TII.4ES (31S BYTES)

AI.4 All- AI.4 AI.4 FIELD

00 Al FE X ·X x x 00 00 Al FB X X 00 00 4E

13 1 1 1 1 I 3 2 13 1 1 256 3 2 IS 352

(NOM.)

FIGURE 10. 32 SECTOR FORMAT - SA1000

SA 1403D Controller Reprint

11.0 DRIVE JUMPER SETTINGS

11.1 JUMPER SETTINGS FOR SA800/801 FLOPPY

The following information is contained in the SA800/801 Diskette Storage Drive OEM Manual, Shugart Associates, 1977.

Jumper Name Function (Enabled if Jumper Installed)

A Install enable DRSEL to drive selection

.8 Install, Head Load on Drive Select

C Remove, Drive Select loads heads

o Remove, In Use to LED is disabled

DC Remove, Disable Disk Change to return to controller

OS I nstall enable stepper on 0 rive Select

DS1-4 Install one only, DSi = LUN 0 (Drive Select)

HL Remove, Head load on Drive Select

L Jumper for -SV (remove for -1SV), controller requires -SV only

T1 Remove, Head Load terminator

T2 Install, Pullup for Drive Select lines

T3 Install, Direction terminator

T4 Install, Step terminator

TS Install, Write Data terminator

T6 Install, Write Gate terminator

X Install, Head Load Enable

Y Remove, Disable Hdld from driving LED

Z Install drive select drives in use LED

800 Install, enables 800 index only operation

801 Remove, disables 801 mode operation

11.2 JUMPER SETTINGS FOR SA850/851 FLOPPY

Jumper Name Function (Enabled if Jumper Installed)

Controller is compatible with the factory jumper configuration. See SASSO/SS1 OEM Manual.

Note: Jumpers must be set for SA8S0, not SASS1

11.3 JUMPER SETTINGS FOR SA1000 WINCHESTER

Jumper Name Function (Enabled if Jumper Installed)

Controller is compatible with the factory jumper configuration. See SA 1000 OEM Manual.

SA 1403D Controller Reprint 275

276

395" I""" • ....--- 9.90 CM ---.t

--""-~----f--------------e

J7 J8

13.49" L 15" 34.26 CM..... r- :38 CM

13.70" -r-- -e @- -------r-34.8 CM

6.52" 16.56 CM

0.24" ,0.6 CM

.l ~ lo ~

t 0.2'" 0.53CM~

I ~S I I ~4 I I J~ I

-6 I J2 I

I ~

DRIVE OPTION 111-1 OIPSWITCH (2H)

COMPONENT SIDE,

(PARITY) W1 c::::J

I J6 I

IIII1 1111IJ111 J,

o o o

STATUSg I.EO·S 0

o o

" 0.24" ~0.53CM

(2 PI.CS)

8.25" .... -------20.95 CM---------.j

AL.L TOLERANCES ± .003"

FIGURE 11. SA1403D DIMENSIONAL DRAWING

6.87" 17.45 CM

SA 14030 Controller Reprint

V\ » ~

t:>-o w 0 () 0 ::l r+ ..., 0

III ..., :;IJ

::!! III "0 G') ::::!. C ::l :D r+ m

..4

f'l (f)

» .t:-O W 0 T\ C Z 0 -i 0 Z » r m r 0 0 A 0 j; G) JJ » ~

Jl

i " "'''''D. l..f'.,JU;'

• ... ~J.D D .. . /, ~~'" . I ;-- ~.... • t"

J ~ .-111..... tJ ~i~ ~~! • 11,1,.::1' • ,

1 ~ 21'11" ••

~

i ~, ~'·"II.·I . ,.,. ., _'Y .:: I , /

~'M. J.: •• hk'IDI :'~I ........ I I

~ .", ...... I,s:..'''ri ~III!

! .: '.fI' ..... _ .... 1(1, •• .~

J4 · !H~:~! ;:~t'.:.

· ' s.ut~ liD2 U~'II'. JI · .. .,,,.: r J ' ., I • UI"~'.I: .,6~u:g

~ . l8rll Us!

i ., Ja·I'l.ul ~,

"" r • ",. ... ", . .. .. ~. .,," . 1 " . · . SUit"'" ~ .. ,'"

i ': "UN",IS .)'l/' Ld WU •• " , "~~

i • •• ,,, (U, I

f" J.'" fl.' '~"

".U'N"UP _I .. ,.n

... ~ ... ' ...... I

•• ...,...'0 "'. ua/sUA

IOn ~--t---f ...

~""" ..... t~,

N .~ ~ "" S.,,, ~\~~_+ \0((

l • ~ .. tCoW\I" !t--l.'!'.

(

n n,.AO. '''' ..

t fl.""." 'I", ~

........... lI! ......

IN"'" ""'II.a

{fIt

.~!. ~t1[iW t,l11I' 11\11'"

.,b

.

.. " I O(COI"C ~

I OUlpul ~ ""'Ill'

~--'

o . • r 1 I U 5

"I======~

81-----"-<; ~ I------"'-cl

,I/o

Notes

278 SA 1403D Controller Reprint

APPENDIX A

CP/M-SO 2.2 BIOS Programming Considf::rations

BIOS provides the operations necessary to access the disk drives and to interface with peripherals. The user interface with the'BIOS is through a series of Entry Points. These entry points are II Jump Vectors". Each jump address corresponds to a particular subroutine which performs a specific function. The Base ( + B for the jump vectors) depends on the size of RAM memory.

BIOS Cold Boot Entry Point: Function(s):

Argument(s): Value(s) Returned: Registers Saved: Errors Returned:

BIOS Warm Boot Entry Point: Function(s):

Argument(s): Value(s) Returned: Registers Saved: Errors Returned:

Appendix A

BIOS Entry Vector Table

(Bbase + 00) - Bios This entry is called only by the Boot Loader to initialize CP/M. None None None None

(Bbase + 03) - Bwboot Perform a Warm Start by reloading the CCP and BDOS from the disk in the A: drive, returning control to the CCP. None None None None in registers; however, message 'Boot Err' is displayed.

Al

BIOS Console Status Entry Point:

BIOS Console Input Entry Point: '

BIOS Console Output Entry point:

BIOS List Output Entry Point:

BIOS Punch Output Entry Point:

BIOS Reader Input Entry Point:

BIOS Home Disk Entry Point: Function(s):

Arguments: Value(s) Returned: Registers Saved: Errors Retu:rned:

A2

(Bbase + 06) - Bconst

(Bbase + 09) - Bconin

(Bbase + OC) - Bconot

(Sbase + OF) - Sprint

(Bbase + 12) - Bpunch

(Bbase + 15) - Breadr

(Bbase + 18) - Bhome Sets track number to zero in preparation for disk access. None None None None

Appendix A

BIOS Sel~d Disk Entry Point: Function(s):

. Arguments:

Value(s) Returned:

Registers Saved: Errors Returned:

BIOS Set Track Entry Point: Function(s):

Argument(s): Value(s) Returned: Registers Saved: Errors Returned:

BIOS Set Sedor Entry Point Function(s):

Argument{s): Value(s) Returned: Registers Saved: Errors Returned:

Appendix A

(Bbase + 1 B) - Bseld Select the requested logical disk. The drive that will be logged on in further operations is the default drive (or drive A if the default drive cannot be selected). (C) = drive to select (00 - OF) . (E) = even if media identification required (E) = odd if media identification

previously issued and no disks removed/replaced

(HL) = address of CP/M-compatible Disk Parameter Header if select successful

(HL) = 0 otherwise None None

(Bbase + 1 E) - Bsett Stores desired track number in preparation for a disk read or write record call. (BC) = track number None None None

(Bbase + 21) - Bsets Stores desired sector number in preparation for a read or write record call. (BC) = sector number None None None

A3

BIOS Set DMA Address Entry Point: Function(s):

Argument(s): Value(s) Returned: Registers Saved: Errors Returned:

BIOS Read Sector Entry Point: Function(s)

Argument(s):

Value(s) Returned: Registers Saved: Errors Returned:

BIOS Write Sector Entry Point: Function(s):

Argument(s):

Value(s) Returned: Registers Saved: Errors Returned:

BIOS List Status Entry Point;

A4

(Bbase + 24) - Bsetd Stores desired transfer address in preparation for a read or write a record call. (BC) = transfer address None None None

(Bbase + 27) - Bread Transfer one 128 (decimal) byte record from the selected disk to the current OMA transfer address. Bseld, Bsett, Bsctrn, Bsets, Bsetd previously called. None none (A) = (A) =

00 if no error FF if error

(Bbase + 2A) - Bwritt Transfer one 128 (decimal) byte record from the current OMA transfer address to the selected disk. Bseld, Bsett, Bsctrn, Bsets, Bsetd previously called. None None (A) (A) =

00 if no error FF if error·

(Bbase + 20) - Bprnts

Appendix A

BIOS Sector Translate Entry Point: Function(s):

Argument(s):

Value(s) Returned:

Registers Saved: Errors Returned:

Appendix A

(Bbase + 30) - Bsctrn Translate a logical sector number into a physical sector number in preparation for a call to Bsets, the BIOS set sector call: (BC) = Sector number

(0 < = (BC) < sectors per track (DE) = Skew table address obtained from

the CP/M Disk Parameter Header (HL) = (BC) if (DE) = 0 (l) = [(DE) + (BC)) if (DE) = 0 (H) = (B) should be 0 None None

AS

Notes

A6 Appendix A

APPENDIX B

Monitor Entry Vector Table

FOOOH F003H F006H F009H FOOCH FOOFH F012H F01SH F018H F01BH F01EH F021H F024H F027H F02AH F02DH F030H F033H F036H F039H F03CH F03FH F042H, F04SH F048H F04BH F04E!"l FOS1H FOS4H FOS7H FOSAH FOSDH F060H F063H F06G,", F069H

Appendix B

Cold start monitor Warm start monitor Keyboard status Keyboard input CRT output

. Fast CRT output from C 510 channel B input status 510 channel B input 510 channel B output Drive select Home r/w head Seek to track Read sector Write sector Execute physical driver request Set direct CRT cursor Direct CRT display CRT memory block move Return address of disk mapping table Return address of day variable Return configuration status 510 channel B output ready status Set configuration Start screen print Accessible 1-second interrupt Console status through iobyte Console input through iobyte Console output through iobyte Printer output through iobyte Printer status through iobyte Communications input ready status Communications input data Communications output data Communications output ready status Idle while i/o is pending Record soft error

B1

Notes

B2 Appendix B

APPENDIXC

Documented System Storage and Structures

Z80-A Mode 2 Interrupt Vectors

FFOO SIOVO: DEFS2 ;Z80-A 510 port B xmit buffer empty FF02 SIOV1: DEFS2 ; Z80-A SIO port B external/status change FF04 SIOV2: DEFS2 ;ZBO-A SIO port B receive data available FFOG SIOV3: DEFS2 ;Z80-A 510 port B special receive

condition FFOa SIOV4: DEFS2 ;Z80-A 510 port A xmit buffer empty FFOA SIOVS: DEFS2 ; Z80-A 510 port A external/status change FFOC SIOV6: DEFS2 ;Z80-A 510 port A receive data available FFOE SIOV7: DEFS2 ; Z80-A 510 port A special receive'

condition

FF10 CTCVO: DEFS2 ;Z80-A CTC channel 0 interrupt FF12* CTCVl : DEFS2 ;Z80-A CTC channell interrupt FF14 CTCV2: DEFS2 ;Z80-A CTC channel 2 interrupt FF1G* CTCV3: DEFS2 ;Z80-A CTC channel 3 interrupt

FF18 SYSVA: DEFS2 ;System Z80-A Pia port A interrupt FF1A* SYSVB: DEFS2 ;System Z80-A Pia port B interrupt

FF1C GENVA: DEFS2 ;General purpose Z80-A Pia port A interrupt

FF1E ' GENVB: DEFS2 ; General purpose Z80-A Pia port B interrupt

"'Vectors used by the Monitor ROM

Keyboard Data Input FIFO Variables

FF20 FF30 FF31

• FF32

FF33

fifo: fifcnt: fifin: fifqut:

AppendixC

defs 16 defs 1 defs 1 defs 1

defs 1

;Console input fifo ; FIFO data counter ; FIFO input pointer ;FIFO output pointer'

; Round address

C1

More Interrupt Vectors

FF34 expvec: defs 8

Available Memory Pointers

FF3C FF3E

availb: defs 2 availt: defs 2

;Space for 4 vectors for expansion slot

; Bottom of available memory ;Top of available memory

End of documented storage locations

Logical to Physical Drive Mapping Tables Seltab contains two bytes per logical CP/M drive A-P. The first byte is an index into the physical driver address table (see next table). The second byte is a unit number that is passed to the driver by the XQDVR dispatcher. '

Seltab:

A: defb 1,0 ; Floppy unit ° B: defb 1,1 ; Floppy unit 1 C: defb 1,2 ; Floppy unit 2 D: defb 1,3 ; Floppy unit 3

E: defb 1,4 ; Rigid partition ° F: defb 1,5 ; Rigid partition 1 G: defb 1,6 ; Rigid partition 2 H: defb 1,7 ; Rigid.partition 3 I: defb 0,0 ; Error driver J: defb 0,0 ; Error driver K: defb 0,0 ; Error driver l: defb 0,0 ; Error driver

M: defb 0,0 ; Error driver N: i defb 0,0 ; Error driver 0: defb 0,0 ; Error driver P: . defb 0,0 ;Error driver

C2 Appendix C

Physical Driver Address Table Drvtab contains the addresses of several independent physical disk drivers. By convention, driver number 0 always returns a select error. Unused entries in Seltab should point t~this trivial driver.

Drvtab: defw Selerr ;Select error physical driver defw Dskdvr ; Disk driver (WD or SA) defw 0 ; Empty physical driver

; Expansion slots

defw 0 defW 0 defw 0 defw 0 defw 0-1 ;Mark last entry

Physical Driver Request Block

db command ;FF = Select ;00 = Write ;01 = Read

ds ; For system use db Ldrive ; Logical drive for request (00 - OF) dw Track ;Track number for request dw Sector ;Sector number for request dw Address ;Address of sector buffer for request

AppendixC C3

Time-of-Day and Timer Variables

Milsec: ds 2 ; Location incremented by CTCl ; Interrupt

ds 2 ;(unused) " Ticker: ds 2 ; Increments once per second Steprt: ds 1 ;WD1797 step rate Motor: . ds ; Disk motor/select timeout (1 Hz)

HL-+ Day: ds ;01-31 Month: ds ;01-12

Year: ds ;80-99 Hour: ds ;00-23

Minute: ds 1 ;00-59 Second: ds 1 ;00-59 Linbuf: ds 80 ;Line buffer

C4 Appendix C

How To Make Monitor Calls from Basic Several of the monitor function calls return the value in the HL register if the H register equals 0, or return the value at the address pointed to by the HL register if the H register is not zero. This convention allows Microsoft Basic Users to access these functions directly. The examples listed in this section demonstrate this feature of the ROSR ROM.

100 110 ' Make 820-11 Monitor call to get address of day variable, then 120 ' Print Day, Month etc. 130 140 DATA Day,Month,Year,Hour,Minute,Second 150 160 DEFINTI 170 GEnOD = &HF039:CALL GEnOD(I) 'Return Add. of Day, 180 FOR X = 0 TO 5 190 READ X$ 200 PRINT USING "\ \ ##;X$,PEEK(I + X) 210 NEXT X 220 END

100 110 ' Do configuration status call & print value returned 120 130 DEFINT I 140 GETCON = &HF.03C:CALL GETCON(I) 'Get config status 150 PRINT CHR$(26); 'Clear Screen 160 PRINT "The configuration status word is - "; 170 PRINT HEX$(I); 180 PRINT" (Hex)" 190 END

Appendix D 01

100 ' Example Using Line Delete To scroll screen u·p. 110 ' Make 820-11 Monitor Call to get address of day variable 120 ' then calculate address of line input buffer variable. 130 140 ' Clear screen, fill screen with characters, position 150 ' Cursor back on top line, send line delete code to CRT, 160 ' This moves the line deleted from the top of the s~reen 170 ' To the input buffer. 180 190 ' Recall deleted line from line input buffer & display 200 • on line 23 ot'the screen. 210 220 230 WIDTH 255 240 PRINT CHR$(5);" "; 'Remove cursor 250 DEFINT I 260 GETTOD = &HF039:CALL GETTOD(I) 'Get address !=If Day Variable 270 I = I + 6 'Line input buffer is at Day + 6 280 PRINT CHR$(26); 'Clear screen 290 FORX= 1 TO 23 300 PRINT S:rRING$(80,CHR$(X + 64»; 'Fill Screen 310 NEXTX 320 330 FOR M = 1 TO 100 .. 'Do 100 lines 340 PRINT CHR$(30); 'Put Cursor back on top line 350 PRINT CHR$(27);" R"; 'Do line delete, move deleted 360 'Line to buffer. 370 PRINT CHR$(27);" = ";CHR$(32 + 22);CHR$(32) 380 FOR X= 0 TO 79 'Now print characters back from 390 . PRINT CHR$(PEEK(I+ X); 'Input buffer 400 NEXT X 410 NEXT M 420 PRINT CHR$(26);CHR$(5);CHR$(2); 'Clear screen and 430 Restore Cursor. 440 END

02 Appendix 0

100 ' Example Using Line Insert To scroll screen down. 110 ' Make 820-11 Monitor Call to get address of day variable 120 ' then calculate address of line input buffer variable. 130 140 ' Clear screen, fill screen with characters, position 150 ' Cursor bar.k on top line, send line insert code to CRT, 160 ' This moves the line deleted from the bottom of the screen 170 ' To tl,e input buffer. 180 190 ' Recall deleted line from line input buffer & display 200 ' on the first line of the screen. 210 220 230 WIDTH 255 240 PRINT CHR$(5);" "; 'Remove cursor 250 OEFINT I 260 GETTOO = &HF039:CALL GETTOO(I) 'Get address of Day Variable 270 I = I + 6 . 'Line input buffer is at Day ... 6 280 PRINT CHR$(26); 'Clear screen 290 FORX= 1 TO 23 300 PRINT STRING$(80,CHR$(X + 64)); 'Fill Screen 310 NEXTX 320 330 FOR M = 1 TO 100: 'Do 100 lines 340 PRINT CHR$(30); 'Put Cursor back on top line 350 PRINT CHR$(27);" E"; , Do line insert, move deleted 360 'Line to buffer. 370 PRINT CHR$(27);" = ";CHR$(32 + 22);CHR$(32) 380 FOR X = 0 TO 79 'Now print characters back from 390 PRINT CHR$(PEEK(I + X);. 'Input buffer 400 NEXTX 410 NEXTM 420 PRINT CHR$(26);CHR$(5);CHR$(2); 'Clear screen and 430 Restore Cursor. 440 END

Appendix 0 03

Bank Switchin.g

• The Bank control switch is bit 7 of port lC. Bit 7 = 0 = Bank 1 (RAM) Bit 7 = 1 = Bpnk 0 (ROM) .

• Change bit 7 only: Bits 0 through 6 should be maintained.

• Bank 0 and 1 are mutually exclusive; data movement to or from one bank will not affect the other.

• When bank switching, the driver code must be executed at COOOh or above; the upper 16K (COOOh-FFFFh) is common memory to both banks.

For example,.

DI IN A,(lCh) SET 7,a EI OUT (1 Ch),a .

DI IN A,(lCh) RES 7,a EI OUT (lCh)

D4

;read port ;set bit

;output

;reset bit

Appendix D .

I m ' ..... I

Baleones Operati"y ~ystem for the XEROX 820-11 MACRO-80 3.44 09-Dee-81

I 2 3 4 5 6 7 8 9

10 11 12 13 14 15 16 0191 17 18 19 20

; i

rev

t it Ie .z8D

Baleones Operating System for the XEROX 820-11

Baleones Operating System for XEROX 820-11.

Copyright 1982 (C) Baleones Computer Corporation

All rights res~rved

Robert Burns. Bee.

defl 401

subttl Symbol Definitions page

m Balcolles Ope,-a t i 118 System fur tile XEROX 820-11 MACRO-BO 3.44 09-Dec-BI N Symbol Definitiulls

21 22 fFFf true equ -I 23 0000 false equ not true 24 25 OOOU debug equ false ,assemble ram loader 26 27 , , Absolute Memory Addresses. 28 29 DODD rom equ 01000h and debug,non resident code base 30 1800 romsiz equ OIOOOh+«not debug) and 0800h) 31 1800 Rxl984 equ 01800h ,prescription for the future 32 0800 Lxl984 equ 00800h ., length of fut"ure 33 0003 iobyte equ 00003h , i/o byte 34 0080 boot I d equ OOOBOh ;boot loader address 35 ED8D bootbf equ OedBOh ,boot loader buffer 36 FFOn ram equ OffOOt, ,system ram page address 37 FOOD monitr equ OfOOOh ,resident monitor address 38 3000 crtme," equ 03000h ,crt memory address 39 3COO crtmax equ crtmem+24*128 .crt maximum address 40 0030 crtbas equ high crtme," ;starting page of display ram 41 003C crttop equ high crtmax ;ending page of display ram 42 43 , , I/O Port Addresses. 44 45 O(lOll bauda equ DOh ,channel a baud rate generator 46 0004 .siodpa equ 04h ;sio data port A (communications) 47 0005 siodpb equ 05h ;sio data port B (printer) 48 000t' siocpa equ 06h ,sio control/status port A 49 0007 siocpb e':lu 07h ;sio control/status port B 50 0008 gpioda equ 0811 ,gene,'a I purpose para I I e I i/o A data 51 0009 gpioca equ 09h ,general purpose parallel ilo A control 52 OOOA gpiodb equ Oah ,general purpose parallel ilo B data 53 00013 gpiocb equ Obh ;general purpose para I I e I ilo B control 54 DOlle baudb equ Oeh ;channel b baud rate generator 55 DOlO wd 1797 equ 10h ;western digital disk controller base 56 0014 scro I I equ 14h ;crt bottom line scrol I register 57 001U ctc equ 18h ;quad counter/timer circuit 58 0018 ctcO equ 18h ,ctc channel 0 (user) 59 0019 ctci equ 19h ,ctc channel I (msec, screen print) 60 OOIA ctc2 equ lah ,ctc channel 2 (one second presca I er) 61 00 IEl ctc3 equ lbh ,ctc channel 3 (one second) 62 ODIC syspio equ Ich ;system pia data 63 DOlO sysctl eqlJ Idh ;system pia control 64 ODIE kbcldat equ leh ,keyboard data 65 OOIF kbdctl equ If 11 ;keyboard control 66 00211 be II of eqll 28h , turn t)e I I off 67 0029 be lion equ 2911 ; turn be I I on 68 0030 slsclen equ 3m, ;select single density 69 0031 sidden equ 31h ;select double density

:t> 70 0034 chroml equ 34h ;select ROM I character generator 71 003t) ctlrom2 equ 35h ;select ROM 2 character generator

-0 72 DO::!!) lowlite equ 361. ; s·e I ec t low intensity attribute -0 ttl 73 0068 async equ 68h ;set internal clocks for asynchronous sio A :J 74 0069 sync equ 6911 ,set external clocks for synchronous slo A a. 75

>< m

}> "0 "0 I'D ::J 0.. >< m

m W

Balcones O!-,erat ill;) ~ystelll for tlH: XEROX 820-11 Syllluol Definit illllS

MACRO-80 3.44 09-Dec-81

76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 9] 94 95 96 97 98 99

100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 12B 129 130 131

UOU7 0006 0004

OOU4 OOOA 0000 0011 0013 OOIB OOIA

OOIE OOGE 009B

0035 0061 0061

BOOO 4000 2000 1000 0000 0400 0200 0100 OOUO 0040 0020 DOlO 0000 0004 0002 0001

0000 0000 0000 0000

BFFF

c.keym c.sasi c.five

; . eot If cr xon xoff esc c I rs

; ;

Configuration Status Byte Bit Defin1tions.

equ equ equ

Ascii.

7 6 4

equ 04h equ Oah equ Odh equ II h equ 13h equ Ibh equ lah

Special Key Constants.

:Keyboard upper bit is passed :Shugart SA-1403D Disk Controller :Five inch micro floppies

:ascii end of text :asci i line fee·d. :ascii carriage return :ascli Xon :ascii Xoff : asc i i '~scape :clear screen

Helpkey equ Scrprt equ Abort equ

Oleh 0geh 09bh

:Screen Print key CTRL <HELP> ;Automatic Abort CTRL <ESC>

i; Bell Constants.

bit im blonc blofc

equ .equ equ

35h 61h 61h

;bell loop time : be I I on time ;uell off tillle

;: Assembly Options.

o.resv o.auto o.help o.prot o.ddvr o.baud o. inpc O.outc o.verf o.ramt o.disk o.esct o.type o. f i I I o.lIlove o. term

equ equ equ equ equ equ equ equ equ equ equ equ equ equ equ equ

options defl options (lefl options defl options (lefl

options defl

1000000000000000b OIOOOOOOOOOOOOOOb OOIOOOOOOOOOOOOOb OOOIOOOOOOOOOOOOb OOOOIOOOOOOOOOOOb OOOOOIOOOOOOOOOOb OOOOOOIOOOOOOOOOb OOOOOOOIOOOOOOOOb OOOOOOODIOOOOOOOb OOOOOOOOOIOOOOOOb OOOOOOOOOOIOOOOOb OOOOOOOOOOOIOOOOb OOOOOOOOOOOOIOOOb OOOOOOOOOOOOOIOOb OOOOOOOOOOOOOOIOb OOOOOOOOOOOOOOOlb

:reserved ;auto boot A: ; tIe I p command ;printer protocol ;dlsk drivers ;baud rate set command ; in command ;out command ;verify memory block ;simple ram test ;console disk read/write ;escape command table ;typewrlter mode ;fill memory ;move memory ;terminal scroll driver

debug options options options

and not o.ddvr and not o.esct and not o.disk and not o.resv and not o.verf and not 0.fl11 and not o.ramt

(not debug .or o.esct) alld not o.auto

;; configuration sector offsets.

commands

» "0 "0 ttl :J 0... >< m

B .. lcones Operatin!j System for tile XEROX 1l20-I1 Syml)o I Def ini t i lIllb

132 133 134 135 136 137 131l 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154

EE5F EEbO EE6:! EEb3 EE6D EE77 EE79 EE7B EE7D EE7E EE7F

0007 0006 0005 0004 0002 0000

z.scra z.stp" z.keyur z.sloA z.sioB z.slom z.siov z. xonp z.baua z.baub z. lobt

i i

p.ackn p.onln p.rdyi p.royo p.strb p.auto

MACRO-SO 3.44 09-Dec-SI

equ equ equ equ equ equ equ equ equ equ equ

bootbf+255-32 z.scra+l z.stpr+2 z.keym-t-l z.sloA+l0 z.sloB+l0 z.siolll-t-2 z.siov+2 z.xonp+2 z.baua+l z.baub+l

;Inltlal screen attribute ;floppy step rate ;keyboard mask ;sio A Inlt ;5\0 B init ;clear to send low/high/ignore ;data carrier detect low/high/ignore ,Xon/Xoff protocal ;comm channel baud rate ;printer baud rate ; init la I i/o byte

parallel printer status bits.

equ equ equ equ equ equ

subttl page

7 6 5 4 2 o

iacknowledge ,on line ;ready to Input ,·ready to output ;data stobe ,auto LF enable

Code Generation Control Macros Definitions

}> o a (J)

:J a.. )(

m

m VI

Bdlc(lni.l~ Oper'atillU ::;y~tem fo.' tile XEROX 820-11 Code Generatioll ('ollt.ol Macros Definitions

MACRO-BO 3.44 09-Dec-81

155 156 157 158 159 160 1ti1 162 163 164 165 166 167 168 169 170 171 172 \ 173 174 175· 176 177 178 179 180 181 1B'L 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209

below

Rom code placement macros.

The Cownon Segment holds the non-resident (banked) portion of the monitor. This segment is not copied to ram.

The Data Segment holds the resident portion of the monitor. It is moved to ram at location MONITR during initialization.

The Coele Segment holds the various Transient Commands. Each command is loaded from the ROM to the TPA when It Is executed.

The fol lowing macros keep it all straight.

below - Generate code for rom below.

macro segment b endm

; ;enable cownon segment

;; above - Generate code for ram above.

above macro segment d endm

;;enable data segment

Overlay - Generate code for transients.

overlay macro addr tloc defl tloc+$-cloc addr equ tloc+bloc+cloc-Monitr

bseg

sega

segment c ;;enable code segment endm

bseg - activate cOlllmon segment.

lIIacro common defs 'def I endm

ICOMROMI comres $

;; segment - Act ivate Segment.

segment macr'o update

~&space defl s&seg .phase endm

s

-1

s&loc

; ;update active phase counter ;;set enabled segment active ; ;actlvate segment code placement ;;set absolute segment location counter

update - Update Phase Counters.

update macro If bspace

m (jI

Eialeones Op8f'C!lill[J System for tile XEROX 1120-11 MACRO-UO 3.44 Colle Genen'.ltiol1 COlltrol Macros D.,finitions

09-Dee-ElI

210 eOlllres d,ef I $-rom+l001l-3 211 ,endi f 212 'i rpc x,<bcd> 213 if x&space iii f segment active 214 if cspace 215 if tpal It ($-cloc) 216 tpal defl $-cloc 217 endif

. 2111 else 219 x&loc defl $ ; ;save seglllent address 220 endif 221 x&space defl 0 i ; c I ear segment active 222 . depllase ; ; revert to relocatable 223 endif 224 endm 225 endm 226 227 1l1lOlJ bloc def 1 rom ;establisll non-resident code base 220 FOOO dloc def 1 monitr ;estat>1 isl) resident code base 2L9 0000 tloc defl 0 ;establise Transient code base 230 0000 tpal defl 0 ;establish maximum transient length 231 0000 bspace defl 0 ;preset common segment inactive 232 0000 cspace defl 0 ;preset code segment inactive 233 OOOU dspaee defl 0 ;preset data segment inactive 234 OOUO COIllI~es defl 0 ;preset cOlluuon base address 235 236 subttl Ram Loader' for Testing Only 237 page

» u '0 ro ::l 0-X m

m --..J

Bdlcone>s Ope>raliliU System tor' tIle> XEROX 1l20-I1 MACRO-BO J.44 09-Dec-BI Ram Loader for T~stiny Only

231l 2:39 240 DODD! + 241 OOOO! 242 24:3 0000 21 OOFO! 244 0003 o I 17FF 245 0006 IE 00 246 00 DB 7E 247 0009 23 248 OOOA 8:3 249 000f:! 5F 250 oooe OB 251 0000 7B 252 OOOE BI 253 OOOF 20 F7 254 0011. 7B 255 0012! EO 44 256 0014! 77 257 0015' C3 (lOOO 258 259 2bU

bseg dets

entry:

xcks: Id III Id

xcksl: Id inc add Id dec Id or jr Id neg Id jp

subttl page

comres

hl,bbase":movln bC,romsiz-l e,O ;preset checksum a,(hl) hI a,e e,a bc a,b c nZ,xcksl a,e

(h I) ,a o

;store twos complement of checksum

;store checksum

System Initialization

m Balcones Oper'at ill!) System tor tl"le XEROX 820-11 MACRO-BO 3.44 09-0ec--B,1 00 System Initial iZot ion

:.161 262 263 0018! bbase: ;symbol for accessing non-resident base address 264 0018! defs 100h-($-(elltry-3»,-1 265 266 00E5 movln equ $-bbase 267 OLlFO comres defl 100h-3 26B 269 below :generate non-resident code 270 OOOO! + defs comres 271 272 , , prs - preset storage. 273 274 Enrry: Power up or Reset button. 275 276 0000 F3 prs: di : lock up system 277 0001 AF xor a 27B 0002 :Hl prsl: dec a ; tt1e pause that refershes 279 0003 20 FO jr nz,prsl 2BO 0005 ED 73 FFEO Id (rstsp),sp ;save partial reset state 2BI 0009 22 FFE2 ld (rsthl),hl ; ; n case the luser go boom 2B2 OOOC E I pop nl :pick possible return off stack 2B3 0000 22 FFE4 ld (rstpc),tll 204 0010 D9 exx ;give primary registers half a break 205 0011 Ie inc e 2B6 0012 31 3839 Id sp,383911 ; load strange values in SP 287 0015 :01 I 4142 Id sp,41421! 2BB 0010 4C Id c,h :insure 289 0019 43 Id b,e :registers 290 OOIA 'IF Id c,a ican 291 OOIB 4E Id c, (h I) :forget 292 OOIC 45 Id b, I ; insure 293 0010 53 Id d,e :registers 294 OOIE 4:3 Id Ble ;can 295 OOIF 4F Id C,a ;copy 296 0020 40 Id C, I 297 0021 50 Id d, tJ 29B 0022 55 Id d, I 299 0023 54 Id d,h 300 0024 45 Id b, I 301 0025 52 Id I d,d 302 0026 UO ex af,af' 303 0027 :iE 17 Id a,24-1 : line up bottom of screen 304 0029 03 14 out (scroll) ,a ; in it scro I I port 305 00:.18 :.11 3000 Id tll,crtmem ;'c I ear display memory 306 002E 36 20 Id (h I ) . ' 307 0030 II 3001 Id de,crtmemTI 30B 0033 (] I OBFF Id bC,crtmax-crtmem-l 309 0036 ED BO Idir :pray the video hardware works

» 310 0038 31 FOOO Id sp,IIIoni tl- ; insure monitor ram ok

'0 311 003B 21 AA55 prs2: Id hl,Oaa5511 ;walk checker board through ram

'0 312 0(]3e C I pop bc :read ram /l) 313 003F E5 push hI write ram fast ::l 314 0040 [) I pop de read ram fast 0- 315 0041 C5 pUSh bc put ram back X m

» 6alcones Ope ra t i II~I System tor tile XEROX 820-11 MACRO-80 3.44 09-Dec-81

0 System Ini t io I i «at ion 0 fI) 316 0042 f 1 pop af ;and verify it ::l 317 U043 9U sub b Cl.. 318 0044 20 76 jr nZ,err'l ;if ram failure >< 319 0046 ED 52 sbc 111 ,de m 3:!0 0048 20 72 jr nZ,errl ;if ram or register failure

321 004A 3B dec sp ;advance test address 322 0046 3f ccf 323 U04C ED 7A adc hI, sp 324 004E 20 EB jr nz,prs2 ;if top of memory not reached 325 0050 31 0000 Id sp,stack ;set monitor stack 326 0053 21 0000 Id hl,prs ;set rom address 327 0056 01 1800 Id bC,romsiz 328 0059 CD OOAf ca II ccs ;compute check sum 329 005e 20 63 jr nZ,err2 ;if bad rom 330 D05E :!I 00E6 ld Ill, intab ;point to default variable table 331 0061 06 00 prs3: Id b,O 3n 0063 4E ld c, (h I) ;set data block length 333 0064 23 inc hI 334 0065 5E Id e, (h I) ;set variable address in ram 335 0066 23 inc hI 336 0067 56 Id d,(hl). 337 0068 23 inc hI ,;po int to initial values 338 0069 ED BO Idir ;copy data from rom to variables in ram :i39 006B CB 7E bit 7,(hl) 340 0060 :W f2 jr z,prs3 ;if more data to preset 341 006f 23 inc hI ;point to i/o init data table 34:! 0070 46 prs4: Id b, (h I) ;set number of bytes to preset 343 0071. 23 inc hI 344 0072 4E Id c, (h I) ;set i/o port address :345 0073 23 inc hI 346 0074 EO B3 otir ;shoot preset data to ilo device 347 0076 CB 7E bit 7,(111) 348 0078 20 f6 jr z,prs4 ;if more devices require initial ization 349 007A DB IE in a, (kbddat) ; asse,'t PARDV 350 007C ED 5E im 2 ;select interrupt mode 2 351 007E 3E ff Id a,higll vectab ;set interrupt vector page 352 0080 ED 47 Id i • a 353 0002 21 0416 Id hi, rbase ;set resident base addre~s 354 0005 11 fOOD Id de,rnonitr ;set monitor address 355 0000 01 Of 00 Id bc, ,'am-moil it r ;set max re.sident length 356 008B ED 60 Idir ;plant ,monitor upstairs 357 OOOD 21 1800 Id hl,Rx1984 ;prognosticate 358 009D (j 1 0800 Id bC,Lx1984 359 0093 CD OOAf ca 11 cCs :HW 0096 21J 14 jr nz,prs5 361 0098 2A IffD Id til, (Rx 1984rLx 1984-3) 362 OU9B II 55AA Id de,55aall 363 009E ED 52 sbc h I ,de 364 OOAO 21 fAD8 Id hl,cmdtab 365 00A3 II f360 ld de,seltab 366 CJDAb II 1 fC55 Id bC,cluc 367 nOA9 cc 1800 ca I I z,Rx1984 ;futureSllock 368 OOAe Cl FC55 prs5: jp signon ;Signon Hesident Monitor 369 :370 OOAF IE 00 ccs: I (J e,O ;preset ckecksulII

m 371 OOBI 7E ccsl: Id a, (h I) U)

I XEROX 020-11 MACRO-OO 3.44 09-Dee-Ol In Baleone,; Opel-atin!J SYbtem for tl"le ..... System Initial iLatinn

Ib 372 00B2 L3 inc hi 373 00B3 8::1 add a,e 374 00B4 5F ld e,a 375 00B5 DB dec be 376 00B6 7B Id a,b 3n 00B7 Bl or e 378 00B8 20 F7 jr nz.ccsl 379 OOBA B3 or e 3BO DOBB C9 ret 381 3BZ DOBC '21 00D4 err 1 : ld 1"11, errml ;set ram error message 383 OOBF lB 03 jr err 384 OOCI 21 0000 e r' r"2 : Id hl,errm2 385 DOC4 11 3024 err: Id de,crtmem+40-(errmI/2) 386 DOC7 lJ 1 0009 Id bC,ernul 387 DOCA ED BO ldir 388 OOCC OB err3: dec be ;pause a whi Ie 309 ODCD 70 Id a,b 390 OOCE Bl or c 391 OOCF ::'0 FB jr nZ,err3 392 0001 C3 0000 jp prs ;try restart again 393 394 0004 52 61 60 20 ernul: db 'Ram En-or' 395 DODO 45 72 72 6F 396 OOOC 72 397 0000 52 6F 60 20 ernu2 : db. 'Rom Error' 39B OOEI 45 72 72 6f 399 00E5 7'2 400 0009 errllli equ ($-errml)/2 401 402 , , initialize the interr"upt vector table 403 404 00E6 02 intab: defb 2 405 00E7 FflA defw sysvec+2 406 00E9 F140 defw - keysrv ;parallel keyboard interrupt vector 407 408 OOES 06 defb 6 409 ODEC FF1'2 defw ctcvec+2 410 OOEE FifO defw III ill i ;one mi Iii second interrupt timer 411 OOfO 0000 defw 0 412 00F2 F192 defw t illler tone second tinter interrupt vector 413 414 in it keyboard f i fa 415 416 00F4 0::1 defll 3 417 OOF5 FF30 defw f ifcnt 418 00F7 00 defb 0 i r i fo COlJnt 419 OOFO DO defb 0 ; fifo in 420 OOF9 llll defb 0 ififo out

» 421

-0 4'22 initialize tile crt display

-0 423 Ib 424 OUFA uu LIe fll 8 ::J 425 OOFB FFAC defw cursor' 0.. 426 nOFD :HlUU defw crtnlem ;tlase add,"ess i 5 3000h X 427 OOFF 02 defb 02 ;use non-blinking box cursor m

I> Balcoflt;s Opt; ra t i lI~j Systt;m for tlltJ XEROX 820-11 MACRO-80 3.44 09-0ec-81 :J SysttJfIl Init ial iLdt iOIl :J :D 428 0100 3000 dtJfw crtmelll ;direct crt memory output address :J 429 0102 17 defu 23 ;initial scro II base Q..

430 0103 00 defb 0 ;initial leadin >< 431 0104 00 defu O· ;initial attribute m 432

433 Initiallze configurable parameter addresses 434 435 0105 DC defu 2"nulllcon 436 0106 FF6F defw contbl ;configure table address 437 0108 FlOC cfinit: defw siomsk ;printer output ready mask 438 OIOA FlOE defw sioval ;printer output ready value 439 OIOC F 115 defw xonenb ;Xon / Xoff enable/disable (NOP or RET) 440 OIOE FF54 defw steprt ;step rate tor wd 1797 441 OliO FFCB defw sparel 442 0112 FFCC defw spare2 443 0006 numcon equ ($-cf init) /2 444 445 0114 04 detb 2"2 446 0115 fF3C defw avai I b 447 0117 F7FD defw iobloc+iobdvs 448 0119 FC80 defw ram-280h 449 450 0116 FF dllfb -I ;end of variable init table 451 452 ; ; I/O port initial ization. 453 454 initialize system pia for use as bank-switch, 455 configuration select and parallel keyboard input 456 457 458 o IIC 01 10 defb I,sysctl 459 011 E 4F defb OIOOllllb ;select input mode 460 461 U II F 01 IC defb l,syspio 462 0121 80 defb 10000000b ;enable ROM 463 464 0122 03 ID defu 3,syscfl 465 0124 CF defb 1l00111lb ;put system pio in bit mode 466 0125 3F defb OOllllllb ;make bits 5, 4, 3, 2, 1 , and 0 be inputs 467 0126 07 defb OOOOOlllb ;disable interrupts

, 468 469 0127 03 IF defb 3,kbdctl 470 0129 4F dtJfb 01001111b ;put keyboard port in input mode 471 012A IA defb sysvec+2 ; load keyboal'd interrupt vector 472 0126 B3 defb 10000011b ;enable interrupts 473 474 Initialize Counter' Timer Circuit. 475 476 DI2e U2 18 defb 2.ctcO 477 012E 03 dt;fll 0000001 III ;reset t illler 478 012F 10 defb low ctcvec ;base interrupt vector for ctc 479 480 0130 112 19 dtJfb 2.ctcl 4BI 0132 07 defu 00000111b ;start timer, but no interrupts 4B2 n I:n fA defb 250 ; c t c I ptJriod = 1 msec m .... 483 ....

» "0 "0 (I)-

::J 0-X m

Balcones OperatillU System for the XEROX 820-11 System Initialization j

484 485 486 487 488 489 490 491

.492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539

0134 0136 0137

0130 013A 013B

013C 013E 013F 0140 0141 0142 0143 0144 014G 0146 0147

0148 014A

0146 0140 014E 014F 0150 0151 0152 0153 0154

0155 0157

0156 015A

015B 015U 015E 015F

0160 0162 0)6:3 016·1

02 lA 27 70

() 2 1 B C7 70

OA 07 Ul no (J2

no U3 41 04 47 115 AA

01 OC 07

08 06 01 00 03 41 04 47 05 AA

01 00. lI5

01 68 no

0:3 09 CF 00 07

03 OB CF FO ()7

MACRO-80 3.44 09-DL .. -81·

defb defb <jefb

defb defb defb

2,ctc2 00100111b 125

2,ctc3 1 10001 lib 125

;put ctc2 in timer / 256 mode (64'usec/count) ;ctc2 period = 8 msec

;put ctc3 in counter mode with interrupt ;ctc3 period = 125*B msec = 1 second

initialize sio channel b for asynchronous serial interface to printer or terminal

defb defb defb defb defb detb defb defb defb defb defb

defb defb

10,siocpb 1 OOOOOOOOb 2 low siovec 3 01000001b 4 o 1000111b 5 101010 1 Ob

l,baudb 0111b

;select register #1 ;disable interrupts ;select register #2 ;base sio interrupt vector ;select register #3 ;7 bits/rx characters ;select register #4 ; 16x clock. 1 stop bi t, even parity enabled ;select register #5 ;DTR, 7 bits/tx character, Tx enb, RTS

;default clock is 1200 bps

initialize communications port for async modem interface

defb defb defb defb defb defb defb defb defb

d.efb r;Jefb I

.' defb defb

B,siocpa 1 OOOOOOOOb 3 01000001b 4 01000111b 5 10101010b

1, bauda 0101b

1 ,async o

;select register #1 ;disable interrupts :select register #3 :7 blts/rx characters ;select register #4 ;16x clock, 1 stop bit, even parity enabled ;select register #5 ;DTR, 7 bits/tx character, Tx enb, RTS

:default clock is 300 bps

;set internal Rx+Tx clocks

initialize PIO for Centronics style printer

defb defb defb defb

defb defb defb defb

3,gpioca 11001111 b OOOOOOOOb 00000111b

3,gpiocb 11001111b 11110000b 00000111b

mode 3 al I output no interrupts

mode 3 upper nibble in, lower out no interrupts

):> Ba I cones Opera t I n9 Sy stem fo r tile. XEROX 820- II MACRO-BO 3.44 "0 System Initialization "0

540 541 o 16t, n I OA defb I, gp I odb

09-Dec-81

ro :J c.. >< m

542 0167 05 defb ( I shl p.strb) or ( I shl p.auto)

m -­W

543 544 545 546 547

016B FF defb

subttl page

-I ;end of I/o I nit

Resident Monitor Entry Points

table

Balcon~5 OPrl'-d! illlj '>y"trllll foo til':' XEROX 6~,;-1I ;\1;'CRO-80 3.44 Re5id~nt Monit(,,- Ellt,-y Point:,

09-0.,~-ol

546 549 550 551 552 553 554 555 556 557 55B 559 560 561 562 563 564 565 5()6 567 568 569 570 571 572 573 574 575 576 577 576 579 580 561 582 583 564 585 586 587 5B8 589 590 591 592 593 594 595 596 597 59B 599 600 ()01 602 603

0266! FOOO F003 F006 F009 FOOC FOOF F012 FOl5 FOl8 FOIB FOIE F021 F024 F027 F02A F02D F030 F033 F036 F039 F03C F03F F042 F045 F048 F04B F04E F051 F054 F057 F05A F05D F060 F063 F066 F069 F06C

(3· F07C (3 FA62 C3 FOCD C3 FOD8 Ci F 2F 1 C3 F2FE C3 FOE5 C3 FOFO C3 FOF8 C3 FAl7 C3 FA3C (3 FA3E C3 FA4B C3 FA44 C3 F344 C3 F2B4 C3 F2B8 (3 F2A3 C3 F097 C3 FOBG C3 F08B C3 Fl05 C3 FOA4 C3 FOBF C3 F13F [3 F7A3 C3 F7AF (::3 F79() Ci F7BB Cl F7CC C3 F770 C3 F775 C3 F77F C3 F788 C3 F13F C3 F002

; . ~~slcent monitor entry points.

T~I:; Entry Peint Vector provide:; the only reliable access to services provided by the Resident Monitor. Any access te coce in the Monitor er its Ram page past the keyboara variables is not allowea. Future releases of the Resicent Monitor will always previae compatability with these entry vactors.

TI~is restriction also appl'Ie:; to ttle R.esldent Monitor Ram Pase at tha top of memory. Access to Ram Variables must ca obtainac through the appropriate entry vactor.

C.oove c3.s.ag

cold: jp "::.r.l1: jp ccnSl:: jp ce;l; n: j p c':)nOL!'(: jp

jp jp jp jp jp jp jp jp jp jp jp jp jp

dal'ti: jp jp jp jp .ip

usrsec: jp jp .iP jp jp jp jp jp jp

iale~

sortv:

jp jp jp oefs

rest:art prompt kbdst kbdin crt out fastcrt siost sioin sioout select home seel, read write xqdvr setcur outcur crtldir getsel day tim config siordy setcon ssp nu lint iocons ioconi ;ocono i 0 lis t iolbt" comins cominp comout comots nu lint soft 16 0 -1

;monitor restart ;Ulonitor entry point ;console status to A ;console input to A ;console output from A ;fast crt output from C ;sio channel b status to A .sio channel b Input to A ;510 channel b output from A ;select drive in C ;home r/w head ;seek to track in C ·;read sector C -> buffer @ HL ;write sector C <- buffer @ HL ;execute physical driver request @ HL ;set direct crt cursor from HL ;direct crt display ;crt memory block move ala' LDIR ;return address of disk mapping table ;return address of Time-of-Day ;return configuration status ;sio channel b output ready status ;set configuration ;start screen print ;user accessible 1 second· interrupt ;console status through lobyte ;console Input through iobyte ;console output through iobyte ;printer output through iobyte HH"inter 5tatus througil iobyte ;communications input ready status ;communications input data to A ;communications output data from C ;communicatlons output ready,status .Idle while ilo is pending ;record soft error ;space for option rom linkage

5Lbttl Monitor Function Processors ~,3.ge

to HL

p Balcones Operating System for the XEROX 820-11 MACRO-OO 3.44 09-0ec-81 "0 Monitor Function P,-oc esso,-s I

"0 (I) 604 ::J 605 Monitor Restart. 0- ' ,

606 , >< 607 FOn F3 restart:di ; lock system m 608 F07D DB IC in a,.(syspio)

609 F07F F6 80 or I shl 7 ;enable banked rom 610 FOBI 03 IC out (syspio),a 611 FOB] C3 0000 jp prs ;reload monitor from rom or ram 612 613 , , Oayt im - Retui-n Address of Time-ot-Oay. 614 615 F086 II FF56 day tim: Id de,day ;point to day ot month 616 FOB!] 18 OF jr retval 617 618 , , Config - Return Confi"uration Status Byte. 619 ; 620 FOBS JA FOE3 config: Id a, (mask) ;turn keyboard mask into c.keyni 621 F08E ·E6 BO and 080h 622 F090 F6 00 or 0 623 F091 confg equ $-1 ;*****=>;This word stored by Preset 624 F092 5F Id e,a 625 F093 16 01 Id d,rev-400 ;return revision level 626 F095 18 03 jr retval 627 628 , , getsel - Get address of Select table. 629 630 F097 II F360 getsel: Id de,Seltab ;set select table address 631 632 , , Retval - Return Value to Caller. 633 634 FU9A 24 retval: inc h ;see if high level language ca II 635 F09B 25 dec h 636 F09C 28 03 jr z,retvl ;it assembly level ca II 637 F09E 73 Id (h I) ,e ;store answer in variable 638 F09F 23 inc hI 639 FOAO 72 Id (h I) ,d 640 . FOAl EB retvl: ex de,hl .; leave result in HL as well 641 FOA2 FB eiret: e i 642 FOA3 C9 r-et 643 644 , , set con - set configuration. 645 646 FOA4 7E setcon: Id a, (11 I) ;get configuration table index 647 FOA5 CB BF res 7,a 64B FDA 7 FE 06 cp numcon 649 FOA9 [JO roe t nc ;it index out of range 650 FOAA 5F Id e,a 651 FOAB 7E Id a, (11 I) ;get read/write flag 652 FOAC 23 inc hI 653 FOliO 46 Id b, (tl I) ;get configuration data 654 FOAE 16 00 'Id d,O 655 FOOn 21 FFBF Id tll,contbl ;set address of configuration table addresses 656 FOB3 19 add hl,de 657 FOB4 19 add hl,de

m 658 FOD5 5E Id e, (h I) ;get configurable byte address

-" VI

» "'0 "'0 I'D ::J a.. X m

· '.

Balcones Ope,'atill9 System fa,' the XEROX 020-11 MACRO-OO 3.44 Moni tor' Funct ion P,'or.essors

659 FOBb 23 inc hI 660 FOB7 56 Id d, (h I) 661 FOBO EB ex de,hl 662 FOB9 CB 7F bit 7,a 663 FOBB 7E Id a, (h I) 664 FOBC CO ret z

09-0L 81

;set direction :get previous value :if asking current configuration

665 FOBD 70 I d (h I) ,b :store new configuration 666 FOBE C9 ret 667 668 , , ssp - start screen print. 669 670 FOBF 3E 67 ssp: Id a,3+«24+1) shl 2) :start with cr/lf 671 FOCI 32 F20E Id (spact),a 672 FOCLl AF xor" a 673 FOC5 32 F224 Id (spcnt),a 674 FOCO 3E 81 Id a,Olh :start millisecond timer 675 FOCA D3 19 out (ctcl),a 676 FOCC C9 ret 677 670 subttl Console I Printer Drivers 679 page

» Balcones OperatillU System for the XEROX 820-11 MACROr80 3.44 09-Dec-81 "0 Console / Pr inter- Drivers I

"0 it)

680 ::J 681 above ;run this code upstairs a.. 682 OOCD" + d&seg

>< 683 m 684 , , kbdst - keyboard status.

685 686 Returns A 0_ if no char 687 A -I if char available 688 689 FOCD :jA FF30 kbdst: Id a,(fifpnt) ;get input f ito bytecount 690 FOllO 1:l7 or a 691 FODI CO ret Z ;if keyboard queue is empty 692 693 , , soft - record soft error. 694 695 FOll2 f6 FF soft: or -1 ;set ready / error status 696 FOD4 C9 ret 697 698 , , kbdin - Keyboard Input. 699 700 Returns A = character 701 , 702 FOD5 CD F066 kbd i n 1 : ca I I idle ; idle cpu 703 FODO CD FOCD kbdin: ca 1 I kbdst 704 FOOB 28 F8 jr z,kbdinl ; loop until keyboard input ready 705 FODD E5 push hI 706 FODE CD FI30 ca I I remove ;get keyboard entry 707 FOEI E 1 pop hI 708 FOE2 E6 7F kbmask: and 07fh 709 FOE3 mask equ $-1 i*****=>;this byte modified by ESC Olr 710 FOE4 C9 I'e t 71 I 712 , , siost - sio ctlanne I h input ready status. 713 714 FOE5 DB 07 siost: in a,{siocpb) ;-get sio status register 715 FOE? E6 01 and 00000001b 716 FOE9 CO ret Z ;if no data available 717 FOEA 3E FF Id a,-I 718 FOEC C9 r-et 719 720 ; ; sioin - Sio channel b input character. 721 722 FOED CD F066 sioinl: ca 11 idle ;idle cpu 723 FOFO CD FOE5 sioin: ca II siost ;test console status 724 FOf3 28 F8 jr z,sioinl ; loop until data is 725 FOf5 DB 05 in a, (siotipb) ;ready at sio data port 726 FOF7 C9 ret 727 728 .. sioout - SiD channel B output character. 729 730 FOfO F5 sioout: puSh af 731 FOF9 CD fl05 s i ox 1 : ca II siordy 732 F[)FC CC F066 ca I I z, id Ie ; id I e cpu if transmitter not ready 733 fOFF 28 F8 jr Z, 5 iox 1

m 734 FIOI F 1 pop af --4

.......

" "

m Balcones Oper"atillU SY5tem for the XEROX 820-11 MACRO-80 3.44 09-utlc-81 -' Console / Pr- i nt e. Drivers

, ())

735 Fl02 D3 05 out (siodpb),a ;output data to sio 736 Fl04 C9 ret 737 738 , , siordy - Sio chann'e I B output ready ststus. 739 740 FI05 3E 10 siordy: Id a,IOh ;reset status latch 741 FI07 D3 07 out (siocpll),a 742 Fl09 DB 07 in a,(siocpll) 743 F HIB E6 04 and 00000100b ;test tbe status bit 744 FlOC siomsk equ $-1 ;****·=>;modified at run time 745 Fl0D EE 04 xor 00000100b 746 FlOE sioval equ $-1 ;····*=>;modified at run time 747 Fl0F 28 02 jr z,siordl :if hardware is ready 748 FIll AF xor a 749 F 112 Ul ret 750 F 113 F6 FF siordl : or - 1 ;set ready status 751 F 115 [JO xonenb: nop ;*****=>;put RET here to disable Xon/Xoff 752 F 116 CD FOE5 ca 11 siost 753 F 119 28 1 1 jr z,siord3 ;if input not available 754 F lIB CD FOFO ca II sioin 755 FIlE E6 7F and 7fh 756 FI20 D6 13 sub Xoff 757 FI22 28 05 jr z,siord2 ;if pr"inter said Stop 758 FI24 Dli FE sub Xon-Xoff 759 FI26 20 04 jr nZ,siord3 ; if not Resume 760 FI28 2F cpt ;set printer ready 761 FI29 32 FI2D siord2: Id (xofflg),a 762 FI2C 3E FF siord3: Id a,-I 763 FI2D xofflg equ $-1 ;*****=>iset I\S pending flag 764 FI2E 67 or a 765 FI2F C9 ret 766 767 . , Remove - remove key from fifo. 768 769 FI30 L I FF30 remove: Id hl,fifcnt :decrement fifo count 770 FI33 35 dec (h I ) 771 FI34 21 FF32 Id hl,fifout ,:point hI to fifo output offset 772 FI37 34 index: ille (h I ) ;advance f i f'o pointer 773 FI38 CB A6 res 4, (h I) :modulo 16 774 FI3A 3E 20 Id a, low fifo 775 FI3C 86 add a, (h I) ; i nde x into fifo by offset 776 FI3D 6F Id I,a 777 FI3E 7E Id a, (h I) ;fetch character in fifo 778 FI3F C9 nul int: ret 779 780 subttl Interrupt Service Routines 70 I page

» "0 "0 /l) ::J a. >< ni

» Balcones Ope, at i IIU System for' the XEROX B20-Il MACRO-80 3.44 09-Dec-BI -0 1 n t e,-r'upt 5el vice Routines I

-0 ((l 7B2 :l 783 ; i isr - inte'Tupt service routines. a. 784 >< 7B5 service macro m 786 ld (savstk),sp ;; i save user stack pointer and

7B7 Id sp, intstk i;;switch to local stack 788 push hi i; i save machine state 7B9 push af 790 endm 791 792 , , keys,'v - pa,"a II e I keyboard interrupt service. 793 794 FI40 keysrv: service ;save state 795 FI40 ED 73 FIEC + Id (savstk),sp 796 FI44 31 FF50 + Id sp, intstk 797 FILJ7 E5 + push hi 798 FI48 F5 + push af 799 FI49 C5 push bc 800 FI4A DB IE in a, (kbddat) ;read keyboard input port 801 FILJC 2F cpl 802 FI4D FE 9E cp $crprt 803 FILJF LO 16 jr nZ,key2 ;if not screen print key 804 FI51 3A F20E ld a,(spact) 805 F154 67 or a 80b FI55 28 06 j '" z.keyl ;if screen not printing now 807 FI57 3E 07 Id a,3+(1 shl 2) ;set state to cr/lf/stop 808 F159 32 F20E Id (s'pac t) ,a ;set screen print state 809 FI5C AF xor a BIO F15D 32 F224 Id (spcnt),a ;restart character counter 8 I I FI60 IB 20 j ,- key5 812 FIG2 CD FOBF key I: ca 11 s'sp ,start screen print 813 Flb5 IB 28 jr key5 814 FIG7 21 FF30 key2: Id hl,fifcnt ,bump input fifo character count 815 FlbA FE 96 cp Abort ,check user Abort Key 816 FI6C 28 II j. z,key3 ;warm start system 817 FlbE 4F Id c,a 81B FIEF 7E ld a, (h 1 ) 819 FIN) 3C inc a 1!20 F171 FE 10 cp 16 B21 F 173 30 IA j ,- IIc,key5 ; ex; t now if fifo is fu II B22 FI75 77 Id (h I) ,a B23 FI76 21 FF31 Id hl,fitin ;point hi to fifo input offset B24 FI79 CD FI37 ca 11 index 825 FI7C 71 ld (hll,c ,store character In fifo @ hi 826 F 170 IB 10 jr key5 827 F 1 7F CD FIEF key3: ca II ,-et ins ,release Pio interrupt cpntroller 020 FIB2 06 03 lei b,3 829 FIU4 3G 00 key4: Id (h I) .0 ,.c lear fifo count 830 FI86 2C inc 1 ;and fifo inlout pointers 831 FIB7 10 FB djnz key4 832 Fl09 CD F293 ca 11 c,-toff , turn crt memory off 833 FI8C CD F003 ca II warm ,and warm start system 834 FI8F CI key5: pop bc 835 F l!lO II! 57 jr rf i ,return from interrupt

m 836 ...... U)

m B20-11 MACRO-BO 3.44 09-, . -:-= ill Balcones Ope I"a t i n!J System for the XEROX

N Intel'rupt Service Routines 0

B37 , , timer - Once per second interrupt. B3B B39 FEU timer: service 840 FI92 ED 73 flEC + Id (savstk),sp B41 FI96 31 Ff50 + Id sp, intstk B42 fl99 E5 + push hI 843 FI9A F5 + push af 844 FI9B 2A fF52 Id hl,(tikcnt) ;advance binary seconds counter 845 FI9E 23 inc hI 846 FI9f 22 Ff52 Id (tikcnt),hl 847 FIA2 CD F048 ca II usrsec ;invoke user's interrupt routine B4B FIA5 21 fF55 Id hl,timout ;decrement disk turn-off t ;mer B49 flAB 35 dec (h I) B50 FIA9 20 06 jr nZ,timerl ; ex i t if not timed out yet 851 FlAB DB IC in a,(syspio) B52 flAD E6 FB and IIII 1000b ;disable all drive selects which B53 FIAF D3 IC out (syspio),a ;turns of f spindle motors 854 FIBI C5 time r I : push bc B55 FIB2 06 02 Id b,2 B56 FIB4 :3E 3B Id a,59 B57 FIB6 21 FF5B Id hl,secs ;point at wa II clock B58 FIB9 34 t imer2: inc (h I) ;increment seconds B59 FIBA BE cp (h I ) B60 FIBB 30 2B jr nC,timer3 ;if not one minute or hour B61 FIBD 36 00 Id (h I) .0 B62 FIBF 2B dec hI B63 FICO 10 F7 djnz t i mer2 864 FIC2 3E 17 Id a,23 865 FIC4 34 inc (h I) ; increment hours B66 FIC5 8E cp (h I) B67 FIC6 30 20 jr nC,timer3 ;if not one day B68 FIC8 36 00 Id (h I) ,0 869 FICA D5 push de 870 FICB 28 dec hI 871 FICe 28 dec hI B72 FICD 'IE Id c. (h I) ;get month 873 FICE 2B dec hi ;point to day B74 FICF II FIFO Id de,dpm-I ;point to day/month table B75 FID2 EB ex de,hl B76 F 103 119 add hl,bc B77 FID4 7E ld a, (h I) ;get number of days B78 FID5 EB ex de",hl" B79 F 106 DI pop de 8BO F 1D7 34 inc (h I ) ; increment day BBI FIDB BE cp (h I ) BIl2 F ID9 3D OD jr nc, t imer3 ;if not end of month B83 FIDB 36 01 Id (h I ) , I ;reset day in month 884 F IDD 23 inc 111 B85 FIDE :34 inc (h I ) ; increment month

» 886 F IDF 3E DB Id a, II

"0 887 FIE I BE cp (h I )

"0 8118 FIE2 30 04 j r" nc, t imel'3 ;if not new years eve (() 889 FIE4 36 01 Id (h I ) • 1 ;wrap december to january ::J 890 F1E6 23 inc 111 0.. B91 FIE7 34 inc (h I ) ;signal Guy Lombardo X B92 FIE8 CI timer3: pop bc m

);> Balcones Opel·ati"~J System for the XEROX 820-11 MACRo-on 3.44 09-0ec-81 -0 IntelTlIpt Ser·v i ce ROIlt ines

, -0 tD 893 :J 894 , , rfl - return From Interrupt. 0... B95 , >< 896 FIE9 FI rf i : pop af m B97 FlEA E I pop hI

89B FIEB 31 0000 Id sp,O ;restore stack B99 FIEC savstk equ $-2 ;*****=>;this word modified at runtime 900 FlEE FB el ;re-enable interrupts and return 901 FIEF ED 40 ,-etins: reti 902 903 , , Table of days per month. 904 905 F 1 F I IF dpm: db 31 ; january 906 F IF 2 IC db 28 ;febuary 907 FIF3 IF db 31 ;march 90B F1F4 IE db 30 ; apr i I 909 F1F5 1 F db 31 ;may 910 FIF6 IE db 30 ;june 911 FIF7 IF db 31 ;jul y 912 FIF8 IF db 31 ;augLJst 913 F1F9 IE db 30 ;september 914 FIFA IF db 31 ;october 915 FIFB IE db 30 ;november 911'> FIFC IF db 31 ;decelllber 917 918 , , OIl I I i - Millisecond t illler interrupt service. 919 920 FIFO mi I I; : service 921 FIFO ED 73 FIEC + Id (savstk}.sp 922 F201 31 FF50 + Id sp, intstk 923 F2114 E5 + push hI 924 F205 F5 + push af 925 F206 2A FF50 Id hl,(Milsec) 926 F209 23 inc hI ; increment millisecond counter 927 F20A 22 FF50 Id (Mi Isec) ,hI 928 F200 3E 00 Id a,O ;set screen print flag 929 F20E spact equ $- I ;·.f***=>;this byte modit led at runtime 930 F20F 67 Id h,a 931 F210 E6 03 and 3 932 F212 28 60 jr z,mil16 ;it not print ing screen 933 F214 6F Id I,a 934 F215 CD FI05 ca II siordy ;get printer status 935 F2 HI 2El 67 jr Z ,m; 116 ;it printer not ready 936 F21A 20 rJec I 937 F21B 20 48 jr f)z,mi1l2 ;it not character print state 938 F210 DB lC in a,(syspio) ;get pia state 939 F21F F5 push af 940 F220 CD F29C ca II crton 941 F223 3E 00 Id a,O ;get character count 942 F224 spcnt equ $-1 ;·**··=>;byte mOdified at runtime 943 F225 30 dec a 944 F226 FA F236 jp m,mi 10 ;If end of line 945 F229 32 F224 Id (spcnt),a 946 F22C 21 0000 Id hl,O ;set next character address 947 F22D spaddr equ $-2 i*****=>;wor-d modified at runtime m 948 F22F 7E Id a, (h I) N

~

m Balcones v~,elat ing System for the XEROX B20-11 MACRO-80 3.44 09-. -Bl "-J Interrupt Service Routines "-J

949 F230 D3 05 out lsiodpb),a :flr.e hammer 950 F232 2C inc I :advance screen cursor 951 F233 AF xor a :do not advance state 952 F234 18 22 jr m; I II :if not end of line 953 F236 3E 61 milO: Id a,I+(24 5hl 2) :set address of next print 1 ine 954 F238 94 sub h 955 F2:J9 IF rra 956 F2:3A CB 2F sra a 957 F23C CD F31E ca 11 cca :computa cursor address 958 F23F E5 push hI isave next line address 959 F240 C5 push bc 960 F241 06 50 Id b,80 :delete trailing blanks 961 F243 70 Id a,l 962 F244 80 add a,b 963 F245 6F Id I,a 964 F246 20 lIIi 101 : dec I 965 F247 7E Id a, (h I) :get next character 966 F248 E6 7F and 7fh 967 F24A FE 20 cp 96B F24C 20 02 jr nZ,mil02 : if not trailing blank 969 F24E 10 F6 djnz mi 101 970 F250 70 mi102: Id a,b 971 F251 32 F224 Id (spcnt),a ;set number of characters to print 972 F254 C I pop bc 973 F255 E I pop hI 974 F256 3E 03 Id a,3 :set CR next state 975 F 2~)8 22 F220 nil III : Id (spaddr),hl :set next display address 976 F25B 21 F20E Id hl,spact :set state variable 977 F2GE Bf) or (h 1 ) :advance state 97B F25F 77 Id (h I ) ,a 979 F260 F 1 pop af :get pia back 980 F2f)1 03 lC out (syspio),a 981 F2G3 10 lC jr mi I 16 902 F265 20 nli I 12: dec I ;check next state 9B3 F26G 21 F20E Id hl,spact :set state address 904 F269 20 11 jr nZ,nlil14 :if not If state 905 F2GB 7E Id a, (h I.l 906 F26C 06 04 sub 1 shl 2 ;advance line counter 987 F26E 77 Id (h I) ,a 90B F26F FE FE cp 2- ( 1 shl 2) 909 F271 20 05 jr nZ,mil13 990 F273 3E 01 Id a,l :disable ctc interrupt 991 F275 03 19 out (ctcl),a 992 F277 77 ld (h I) ,a 993 F278 3E OA m1113: ld a, 1 f :set line feed 994 F27A lB 02 jr III! 115 995 F27C 3E 00 mi I 14: Id a,cr ;set carriage return 996 F27E 03 05 mi 115: out (siodpb),a ;move paper or carriage 997 F280 35 dec (h I )

» 990 F201 C3 F1E9 mi I I?: jp rfi ;return from interrupt 999

"0 1000 subttl Crt Driver. "0 /1) IDOl page ::J Q. X m

» Balcones Ope,'atillY System f 0" the XEROX B20-II, MACRO-BO 3.44 09-0ec-BI "0 Crt Driver I

"0 It)

1002 ::l 1003 setcur - set direct display cursor position. a. ' ,

>< 1004 10()5 F2U4 22 FFAF setcur: Id (di,'cur) ,hi ;set up cursor address

m 1006 F2B7 (9 ret 1007 100B , , out cur - store character directly to crt memory. 1009 1010 F2UB CD F29C outcur: ca II crton ; tu,-n on crt bank 101 I F2UB 2A FFAF Id hl,(dircur) ;fetch direct cursor 1012 F20E 71 Id (II I) ,c ;store character 1013 F20F 23 inc hi 1014 F290 22 FFAF Id (dircur),hl 1015 1016 , , crtoff - turn crt ram off. 1017 10lB F293 F3 crtoff: di ; lock pia access 1019 F294 DB IC in a,(syspio) 1020 F296 CB BF crtofl: res 7,a ireset crt bank enable 1021 F29B FB ei ;unlock pio access 1022 F299 03 IC crt on I: out (syspio),a 1023· F29B C9 ret 1024 1025 , , e" t on - turn crt ram on. 1026 1027 F29C F3 erton: (I i : lock time-out interrupt 102B F29D DB IC in a,(syspio) ;get pia status 1029 F29F CB FF set 7,a :enable bank 1030 F2AI IB F6 jr crtonl 1031 1032 , , block move from/to crt memory. 1033 1034 Entry: HL Source, address 1035 DE Destination address 1036 BC Number of bytes to move 1037 A 0 - Move crt rami to crt ram 1038 A < 0 - Move sys ram to crt ram 1039 A > 0 - Move crt ram to sys ram 1040 1041 F2A3 ED 73 F31B c,'t I d i,' : Id (usrstk),sp ;do not use callers stack 1042 F'LA 7 31 FfEO Id sp, c,-tstk ;since it may disappear 1043 F2AA A7 and a iset entry conditions 1044 F2AB CD F29C ea I I crton 1045 F2AE 28 37 jr z,crtmv :block move within crt ram 1046 F2BO F2 F2B5 jp p,Idir2 :It move from crt ram to system ram 1047 F203 EE 80 I d i r- I : x. 0 I~ 80h 1048 F2B5 D3 IC Idir2: out (syspio),a :enable SOlH"Ce bank 1049 F2B7 E5 push hI ;save move source address 1050 F2BU 21 FfBO Id hi, -80 :count down one transfer buffer 1051 f2BB ED 4A adc hl,bc 1052 F2BD E3 ex (sp) ,hI ;save overflow, retrieve source address 1053 F2BE FA f2C4 jp m,Idlr3 ;if less than one buffer 1054 f2CI 01 0050 Id bc,aO ; transfer one buffer 1055 f2C4 C5 I d i ,-3: push bc ,save byte count

m 1056 f2C5 D5 push de ;save destination address N W

m Balcones Operatill9 System for' the. XEROX 820-11 MACRO-OO 3.44 09-l>v..;-01 N Cr' t DI'iver ,

~

1057 F 2U; 11 FF5C Id de,linbuf ;set upper buffer 1058 F2C9 ED BO ldir ;move data to upper ram 1059 F2CO Dl pop de 1060 F2Ce C 1 pop bc 1061 F2CD DB lC in a,(syspio) ;enable destination bank 1062 F2CF EE 80 xor 80h 1063 F201 03 lC out (syspio),a 1064 F20:l E5 push hi isave source address 1065 F204 21 FF5C ld hl,linbuf :set upper buffer 1066 F2D7 ED 60 ldir ;move data from buffer to destination 1067 F209 E 1 pop hI 1060 F2DA C 1 pop bc ;retrieve bytes left to transfer 1(J69 F2DO 78 ld a,b 1070 F2DC A7 and a 1071 F2DD FA F2E9 jp m,crtmvo ;no more move, turn crt ram off and return 1072 F2ED 01 or c 1073 F2El ;,>0 06 jr z,crtilivo ;if no more 1074 F2E:3 DB lC in a,(syspio) 1075 F2E!j 18 CC jr ldi r 1 ;continue transfer one buffer at a crack 1076 1077 F2E7 ED 00 cr tmv:. Idir 1070 F2E9 CD F293 crtmvo: ca II crtoff ; turn crt ram off 1079 F2Ee ED 76 F316 Id sp, (usrstk) lOBO F2FO C9 ret IDOl 1002 subttl Resident C,' t Driver. 1083 page

» u u /l) ::l a.. )(

m

m IV lT1

Balcones Opened illY System for the XEROX 820-11 Resident Crt DI- i ve,' t

MACRO-SO 3.44 09-Dec-81

1084 1085 1086 1007 108B IOB9 1090 1091 1092 109:3 1094 1095 1096 1097 109B 1099 1100 1101 1102 110:3 1104 1105 1106 1107 1108 I 109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1 127 112B 1129 1130 1 131 1132 1133 11 :34 1135 11 :36 II :37 1138

F2FI F2F:.! F:!FJ F2F4 F2F5 F2F6 F2F9 F2FA F2FB F2FC F2FD

F2FE F:3lJ2 F305 F307 F:309 F30A F30B F30E F30F F312 F313 F316 F31B F319 F31A F31B F31D

F31E F31F F322 F:323 F324 F326 F:32B F3:!A

E5 D5 C5 F5 4F CD F2FE F 1 Cl DI EI C9

ED 73 F31B :.J I FFEO f)D E5 DB IC B7 F5 CD F29C FB CD 0169 F I F4 F:!93 DD E I JE DO

:J 1 F31B

C9

67 3A FFBI 134 3C DB 18 :30 FC C6 78 67

crtout - Crt Output Driver.

crtout:

Entry:

Ex it:

push push push push

, I d

ca II pop pop

Character in register A 16 bytes of stack space available Char displayed, all registers saved

hi de bc af c,a fast crt af bc

;maintain users registers on his stack

;set character to process :process character quickly ;restore callers registers

pop de pop hI ret

fastcrt - fast crt driver.

Entry: Exit:

fastcrt:ld Id push in or push ca II ei ca II pop ca II pop Id

gold equ Id

usrstk equ ,-e t

Cha,-acter ill C The only register preserved is SP Peeking in register A reveals valuable characters.

(usrstk),sp sp,crtstk i x

a,(syspio) a af crton

crtdvr af p,crtoff i x a,O $-1

;do not use callers stack ;since it may disappear

;read system pio ;set bank enable status ;save status for exit code ;turn on crt memory :enable interrupts ;execute crt driver rom

:get previous bank enable s~atus ;disable bank now if it was disabled on entry

;sneak balcones golden characters to FAST users

sp,usrstk . ;restore callers stack $-2 ;*****~>:this operand word is modified at runtime

cca - compute cursor address.

cca:

cca 1: cca2:

Entry:

Id Id add inc sub jr add Id

A = Row

h,a a,(base) a,h a 24 nC,cca2 a,24+2*crtbas h,a

;entry with base absolute ;ditto

m IV 0'\

» 'U 'U I'D J 0-X m

Ilaleolles Resident

1139 1140 II'll 1142 1143 1144 1145 1146 1147 1\48 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160

OperdtillU System f 0 (' the XEROX Crt Or i vel',

F3213 2E 00 F32D eB 2C F32F eB 10 F331 C9

F332 [) I 0000 F333 F335 C5 F336 (9

F337 E5 F338 21 OICF F339 F33B 22 F333 F33E EO 43 F339 F342 EI F34:l (9

820-11 MACRO-8D 3,44 09-Dee-81

ld 1,0 sra Il rr I ret

; ; rstatt - Restore Previous Attribute,

rstatt: Id be,O ;exeeute previous attribute routine Istatt equ $-2

pUSIl be ret

setprv: push hI Id hl,setlow

prvatt equ $-2 Id (lstatt),111 Id (prvatt),be pop hI ret

subttl Rom-resident Crt Driver page

» o o I'D ::J 0... >< m

m IV '-.I

Balcon(;s Oper'dtiliH System tor tl1e XEROX B20-11 Rom-resi(1ent Crt D, iver

MACRO-OO 3.44 09-Dec-B1

1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 11BO 1181 1182 1183 11 B4 11B5 1186 l1B7 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215

DODO!

0169 016C 016F 0170 0173 0176 0177 0179 017C 0170 017E 0180 0182 01B5 011:lb 0187 0188 0lB9 o 18B 018D 018F 0190 0191 0194 OHlb 0199 019C 019D OIAD 01A3 01A5 01A6 0lA7 01A8 01AA OIAL OIAD OlAF OIBO 0lB2 0lB3

01B4 o 1 )j~i 01B7 OIBO 01B9

2A FFAC 3A FFB4 77 32 F319 3A FFB2 B7 20 10 3A FOE3 Al 4F FE 20 38 14 3A FFB3 B I 77 2C 70 E6 7F fE 50 :W OA AD of CD,02F7 18 03 CO 0230 22 FFAC 7E 32 FFB4 3A FFAE FE 20 C8 4F 7E CB BF FE 20 79 20 03 7E EE 80 77 C9

EB :i6 00 EO 30 20 4E

+ below defs comres

;execute In banked rom

crtdvr - Crt Driver Proper.

crtdvr:

crtdl:

crtd2: crtd3:

crtd4:

Id Id Id Id Id or jr Id and Id cp jr Id or Id inc J'd 'and cp jr xor Id ca II jr ca II Id ld ld Id cp . ret ld Id res cp ld jr ld xor Id ret

hl,(cursor) a, (chrsav) (h I) ,a (gold),a a,(leadin) a nZ,crtd2 a,(mask) c c,a

c ,crtd2 a,(attrib) c (h 1) ,a 1 a, I Olllllllb BO c,crtd3 I I, a Ifeed crtd3 contrl (cursor),hl a, (h I) (chrsav) ,a a, (csrchr)

Z

c,a a, (h I) 7,a

a,c z,crtd4 a,(I1I) BOh (!-d),a

;set cursor address ;retrieve character under cursor ;replace character under ·cursor ;bury balcones gold ;set leadin state

;if processing escape sequence ; ge t I<eyboard mask

;if control code

;store displayable character ;advance pointer to next column

;extract colunm# from hi

;if end of line not reached

;return cursor to left side ;execute line feed

;process control character ;save cursor pointer for next time ;get character at new cursor location ;save for next time 'CRTOUT' is called ;get cursor character

;if no cursor

;set character used for cursor ;if character is a space ;toggle attribute

;store cursor character

multi - Process multiple character escape sequence.

mu 1 t i : ex Id ex dec jr

de,hl (111),0 de ,Ill a nZ,setxyl

;unconditionally reset the lead-In ;,state to zero

;if not initial state

m Balcones Ope(,dtill[J System for tile XEROX B20-II MACRO-80 3.44 09-Dec-81 N Rom-resident Cr- t Dr·iver 00

1216 OIBB 79 Id a,c ;get second character of sequence 1217 1218 if (options and o.esct) ne 0 1219 , , Escape table searcl. 1220 1221 UIBC E5 pust. III 1222 OIBD :0' 1 02BA Id IIl,esctab 1223 OleO 01 0011 Id bC,esctbl 1224 01C3 ED BI search: cpi 1-

1225 0lC5 09 add hi ,bc 1226 01C6 09 add hi ,bc 1227 010 09 add hl,bc 122B 01CO 4E Id c, (h I) 1229 0lC9 23 inc hi 1230 OICA 46 III b,(IlI) 12:11 01CB E 1 pop hI I:o'J2 DiCe: CO ret nz 12:i3 OICO <:5 push bC 1234 DICE C9 ('et 1 :.,>:j5 endif ;options and o.esct I:">]b 12J7 i; Set attribute modes. 1 :.,>:jO 12]9 OICf D3 36 set low: out (lowlite),a ;set la-light mode 1240 OlDI C] F337 jp setprv 1241 1242 OlD4 D3 35 5eti)1 i: out (cllroI1l2) ,a ;select rOI1l 2 1:">43 o l[J6 AI" xor a ;select standard char set 1244 OIDI lU 08 jr lIlodel 1:">45 1246 0109 03 35 setinv: out (chrom2l,a ;5elect rom 2 1247 OIOtJ IB 02 jr mode 1240 1:0'49 01 [JO OJ 34 setgra: out (chrom I ) ,a ;select rom I 1250 0101" 3E 40 rno,je: Id a,4oh ;select a I ternate char set 1251 olEI CD F337 mode I : ca II setprv ;5et up previous attribute 1252 0lE4 47 III b,a 1253 0lE5 F3 di ; lock system 1254 0lE6 DB IC in a,(5yspio) ;read system pio 1255 0lE8 CB B7 res 6,a ;clear rOI1l select bit 1256 OlEA BO or tJ 1257 OltB FB ei ;unlocl< 1258 OIEC 03 IC out (syspio),a ;set or reset display mode 1259 OIEE <:9 ret 126D 1261 ; ; Enable/disabl" (07) (Jisplay of selected attribute mode 1262 1263 DIU :lE 1:10 enatr: III a ,BOil 1264 01 F I U6 dtJ 6 ; Id b, ;skip liar

» 1265 011"2 AF disatr: liar a 1266 0lF3 32 FFB3 dis I: Id (attrib) ,a

"0 1267 OIFb (9 ret "0 (l) 1268 :J 1269 i j 5etrnsk - Select 7 or 8 bi t data from keyboard 0.. 1270

>< 1271 01H lJF setrnsk: rrca ;get low order bit as upper bit mask m

» Balcones Oper'atill!] System for tl.e XEROX 020-11 MACRO-80 3.44 09-Dec-81

"0 Rom-,'esiLlent Cr't Dr- i ver' "0 ro 1272 01F8 F6 7F or 7fh :J 1273 OIFA 4F ILl e.a 0.. 1274 01FB II FOE3 ILl de,mask X 1275 01FE IA Id a, (de) m 1276 01FF J2 F319 Id (gold),a ;stash balcones gold

1277 0202 79 ld a.e 1278 0203 12 Id (de),a ;store keyboard mask 1279 0204 C9 ret 1-200 1281 , , Process cursor position sequence. 1202 1283 0205 :3E 02 setxy: Id a,2 12B4 0207 12 Id (de),a ;make leadin=2 next time 1285 02l11l 1:9 ret 1206 1287 0209 3D setxyl: dec a UOB 020A 20 10 jr nZ,III3tst ; if not in state 2 1289 020e 6F ld I, a ;clear low cursor pas 12~10 02011 :iE 03 Id a,3 1:.i91 020F 1 :.i Id (de),a ;set state 3 for next t ;me 1292 02111 79 setrow: Id a,c 1293 0211 E6 7F and 07fh ;strip parity bit 1294 021 :j D6 20 sub 1295 0215 DB ret c ; if i II ega I character 1296 0216 FE 18 cp 24 1297 02113 DO ret nc 1298 0219 C3 F31E jp cca ;compute cursor address 1299 1:300 0211: 3D 1113tst: dec a 1301 02Hl 20 OC jr nZ,m4tst ;if not ready for column 1302 021F 79 setco I: Id a,c 1303 022U E6 7F and 07fh ;strip parity bit 1304 0222 D6 20 sub ; of esc, - ,row,col sequence 1 :lO5 0224 D8 ret c 1306 0225 FE 50 cp 80 1307 0227 DO r;'et nc 1:108 022U B5 or I imerg e in col# with I 1:109 0229 6F Id I, a 1:110 022A C9 ret 1311 1312 O:.i:.iB 3D m4 t 5 t : (Jec a 1313 onc :.iO 04 jr nZ,m5tst ; if not escape state 4 1314 022E Dl pop de ; pitch address of crtd3 1315 022F C3 0182 jp crtdl ;display char'acter in C 1316 1317 0232 JA FFAE rn5tst: Id a,(csrchr) 1318 0235 32 F319 Id (gold) ,a ; stasi. balcones gold 1319 0238 79 Id a,c 1320 0239 32 FFAE Id (csrchr),a ;store new cursor character 1321 023C (9 ret 1322 1323 , . contrl - process control character. 1324 1325 D23D 11 FFB2 contrl: Id de,leadin ;point at leadin state 1:326 02411 D2 01B4 jp nC,multi ;if multi code sequence in prog,'ess

m 1 ::127 024:1 F-E 05 cp 'E'-64 IV l.D

m W o

l> "0 "0 CD J 0..

>< m

Balcones Op'H"atil\~J System for the XEROX 820-11 MACRO-OO 3.44 Rom-,'esiclent C,"t O,"iver

09-Dec-Ol

1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 135:3 1354 1355 1356 1357 1358 1359 1:160 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383

0245 0246 0247 024A 024C 024D 024E 024F 0250 0251 0252 0253

0254 0256 0258 025A 025C 025E 0260 0262 0264 0264 0268 026A 026e 026E 0270 0272 0274 0276 0278 027A onc 027E 0280 0282 0284 0286 0208

0036

028A 02116 028C 028D 028E 028F 0290

D8 E5 21 024A 06 00 09 Os)

4E 23 46 El C5 C9

u2C5 f332 onF 02CE 031F IJ2F7 O:20C 0204 02F2 02CO 02CO 02CO 0361 02CO 02CO 02CO 02CO 02CO 02CO 0344 02CO 0357 0280 02(0 02CO 02C9 02Cl

28 29 2A 30 31 34 35

ret push ld ld add add ld inc ld pop push ret

if ct I tab: detw

defw defw defw defw defw defw defw defw defw defw defw defw defw defw defw defw defw defw detw defw defw defw defw defw defw defw

ctlsiz equ

c ;control char is out of range hI ;save cursor hI ,ctltab-('E'~64).2 b,O hl,bc ;index through control character table hl,bc c, (11 I) hi b,(hl) ;get address of control subroutine hi bc

(options and defcur rstatt bell bakspc tab Ifeed upcsr forspc return nona nona nona clreos nona nona nona nona nona nona clreol nona clrscn escape nona nona homeup stuff

$-ctltab

;execute control code driver

o.esct) ne 0 ;Ctrl-e is define new cursor character ;Ctrl-~ is restore previous attribute mode ;Ctrl-g is the bell ;Ctrl-h is cursor left ;Ctrl-i is tab ;Ctrl-j is cursor down ;Ctrl-k is cursor up ;Ctrl-I is cursor right ;Ctrl-m is carriage return ;Ctrl-n is not acceptable ;Ctrl-o is not acceptable ;Ctrl-p is not acceptable ;Ctrl-q is clear to end-of-screen

not acceptable not acceptable not .acceptabl e not acceptable not acceptable not acceptable

;Ctrl-r is ;Ctrl-s is ;Ctrl-t is ;Ctrl-u is ;Ctrl-v is ;Ctrl-w is ;Ctrl-x is clear to end-of-line ;Ctrl-y is not acceptable ;Ctrl-z is clear screen ;Ctrl-[ is escape ;Ctrl-\ is not acceptable ;Ctrl-J is not acceptable ;Ctf-I-A ,Ctrl-

is hallie up is display control chars

Escape sequence table.

Maintains functional compatibility with termin~ls supporting ADM-3a style supersets.

esctab: db db db db db db db

, ( , , ) , , .. '

'0' 'I' '4' '5'

;disable attribute ;enable atribute ;clear screen ;strip keyboard upper bit ;pass keyboard upper bit ;char font and blinking ;char font and graphics

,> 8alcones Operat i/iU '>ystelll for the XEROX 820-11 MACRO-80 3.44 09-Dec-81 J ROIII-I'esid~nt CI t DI i ver J )

1384 0291 Jb db ' 6' ;char font and blinking I L 1:385 0292 :n db '7 ' ;char font and inverse video

1386 0293 38 db 'a' ;char font and la-light (

1387 0294 ;lD db - ;position cursor n 1388 0295 45 db 'E' ; I i.ne insert

1389 0296 51 db 'Q' ;cilaracter inse'rt 1390 0297 52 db 'R' ; line delete 1391 0298 57 db 'W' ;character delete 1392 0299 54 db 'T' ;clear to end of line 1393 029A 59 db 'V' ;clear to end of screen 1394 0011 esctbl equ $-esctab 1395 1396 029B 0361 escadr: defw clreos 1397 0290 U::l44 defw clreol 1398 029F 03F5 uefw chrde1 1399 02Al 037C defw I indel 1400 02A3 03DC defw chrins 1401 02A5 03A4 defw lin i ns 1402 02A7 0205 defw setxy 1403 02A9 01CF detw set low 1404 02AB 0109 defw setinv 1"105 02AD ()ID4 defw se t b I i 14116 02AF I1IDO defw setgra 1407 02Bl (Jl04 defw setbli 1408 02B3 1l1F7 defw setillsk 1409 02B5 U1F7 defw setillsk 1410 0287 0:357 defw Cll-SCII 1411 02B9 01EF defw enatr 1412 028B 01F2 defw disatr 1413 ifl 1414 if ($-escadr)/2 ne esctbl 1415 .printx Escape table mismatch 1416 endif 1417 endif 14113 endif ;o.esct and options 1419 1420 , , escape - Initialize escape sequence. 1421 1422 02BD 3E 01 escape: Id a,l 1423 02AF IL Id (de) ,a iset sequence state 1424 02CO C9 nona: ret ;for escape processing 1425 1426 , , stuff - Enable next char- ta be stored directly. 1427 1428 02[1 :jE 04 stuff: Id a,4 1429 02[3 I L Id (de) ,a ;set sequence state 1430 02C4 (9 ret ;for control char output mode 1431 1432 . , dljfcur - Enable next chara to be new cursor. 1433 1434 02C5 JE 05 defcur: Id a,5 1435 02C7 12 Id (de) ,a 1436 02CO C9 ret 1437

m 1430 , , I-,ollltlup - Move cursor to upper left. W 1439 ~

Tl Baleones Operat i"~1 System for tlltl XEROX 820-11 MACRO-80 3.44 09-Dee-81 .JJ Rom- ,-es i uen t C, t Dr· i vel' ,,-,

1440 U2C9 DE 20 homeup: Id c, i'use cursor addressing routine 1441 02CB C3 0210 jp setl-o., ; to do llOmeup almost for free 1442 1443 . , bakspc - Move cursor Ie ft. 1444 1445 02CE 7D bakspc: Id a,l ;check for left margin 1446 02CF Eo 7F and 01111111b 1447 02Dl C8 ret z ;abort if if! leftmost column 1448 0202 2D dec I ;back up cursor pointer 1449 02D3 C9 ret 1450 1451 i i forspc - Move cursor right. 1452 145) 0204 7D forspc: Id a, I ; cf,eck for rightmost colunm 1454 02D5 E6 7F and 01111111b 1455 02D7 FE 4F cp 79 1456 02D9 DO ret nc ;do nothing if already there 1457 020A 2C inc I 1458 02DB C9 ret ;else advance the cursor pointer 1459 1460 ; ; upscr - Move cursor up. 1461 1462 02DC 11 FF80 upcsr: Id de,-12B ;subtract I from row# component 1463 020F 19 add hi ,de ; of cursor pointer in hi 1464 02EO 7C Id a,h 1465 02EI FE 30 cp crt bas ; checl< for underflow of pointer 1466 02E3 DO ret nc 1467 02E4 26 3B Id Il,crttop-l ;wrap cursor a,-ound modulo 3k 1460 02E6 C9 ret 1469 1470 , , dncsr - Move cursor down. 1471 1472 02E7 11 0080 dncsr: Id de,120 ;add 1 to row# component 1473 02EA 19 add hi ,de ; of cursor' pointer in hi 1474 02EB 7C Id a,h 1475 02EC FE 3C cp crttop ;check for overflow of pointer 1476 02EE DO ret c 1477 02EF 26 3D Id h,crtbas ; ,-eset pointer modulo 128*24 1478 \ 02Fl C9 ret 1479 14BO ; ; return - Move cursor to left side, 1481 1482 02F2 III retun1: Id a, I ;clear column 1403 02F3 E6 00 and 10000000b 1484 02F5 6F Id l,a ;move cursor pointer back 1485 02F6 C9 ret ; to start of line 1486 1487 .. I feed - Move cursor down with scrol I, 1480

~ 1409 02F7 7D Ifeed: Id a, I

-0 1490 02F8 17 ria

-0 1491 02F9 7C Id a,ll I'D 1492 02FA 17 rIa ·;extraet row# component of hi ::s 1 '193 02FB EG 1 F and 00011 11 lb a. 1494 02FD 4F Id c,a ;copy row# into c for scroll test X 1495 02FE Cll 02E7 ca II dncsr ;move cursor to next row down m

I

1> Balcones Oper'a ( i IIU :::'ystem for' tile XEROX 1:l20-11 MACRO-I:lO 3.44 09-0ec-81 0 Rom-resident Cr't Dr' i ver [] It) 1490 0301 JA FFBI Id a, (base) ,test if cursor was on bottom row ::l 1497 0304 91 sub c , of screen before moving down CL 1498 0305 ~i 2 F319 Id (gold),a ,send scro II flag back to fast users X 1499 0308 CO ret I

nz ,exit if not at bottom m 1500 0309 E5 . push hi ;prepare scroll screen up

1501 030A 3A F31C Id a, (usrstk+1l 1502 0300 3C inc a 1503 030E C4 040F call nZ,bbg ;bury balcones gold, unless monitor running 1504 0311 CO 0341 ca II c I r I in ; f i I I top line with spaces 1505 0314 29 add hl,hl 1506 0315 7C Id a,h ;get row# component of hi into a 1507 0316 E6 If and 000 III II b 1508 0318 32 FFBI Id (base),a ;store new base Ii ne# 1509 031B 03 14 out (scroll) ,a ;scroll top line to bottom 1510 0310 E I pop hi ;restore cursor 151 I 031E C9 ret 1512 1513 , , tab - Move cursor to ne.l( t tab stop. 1514 1515 OJIF II 0008 tab: Id de,8 ;tabs are every 8 columns 1510 OJ22 70 Id a, I ;get column component of 1517 0323 E6 78 and 01111000u ipreviou5 tab position 1518 0325 83 add a,e 1519 0326 FE 50 cp 80 1520 0328 DO ret nc ;if next tab column past end of line 1521 0329 70 Id a, I 1522 032A Eo f8 and 11111000b ;advance cursor to next tab stop 1523 032C 6F I d I,a 1524 0320 19 add hi ,de 1525 032E C9 ret 1526 1527 ; i be II - Move speaker back and forth. 1521:l 1529 032F 3E 35 be II: ld a,bltim ,Bell time constant 1530 0331 03 29 be I 11: out (bellon),a ;push speaker out 1531 0333 06 61 Id b,blonc ;set Be II on time constant 1532 0335 10 FE djnz $ ;pause 6*2 micro seconds 1533 0337 03 28 out (bellof),a ;yank speaker in 1534 0339 06 61 Id b,blofc ;set 6e I I off, time constant 1535 0336 10 FE djnz $ 1536 0330 3D dec a 1537 033E LfJ F 1 jr nz ,ue III ;if more noise to make 1538 0340 U) ret 1539 1540 ; i c I r lin - C I ear' line. 1541 1542 0341 CD 02F2 c I r I iii: ca II return ;return cursor and fa II through clreol 1543 1544 , , clreol - Clear to end of line. 1545 1546 0344 7[) c I reo I: Id a, I 1547· 0345 E6 7f and 011111110 ;get column component of cursor posistion 1541l 0347 fE 50 cp 80 1549 0349 Oll ret nc ;if someone busted curpos 1550 034A ED 44 neg m 1551 034C C6 50 add a,80 ;calculate number of characters to clear W

W

m Balcones Opel-ati,,!) System t or- trle XEROX 820-11 MACRD-80 3.44 09-Dec-81 W ROlli-resident C, t D. i ver ~

155:! U34E 47 Id b,a 1553 034F 70 Id a, I ;save cucsor column 1554 0350 36 20 c I r I: Id (h I) , . ;clear next location 1555 0352 2C inc I 1556 0353 I [) FB djnz c I r-l ; i f end of line not clear 1557 0355 bF Id I,a ;restore cursor column 1558 0356 (9 ret 1559 1560 , , clrscn - c I ear' visible screen memory. 1561 1562 0357 21 3000 clr'sen: ld hl,crtmem ;home cursor 1563 035A 3E 17 Id a,23 1564 035C 32 FFBI Id (base),a ;put line 23 at bottom of screen 1565 035F D3 14 out (scroll),a ;note scroll regi'ster gets A8-AI2, not dO-d7 1566 1567 ; ; clreos - clear to end of screen. 156U 1569 0361 CD 0344 clreos; ca II clreol ;clear remainder of current row 1570 0364 E5 pust) hi ;save cursor location 1571 0365 ED, 4B FFBI c I r'sl : Id bC,(base) ;set bottom screen row to c 1572 0369 70 I (j a, I 1573 036A 17 ria 1574 O~H\B 7C Id a,h 1575 036C 17 ria ;get row# component of hI into a 1576 0360 E6 IF and 000 I1I11 b 1577 036F 89 cp c 1570 0370 28 08 jr z,clrs2 ;if hi is on bottom row of screen 1579 0372 CD 02E'! ca II dncsr ;point hi to next row 1580 0375 CD 0341 ca II c I r I in ;and f i I I tl1a t line with spaces 1581 0378 18 E8 jr clrsl 1582 037A E 1 clrs2: pop hi ;restore original cursor pointer 1583 0378 (9 ret 1584 1585 , , I indel - Line delete, 1586 1587 037C E5 Ii nde I; pust) hi ;save CUJ-sor address 1580 0370 CO 040F ca I I bbg ;bury balcones gold 1589 0300 29 add hi ,Ill 1590 0381 7C Id a,h 1591 03U2 Eb IF and 00011111 b ;extract row 1592 0384 ED 4B FF8d III bc, (base- I ) ;get base screen row in b 1593 0388 CO 03DI lind I; ca II smp ;set move parameters 1594 038B BU cp b 1595 038C 2f1 10 jr z, 1 i nd2 ; if last line 1596 038E C5 pusll bc ;b=last line, c=row 1597 038F 01 lHl50 Id bc,UO 1598 039L ED BO I d i ,-1599 0394 ( 1 pop bc 1600 0395 79 Id a,c

)> 1601 0396 :jC inc a

-a 1602 0397 FE 18 cp 24

-a 1603 0399 38 ED jr c,lindl lI> 1604 039B AF xor a ;wrap ::J 1605 039C 18 EA jr lind1 ;move next 1 i ne 0- IG06 039E EB 1 i n[12: ex de,hl >< 1607 039f CD U341 1 ind3: ca II c 1 r lin m

» 6"lculles Ope/uli,,!.! :'ystern for' U'le XEROX 020-11 MACRO-BO 3.44 09-0ec-Bl 0 ROIll-r'esident Crt [Jriver 0 (1) 1600 03A2 1'.1 pop hi .restore original cursor ::J 1609 03A3 (9 ret 0. 1610 >< 1611 , , I in ins - Line insert. m 1612

1613 OJA4 E5 linins: push hi ;save cursor position 1~14 03A5 3E 17 Id a,23 ;get bottom line 1615 03A7 CO F31E cal I cca ;compute cursor address 1616 03AA CO 040F ca II bbg ;bury balcones gold 1617 03AO El pop hI 1618 03AE E5 PUSll hI 1619 03AF 29 add hl,hl 1620 0360 7C Id a,h 1621 0361 E6 IF and 00011111b ;extract cursor row 1622 0363 47 Id b,a 1623 0364 3A FF61 Id a,(base) ;set last 1 i ne 1624 0367 68 lin i I : cp b 1625 03bO 2B 13 jr z,lln!3 ; if move complete 1626 036A 30 dec a 1627 03B6 F2 03CO jp p,Iini2 1628 03BE 3E 17 Id a,23 1629 03CO CO 0301 1 in i 2: call smp ;set move parameters 1630 O3C3 EB ex de,hl 1631 03C4 C5 push bc 1632 03C5 01 0050 Id bC,eO 1633 03CU EO BO Idir 1634 03CA C 1 pop bc 1635 03C6 18 EA jr I j nil ;llIove next line 1636 03CO E1 lin i 3: pop hI 1637 03CE E5 push hi ;restore cursor 1638 03CF 10 CE jr I ind3 ;clear cursor line i639 1640 i; smp - Set move parameters. 1641 1642 0301 4F smp: Id c,a ;save I~OW

1643 0302 CD F324 ca 11 cca2 1644 0305 EB ex de,hl 1645 0306 79 Id a,c 1646 0307 CD F3'23 ca II ccal 1647 030A 79 Id a,c 1640 0300 U) I'e t 1649 1650 , , ch,'ins - Character insert. 1651 1652 030C E5 Clll' ills: PUSll ~d

1653 03DD 70 ld a,l ;set cursor column 1654 030E E6 7F and 01111111 b ;set move length = 79-column 1655 03EO ED, 44 neg 1656 o3E2 C6 4F add a,79 1657 03E4 47 Id b,a ;numuer of chars to move 1658 03E5 7E Id a, (h I) ;get char under cursor 1659 03E6 36 20 Id (h I) , . ;clear char under cursor 1660 03EO 20 06 jr z,chrin2 ; if cursor in last column 1661 03EA 2C chrinl: inc I 1662 03EB 4E Id C,(hl) m 1663 03EC 71 Id (h I) ,a W

Ul

m W en

» -0 -0 It) :::s 0-X m

Balcones Operating System for the XEROX

ROIll-resichtnt C,-t 0,' i ver

1664 03ED 79 1665 03EE 10 fA 1666 03fO 32 f319 1667 03f3 El 1668 03f4 C9 1669 1670 1671 1672 03f5 E5 1673 03f6 7D 1674 03f7 E6 7f 1675 03f9 ED 44 1676 03ffl C6 4f 1677 03fD 4F 1678 03fE 06 00 1679 0400 54 16BO 0401 50 16BI 0402 lA 16B2 0403 32 F319 16B3 0406 23 16B4 0407 C4 041B 16B5 040A EB 16B6 040B 36 20 1687 0400 EI 16B8 040E C9 16B9 1690 1691 1692 040f CD 02F2 1693 0412 11 FF5C 1694 0415 01 0050 1695 04Hl ED BO 1696 041A C9 1697 169B 1699

B20-1I MACRO-BO 3.44 09-Dec-BI

Id a,c djnz chrinl

chrin2: Id (gold),a I shit t line into the gold m\ne

pop hi ret

' , chrdel - Character" delete.

, chrde I: push hI

ld a, I anel 01111111b ;isolate cursor column

neg ada a,79 lei c,a ;number of chars to move 79-column

ICI b,O Id d,h Id e, I Id a, (de) lei (gold),a Imine balcones gold

inc hI ca II nz,ldirx ex de,hl ICI (h I). . ;blank last char on line

pop hI ;restore cursor

ret

' , bbg - bury balcones gold.

bbg: call return lel de, I inbuf Id bc,BO

Idi rx: Idir ret

subttl Logical to Physical Driver .Executioner

page

» o o 1'1) ::J a... >< m

m w '-J

Balcones Operalill,j Sy!>tem tor the XEROX 1:120-11 Loyical to Plly"icdl Dr'iver- Executioner

1700 1701 1702 1703 1704 1705 1706 1707 170B 1709 1710 1711 1712 1713 1714 1715 1716 1717 171 U 1719 1720 1721 17L2 17~3

1724 17L5 1726 ln7 172U 1729 17]0 1731 1732 1733

051B!

f::l44 f345 f346 f347 f34B f34B f34D f34E f34f F350 f351 F352 f355 F356 F357 f358 f359 f35A f35B F35C f35[l f35E

+

23 xqdvr: E5 23 5E 21 f360 16 00 19 19 5E 23 7E 21 f3BO 19 19 5E 23 56 E 1 71 2B D5 C9

MACRO-BO 3,44 09-Dec-1:I1

above d&seg

;code goes in ram

Xqdvr - Execute Physical Driver.

Entry: HL; Pointer to Physical Drive Request Block

inc push inc Id Id Id add add Id inc Id Id add add ld inc Id pop Id dec push ret

subttl page

hi hi hI e. (h I) hi, Se I tab d,O hi ,de til ,de e, (h I) hi a, (h 1 ) hl,Drvtab hl,de hl,de e, (h 1 ) hI d, (h I) hI (h I) ,a hI de

;point at physical unit

;set logical drive ;Set driver mapping table address

;index into driver select table

;set physical driver index

;set physical unit ;set Driver table address

;set physical driver address

;recover request block address ;store physical unit

;execute physical driver

Physical Disk Driver Area

m w 00

» "0 "0 ttl j 0.., X m

Balcon",» Operalill,j System for UHl XEROX 020-11 MACRO-80 3.44 Physical Disk lJrlver Ar'ea

09-Dec-81

1734 1735 ; i Physical Disk 0,- i ver Area. 1736 1737 above 1738 035f" + d8.seg 1739 , . Waste space to get drivers on page boundry. 1740 1741 f35f Wasted: 1742 OOOf bndry equ Ofh 1743 if ($ and bndry) ne 0 1744 f35f defs bndry+l-($ and bndry), -1 1745 endif 1746 1747 ; ; Logical to Physical Drive Mapping Tables. 1748 1749 Se I tab contains two bytes per logical CPIM drive A-P. 1750 The first byte is an index into the physical driver 1751 address table below. The second byte is a unit number 1752 that is passed to the driver by the standard deblocker. 1/53 , 1754 f360 Se I tab: 1755 1756 f360 01 00 .A: defb 1,0 ;floppy Unit 0 1757 f362 01 01 .6: defb I , 1 ,; Floppy Unit 1 1758 f364 01 02 · C: defb 1 : 2 ;Floppy Unit 2 1759 f366 01 03 .0: defb 1,3 ;Floppy Unit 3 1760 1761 f368 01 04 · E: defb 1,4 ;Rigid Partition 0 1762 f36A 01 05 · f: defb 1,5 ;Rigid Partition I 1763 f3GC 01 06 .G: defb 1,6 ;Rigid Par'tition 2 1764 f36E 01 07 .H: defb 1,7 ;Rigid Par't it ion 3 1765 1766 f370 00 00 · 1 ; (Iefb 0,0 ; Er;ror- Driver-1767 f372 00 00 · J: detb 0,0 ; E,-ror' Drive,' 1768 f374 un 00 · K: defb 0,0 ;Err-or Dr-iver-17G9 f376 00 00 · L: defb 0,0 ; E,-ror- Driver 1770 1771 f378 Oll 00 .M: (Ie ftl 0,0 ;Error Driver 1772 f37A 00 00 .N: defb 0,0 ;Error Driver 1773 f37C 00 00 .0: defb 0,0 ; Error' Dr i ver' 1774 f 3 7E: UO 00 .P: (Jefb 0,0 ;Error Driver 1775 1776 , , PI1YS i ca I Driver Address Table. 1777 1778 Dvrtab contains the addr'esses of several independent 1779 physical disk driver-so By convention, driver II 0 always 1700 returns a select error. 1781 1702 f380 f42A Drvtab: defw Se ler'r ;select error physical driver 1783 f382 f4BO (ie f w DSkdvr ;Disk driver (WD or SA) 1704 F384 nooo defw 0 ;Empty physical driver expansion 1785 f306 0000 defw 0 1786 f388 (JUOO defw 0 1707 f3BA 0000 defw 0 1780 f30C !JOOO defw 0

slots

» "0 "0 (1) J a. >< m

m w I.D

Balco(les Physical

17B9 1790 1791 1792 1793 1794 1795 1796 1797 179B 1799 HlOO 1801 1802 1803 1804 1805 1806 1807 HllJ!l 1809 l!l1 n 10 II 1812 lB13

Openlt.ill'J ~ystem f 01' tile XEROX B20-11 Disk 01 ivel Area

F3BE fFFF

.. . FeUU dirbuf Form chkOO FD211 chkOl FD40 chk02 FD6D chk03 0000 chk04 0000 chk05 0000 chk06 0000 chk07

FD811 a II 00 FOAll a 1101 FDCC) a 1102 FDEl) a 1103 fEOO all04 FE80 a II 05 fECO all06 fEEO al107

MACRO-BO 3.44 09-Dec-Bl

defw 0-1 ;Illark last empty expansion slot

Overlaid Monitor Ram Address Definitions.

equ OfcBOh ;di rector' buffer equ OfdOOh ;Directory Check Vector for Floppy Drive 0 equ Ofd20h ;Directory Check Vector for Floppy Drive 1 equ Ofd40h ;Directory Check Vector for Floppy Drive 2 equ Ofd60h ;Directory Check Vector for Floppy Drive 3 equ 0 ;No Check Vector for Rigid Partition 0 equ 0 ;No Check Vector for Rigid Part it ion I equ 0 ;No Check Vector for Rigid Partition 2 equ 0 ;No Check Vector for Rigid Partition 3

equ Ofd80h ;Floppy Orive. 0 Allocation Vector equ OfdaOh ;Floppy Drive 1 Allocation Vector equ OfdcOh ;Floppy Drive 2 Allocation Vector equ OfdeDh ;Floppy Drive 3 Allocation Vector equ OfeOOh ;Rigid Partition Allocation vectors equ Ofe80h equ OfecOh equ OfeeOh

subttl Disk Parameter Headel's page

m .J::.. 0

» 1J "0 lI> J 0... >< m

Balcunes Opera t i IIU ~ystelll tor Disk Parameter lie.;ders

IBI4 1815 IBID IB 17 F39fl UOOO 0000 1818 F394 (Jooo 0000 1819 F391:1 FC80 0000 1820 F39C FDOO FD80 1821 1822 F3AO 0000 0000 1823 F3A4 OUOO 0000 1824 F3AU FC80 0000 1825- F3AC F020 FDAO 1826 1827 F3BO 0000 0000 1828 F3B4 0000 0000 1829 F3B8 FC80 0000 1830 F3BC fD40 FDCo 1831 1832 F3ClJ nooo 0000 1833 F3C4 0000 0000 1834 F3C8 FC80 0000 18:35 F3CC FD60 FDEO 1836 1837 F30D DODO 0000 1838 F304 Ilono 0000 IU39 F308 FCUO F470 1 U LJ() f30C UOOO FEOO I U Ll1 IU42 F3EIJ DODO 0000 11:14 :i F3E4 DOnO 0000 IU44 F3EU FCUO F480 1845 F3EC UDnO FE80 lU46 IU47 F3FLJ DODO 0000 1848 F3F4 ooun 0000 1849 F3FU fC80 F490 1850 F3FC llnDD FECD 1851 IB52 F40(J IJllOo 0000 1853 F411'1 11000 0000 IU54 F40U FCUO F4Ao IU55 F41)c 11000 FEED IU56 IU57 lU5U

tI.e XEROX 820-11

; ;

: Dpbase:

MACRO-80 3.44 09-Dec-BI

Disk Parameter Headers.

dw 0,0,0,0 :Floppy Drive 0

dw dirbuf,O dw chkOO,allOO

dw 0,0,0,0 :Floppy Drive 1

dw dlrbuf,O dw chkol,allOl

dw 0,0,0,0 :Floppy Drive 2

(Jw dirbuf,O dw chk02,all02

dw 0,0,0,0 :Floppy Drive 3

dw dirbuf,O dw ClOk03, a I 103

dw 0,0,0,0 :Rigid Partition 0

dw dirbuf,Dpbrg4 dw chk04 ,a I 104

dw 0,0,0,0 :Rigid Partition 1

dw dirbuf,Dpbrg5 dw chk05,all05

dw 0,0,0,0 ;Rigid Partition 2

dw dir'buf,Opbrg6 dw Chk06, a I 106

dw 0,0,0,0 ;Rigid Partition 3

dw dirlJuf ,Opbrg7 (Jw chk07,al1D7

subttl Sector Translate Tables page

l> D D ttl ::J a.. x m

BaicOlle5 Operal;"\) System fo,' tile XEROX 820-11 MACRO-80 3.44 Secto,' T'"ollslate Tables

09-0ec-81

1859 1860 i; Sector Translatioll Tables. 1861 1862 For 8 inch single density 1863 Skew by 6 1864 , Itl65 F41ll 01 07 00 13 trn6: db 01,07,13,19 1-866 F414 19 05 DB II db 25,05,11,17 1867 F418 17 03 09 OF db 23,03,09,15 1868 F41C 15 02 08 DE db 21,02,08,14 1869 F42D 14 IA 06 DC db 20,26,06, 12 1870 F424 12 18 04 OA db 18,24,04,10 1871 f42U 10 16 db 16,22 1872 lt17 3 f42A 21 0000 selerr: Id hl,O 1874 F42(J f6 fF or -1 1875 f42f C9 ret 1876

drives.

1877 subttl Floppy Disk Parameter Blocks 1878 page

m .j::o. N

» "U "0 it) ::l a.. X m

Bdleont:s 0pt:r"olin9 System tor tile XEROX 820-11 MACRO-80 3.44 Floppy Disl, Pol"i'llllt:ter Blocks

09-Dee-81

1879 \!.l00 1081 1882 1883 1884 1085 1886 1887 1888 1889 If:!90 11391 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 19l17 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921

F43!J

F43U F43;! F435 F439 F43[J F43F

F440 F442 F445 F449 F440 F44F

F450

F450 F452 F455 F459 F45D F45F

F46lJ F462 f465 F469 F46D f4GF

UOIA 03 07 00 OOf2 003F ODCO 0010 OU02 llll

OOIA 04 Of 01 OOF6 007F (lOCO 0010 U002 llO

0034 04 Of 01 DOf2 007F OOCO 0020 00112 81

(J034 05 IF 03 OOF6 007F OOCO 0020 (J002 81

: dpb8s:

Floppy Disk Parameter Blocks, one per media format.

Singlt: Density, Single side

dw 26 ;spt db 3,7,0 :blkshf, blkmsk, nullmsk dw 242,63,192,16,2 :dsw,dirm,al loeOl,chksiz,trk off

db o :128 byte sectors

Single Density, Double Side

dw 26 : spt db 4,15, I :blksl1f, blkmsk, nullmsk dw 246,127,192, 16,2:dsw,dirm,allocOI ,chksiz,trk off

db o : 128 byte sectors

Double Density, Single Side

dw 2"26 :spt db 4,15,1 :blkshf," blkmsk, nullmsk dw 242,127,192,3~,2:dsw,dirm,allocOI,chksiz,trk off

db 8 III :256 byte sectors, track zero single density

Double Density, Double Side

dw db dw

db

subttl page

2"26 :spt 5,31,3 ;blkshf, blkmsk, nullmsk 246,127,192,32,2:dsw,dirm,allocOI,chksiz,trk off

81h :256 byte sectors, track zero single density

Micro Floppy Disk Parameter Blocks

}> Balcolles Operatill!J System for tile XEROX 820-11 MACRO-OO 3.44 o Micro Floppy nis~ Parameter' BlOCks

09-Dec-01

o rt> :l a.. >< m

1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1 ~l54 1955 1956 1957 195fJ 1959 1960 1961 1962 1963 1964

F47U

F4711 F472 F475 F479 F47(l F47F

F4UIl F482 F405 F489 F4BD F4f1f

F491l

F491l F492 F495 F499 F49(1 F49f

F4AO F4A2 F4Af) F4A9 F4AD F4Af

0012 03 07 D052 0080 0003 DU

UU12 03 07 UDAC 0080 0003 un

11022 llJ 07 009C OOCO 0003 B 1

(l022 ll4 OF nOA2 ooeo (lOO3 81

dpb5s:

Single

dw 00 db

001F dw 0000

db

Single

dw 00 db

001F dw 0008

db

dpb5d:

Double

dw 00 db

003F (iw 0010

db

Double

dw 01 db

003F dw 0010

db

subttl page

Density, Single Side

18 ;spt 3,7,0 ;blkshf, blkmsk, nulmsk 82,31,128,B,3 ;dsw,dirm,allocOl,chkslz,trk

0 ;128 byte sectors

Density, Double Side

18 ;spt 3,7,0 ;blkshf, blkmsk, nulmsk 172,31,128,8,3 ;dsw,dirm,allocOI,chkiiz,trk

0 ; 12B byte sectors

Density, Single Side

17*2 ;spt 3,7.0 ;blkshf. blkmsk, nulmsk 156.63.192,16,3 ;dsw.dirm,allocOI,chksiz,trk

Blh ;256 byte sectors, track zero

Density. Double Side

17*2 ;spt 4. 15, 1 ;blkstlf, blkmsk, nulmsk 162,63.192,16,3 ;dsw,dirm,allocOl,Chksiz,trk

Blh ;256 byte stlctors, tr-ack zero

Westtlrn Digital WD-1797-02 Floppy Disk Driver

off

off

off

single density

off

single density

m

t

);> "0 "0 (1) ::J 0.. >< m

Balcon"s OperdtinQ System for the XEROX 820-11 MACRO-80 3.44 West"rn Diyltdl wD-1797-02 floppy Disk Driver

09-Dec-81

1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980

. ; Standard Disk Driver Interface Definitions.

The main entry point (fLOPPY) is called with HL pointing to a disk driver request block. All information is passed in this request as follows:

HL-> db db db dw dw dw

command phunit cpunlt track sector a(ldress

; 1 = read, 0 = write, -1 = select dph jphysical 'unit for request (0-3) ;CP/M logical drive for request (0-15) jCP/M track number (offset already applied) jPhys sector number (after deblocking) jCP/M dma transfer address

subttl Assembly Constants page

» 0 0 /1) ::J 0->< m

m +=­U1

fldlculles Assembly

1981 1982 1983 1984 1985 1986 1987 198B 1989 1990 1991 1992 1993 1994 HJ95 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 201 1 2012 2013 2014

Ope'"d t i 110 Constdnt!..

0066

0010' 0010 00 I I 0012 0013 ODIC 0030 0031

0007 (JOD4 01105 0006 OOAO

0040 0028

0004 0005 0006 OOOA

~ystellt f 0" tlHl XEROX 820-11 MACRO-80

NMI equ

.. WD 1797

wds,' equ w(lcr equ wdtr equ wdsn equ wddt equ wdsl equ wdsd equ wddd equ

.. External

fm.un equ fm. (15 equ fm.dd equ fm. fv equ fm.ddss equ

ntrkB equ ntrk5 equ

c.Bin equ c. two equ t imou equ dpbofs equ

subttl page

3.44 '09-Dec-81

00066h ;address of non maskable interrupt

110 port addresses.

10h ;status IOh ;command I 1 h ; track 1211 ;sector 13h ;data Icl1 ;dr.ive select port 3011 ;select single density 31h ;select double density

Disk Parameter Tables.

7 4 5 6 ( I 5hl fm.(ld) or ( 1 shl fm.un)

77 40

4 5 6 ,motor I select time out 10 ;offset in dph for dpb address

Floppy Disk Driver P,'oper

TI Bdlcofl~:; Op~, d l i flU Sy:;tem fo,- tile XEROX 820-11 MACRO-OO 3.44 09-Dee-Ol ~ fluppy D bk 0," i v b I PI-oper en

2(J15 2016 , , Western Digital floppy Disk Driver. 2017 2010 f4BO CD f647 Dskdvr: call rde ,un hang busy controller 2UI9 f4B3 7E Id a, (h I) ;set command 2020 f4B4 23 ine hi ;point to unit 2021 f4B5 32 f4E7 Id (rdop),a 2022 f4B8 3C inc a 2un F4B9 28 55 jr z,selec ;if select command 2024 F4BB 06 OA Id b,IO ;set ,-etry count 2025 F4I:JIJ C5 flopl: push bc i save count 2026 F4BE E5 push hi i save conunand 2027 f4Bf 7E Id a, (h I) ;set unit select 2028 F4CO CO'F544 ca II selunt 2029 F4C3 FA·F506 jp m,flop5 ; i f unit not ready 2030 F4C6 :n inc hi 2U31 F4C7 2:j inc hi 2032 f4CO 4E Id c, (h I) ;set track low 2033 F4C9 CD F5A3 ca II seek" ;position disk 2034 F4CC 'IE Id c, (h I) ;retrieve track low 2035 F4CD 20 37 jr nz,flop5 ; i f unrecoverable error 2036 F4CF 23 inc hi ;track high 2037 F40U 23 inc hi 2038 F4DI 13 inc de ;point to second byte of track table entry 2039 F4D2 IA Id a, (de) ;get diskette type 2040 F4D3 E6 18 and 18h 2U41 F4Db 7E Id a, (h I) ;sector low 2042 F4D6 20 06 jr nz,flop2 ; if single density, cp/m skews 2043 F40B 79 Id a,c ;get current logical track 2044 F409 B7 or a 2045 F4DA 7E Id a, (h I) ;set sector 2046 F4DB 28 01 jr z,flop2 ; if single density track zero 2047 F40D ::IC inc a ;translate for double density 2048 F40E D3 12 flop2: out (wdsn) ,a ;set sector to read in 1791 2049 F4EO 23 inc hi ;skip sector high 2050' F4EI 23 inc til ldmal 2051 F4E2 5E ld e, (hi) ;'set transfer address to HL 2052 F4E3 23 inc hi ;dmah 2053 F4E4 56 I (j d, (h I) 2054 F4E5 EB ex de,hl 2055 F4EI) ]E 00 Id a,O ;set read/write switch 2056 f4E7 rdop equ $-1 2057 F4EU B7 or a 2058 F4E9 (JE AB Id c,Oa8h ;preset write command 2059 F4EB 3E A3 ld a,Oa3h ;set second part of OUT! 2U60 F4ED 2B 03 jr z,flop3 l i f write 2061 F4EF OE 88 Id c,088h ; turn w r it e command into read command 2062 F4FI :lD dec a ; turn OUT! into INI 2063 F4f2 J2 F4fE f Ilop3: Id (rdwra),a ,set up i/o direction

l> 2U64 f4f:; JE UO Id a,O

-0 2065 F4fG rdwrs equ $-1 ;set side compare flag

-0 2066 F4F7 U I add a,c (J) 2067 f4f8 4f Id c,a :J 2068 F4f9 CD f61D ca II stc ;start transfer 0.. 2069 f4fC 71) flop4: halt ;wait f 0'- DRQ or INT >< m

l> Balcones Oper'at illU System tor t I)e XEROX 820-11 MACRO-80 3.44 09-Dec-81 ::J Floppy Disk Dr i ver- Pr'oper :J b 2070 F4FD ED A2 inl ;transfer next byte :l 2071 F4FE ruwra equ $-1 :l. 2072 F4FF 2U F6 jr nz,flop4 ;if transfer not complete 0( 2073 F501 CD F639 cal I ttc ;ter-mlnate transfer command n 2074 F504 E6 OF and Odfh ;set error bi ts

2075 F506 EI flop5: pop hi ;recover command pointer 2076 F507 C I pop bc 2077 F5U8 C8 ret Z ;if no errors 2078 F509 DB ret c ; I f 5.25" not ready 2U79 F50A CD F069 call softv 2080 F50D 10 AE djnz flopl ;if retry not exceeded 2U81 F50F C9 ret 2082 20B3 , , select - select dph for uni t. 20B4 2005 F510 If:. selec: Id a, (h I) ;set un it 2006 F511 FE 04 cp 4 2087 F513 02 F42A jp nC,selerr ; if bad unit select 21188 F516 26 OU Id h,O 2009 F518' CD F039 ca II dayti ;set address of timers 2090 F516 26 dec hi ;point to motor timer 2091 F51C 22 F559 Id (mtradr),hl 2092 F51F 2B uec hi ;point to configurable step rate 2U93 F520 L2 F66E Id (stpadr),hl ;store address of step rate for media selector 2094 F52~j 26 00 Id h,O 2095 f525 6f Id I,a 2096 F526 29 add hi ,hi ;multlply by 2**4 2U97 f527 29 aud hi ,hi 2098 F528 29 add hi ,hi 2099 F529 29 add hi ,hi 21nO F52A II F390 Id de,Dpbase ;'set address of disk parameter headers 210 I F52D 19 add hi, de ;set dph address 2102 F52E 1:5 pusl) hi 2103 F52F CD F65A ca I I smf ;set media format 2104 F532 EI pop I) I 2105 F533 CA F42A jp z,selerr ; if no ;ned i a 2106 F536 7 I Id (h I) ,c ; sto(-e translate table 2107 f537 23 inc hi 2108 f538 70 Id (h I) ,b 2109 F539 01 UOOA Id bc,dpbofs 2 11O F53C U9 add hi ,bc ';point to dpb addr and clear carry 2111 F5~D 72 Id (h I) ,d ; fill in dpb address 2112 F53E 2B dec hi 2113 F53F 7 :3 Id (11 I) ,e 2 114 F54ll ED 42 sbc 111, bc ;point back to dph 2115 F542 AF xor a 2 116 F54:1 C9 ret 2117 2 118 , , select physical unit. 2119 212O f544 'IF selunt: Id c,a ;5CJ.ve select 2121 F545 EB ex de,hl 2122 f546 21 F700 Id hi ,trktbl+1 ;set track / density table address 2123 F549 Ob 00 Id b,O 2124 F546 119 add I'll, bc m 2125 f54C 119 add hl,bc

~

m Baleo"es Oplll'aliliU System for tile XEROX 620-11 MACRO-60 3.44 09-0ec-61 ~ Floppy Disk Dr' i vel' PI'oper 0;)

2126 F540 n F601 Id (smfa),hl ;save address for media selector 2127 F550 EB ex de,hl 2126 F551 I A Id a, (de) ;get previous density switch 2129 .F552 lB dec de ;point to track word 2130 F553 CO F596 ca II selden ,select density 2131 F556 3E 06 Id a,timou ;start motor I select timer 2132 F55U 32 F559 Id (mtradr),a 2133 F559 mtradr equ $-2 ;address f i I led in by once only routine 2134 F55B FB ei ;insure clock enabled 2135 F55C CB ll9 res 1, c ;map C->A, 0->6 2136 F55E DB 1C in a,(wdsl) ;read current select 2137 F560 47 Id b,a 2136 F561 E6 F6 and not 7 2139 F563 B I or c ;insert new select 2140 F564 3C inc a ;0-1. 1-2 2141 F565 03 Ie out (wds I ) ,a ;select drive 2142 F567 All xor b 2143 F568 E6 03 and 3 2144 F56A 28 25 jr z,sel3 ;if drive select identical 2145 F56C 3E FF Id a,-1 ;force track position recovery 2146 F56E 12 Id (de),a 2147 F56F eB 60 bit c.Sin,b ;test S/5 status 214B F571 20 IE jr nZ,sel3 ;if S" 2149 F573 CO F647 ca II rdc ;set type I status 2150 F576 06 08 Id b,2*4 ;watch for four holes (6 transitions,> 2151 F570 E5 sellw: pusl" hI 2152 F579 2A F559 Id hl,(mtradr) ;get address of motor select timer 2153 F57C 7E Id a, (h I) 2154 F57D E I pop hI 2155 ·F57E 06 04 sub t imou-2 , look for 1-2 seconds 2156 f580 DB ret c ;if drive not spinning 2157 F581 DB 10 in a,(wdsr} 215B F583 E6 02 and 2 2159 F585 2S Fl sel2: jr z, se 11 w ;if index not under light 2160 F587 3A F585 Id a,(sel2) ;switch index polarity 2161 F58A EE 08 xor' 6 ; ( j r z) xor (jr nz) 2162 F58C 32 F5S5 ld (seI2),a 2163 F58F 10 E7 djnz se 11 w ;wait for at least three revolutions 2164 F591 06 10 sel3: in a,(wdsr) ;set ready status 2165 F593 E6 60 and 80h 2166 F595 C9 ret 2167 2166 F596 JE 16 se'l dns: Id a,16h ;set t r'ack zero single density 2169 F598 32 F632 selden: Id (dsw) ,a ;store sw itch for read/write routines 2170 F59B E6 16 and ISh 2171 F59D D3 31 out (wddd) ,a ;pre-select dual density 2172 F59F CO ret z ; if dual density 2173 F5AU D3 30 out (wdsd) ,a ;select single density 2174 F5A2 C9 ret

» 2175

-a 2176 , , seek - position diSk.

"0 2177 tD 217ll F5A:j 7u sllekx: Id a,c ,set new track ::J 2179 F5A4 En or a a. 2180 F5Ab CC F596 ca II z,seldns ;force single density track 0 X 2181 F5AB 13 inc de m

» Balcone,; Operat ill~ :'ystem for ti,e XEROX ll20-I1 MACRO-OO 3.44 09-Dec-81 U floppy Disk [J,' i ve I Pr'oper U tb 2102 F5A9 IA Id a, (de) J 2183 F5AA IB dec de 0.. 2104 F5AB E6 01 and 1 X 2105 F5AO 28 15 jr z,sekl ;if one sided diskette m 2186 F5AF DB Ie in a, (wds I )

21B7 F5BI C8 67 bi t c.Bin,a 21BB F583 Ob 4D Id b,ntrkB ;set number of eight inch tracks 2 III 9 F5B5 20 02 jr nZ,sekO ;if BOO drives 2190 F5B7 [J6 2B Id b,ntrk5 2191 F5B9 79 sekO: Id a,c ;set seek track 2192 F5BA 138 cp b 2193 F5BB JE 00 Id a,O ;preset side a 2194 F5BO 3U 05 jr c,sekl ;if side a 2195 F5BF 79 Id a,c 2196 F5CO 90 sub b ;wrap to side r 2197 F5CI 4F Id c,a 2190 F5C2 JE 02 Id a,2 ;set side I 2199 F5C4 :12 F4F6 sekl: Id (rdwrs),a ;store Fl (update SSO) 2200 F5C7 117 add a,a ;move into select port position 2201 F5CO 47 III b,a 2202 F5C9 F3 di 2203 F5CA DB lC in a,( ... L1sl) 2204 F5CC CB 97 r·es 2,a 2205 F5CE 80 or b 2206 F5CF FB ei 2207 F5DO 03 IC out (wdsl),a ;send out REAL SSO 2200 F5D2 IA III a, (de) ;check current posHlon 2209 F5D3 D3 II out (wdtr),a ; inform 1797 of current track 2210 F5D5 B9 ep c 2211 F5D6 28 17 jr z,seek3 ; if position ok, load head 2212 F500 :JC inc a ; checl, for forced recovery 2213 F5D9 CC F5FO ca II z,rse ;recover seek errors 2214 F5DC 28 00 jr z,seekl ; if error not recoverable 2215 F5DE 79 seekO: Id a,c ;set new track 2216 F5DF 03 13 out ( ... ddt),a ; in data register 2217 F5EI 3E IC Id a,lch ;set seek with verify command 2210 F5E3 CD F643 ca II isc ;issue step command 2219 F5E6 E6 9ll and 98h 2220 F5EO 79 Id a,c ;update current track 2221 F5E9 20 02 jr z,seek2 ;if no errors 2222 F5E8 f6 FF seek I: or -I ;force recovery next time 2223 F5ED 12 seek2: Id (de) ,a 2224 F5EE C9 ret 2225 F5EF CD F647 seek3: ca II ,'dc .set type I status 2226 F5F2 E6 20 and 20h ;test head load 2227 F5F4 28 EO jr z,seekO ; if head is not loaded 2220 F5fb AF retzr: xor a ;say seek complete 2229 F5F7 C9 ,'et 2230 2231 ; i rse - recover seek error. 2232 2233 f5FO L5 rse: push bc 2234 f5F9 CD f605 ca II rdid ,read id mark 2235 F5FC 20 05 jr nZ,rsel ; if track position identified

m 2236 F5FE CD F641 ca II recai ; reca librate

fD 2237 F601 Eb 04 and 4 ;verify track zero flag set

m Balcunes Ope,at iliU Systelll f 0 ,- tlH! XEROX 820-11 MACRO-80 3.44 09-Dec-bl 1J1 floppy Disk D,' I ve r PI'opl:!r 0

2238 F603 Cl I-sel : pop bc 2239 F604 C~ ret 2240 2241 , . rd I (j - read Id mark. 2242 ; 2243 F605 OE C4 rdid: Id c,Oc4h ;set Read Address Command 2244 F607 CD F61D ca II stc ;start transfer command 2245 F60A 76 halt ;wait for Interrupt 2246 F60B ED 40 In b, (c) ;first byte is track 2247 F60D 76 halt 2248 F60E ED 48 in c, (c) ;second byte is side, pitch next 4 2249 F610 CD F639 ca II ttc ;terminate transfer command 2250 F613 E6 98 and 98h ; ignore lost data 2251 F615 20 04 jr nZ,rdidl ; if track not identified 2252 F617 70 Id a,b 2253 F618 D3 II out (wdtr),a ; te I I 1797 track head is on now 2254 F61A F6 defb Of6h ;or xra to set NZ 2255 F61B Af rdidl: XOI' a ;set track not found 2256 F61C C~ ret 2257 2258 , , stc - start transfer command. 2259 ::'260 F6lD F3 stc: di ; lock norlllal interrupts 2261 F61E 3A 0066 Id a, (NMI) isave byte at NMI address ::'262 F6?1 32 F63A ld (ttca),a 2263 F624 3E C9 Id a,Oc9h ; stor'e RET tllere 2264 F626 32 0066 ld (NMI),a 22E5 FE29 79 ld a,c ;retl-ieve command 22E6 FE2A 01 1413 Id bc,wddt+20*256 ; 1797 access t i Iller I data port 2267 FE2D D3 10 out (wdcr),a i issue command 22li8 F62F 10 FE djnz $ ;pause 60 usec ::'269 F631 3E 00 Id a,O 2270 F632 dsw equ $-1 ;density switch 2271 F633 E6 18 and 1811 ;say .-eady alHj density 2272 F635 CEl ret z ;if double density 2273 FE36 OE 80 Id b,128 ;set 128 byte single density sectors 2274 F638 <:9 ret 2275 2276 , , ttc - tenninate transfer' command. 2277 2278 F639 JE 00 t t c: Id a,O ;restore location 66 2279 F63A ttca equ $-1 2280 F63B :L! U066 Id (NMJ),a 2281 F63E FB e i ;take interrupts now 22U2 FE3F 18 OA jr woe ;wait for 1797 to complete 2283 2284 ; ; reca I ib,-ate drive. 2285 2286 F641 I\f- reca 1 : xor a ;set restore command I track 0

p 2287 F642 12 Id (de) . a ;set t.-ack zero

-0 22U8 -0 22U9 .. isc - issue step command. tt> 2290 ::J 2291 FE43 F6 01 isc: or 1 ; insert step rate 0.. 2292 F644 stepr equ $-1 ;*****=>;m,?dify here for step rate change >< 2293 F645 18 02 jr icc m

» u U I'D :J 0-x m

m lJ1 -'

Balcontl!i Optl'-d-lill,l Sy!ittlm tor tlltl XEROX 820-11 Floppy Disk D,ivl;!' P,·uper

2294 F64"f :JE DO rdc: 2295 2296 , , 2297 , 2298 F649 O:J 10 icc: 2299 2300 , , 2301 2302 F64B :JE 14 woc: 2303 F64D 3D woc I: 2304 F64E 20 FO 2:W5 F650 CD F066 woc2: 2306 F653 DB 10 2307 F655 CB 47 230B F657 20 F7 2309 F659 C9 2310 2311 2312

MACRO-BO 3.44

Id a,OdOh

09-Dtlc-81 ,

;terminate and set type I status

icc issue controller command.

out (wdcr),a ;issue 1797 command

woc - walt operation complete.

Id a,20 dec a jr ea II in bit jr ret

nZ,wocl idle a,(wdsr) O,a nZ,woe2

;set 60 usee delay

;idle cpu ;set 1797 status

;if busy, wait

subttl Media Format Selector page

m Bdlcones Opera l i Ill) ~ystelll tor tl1e XEROX U20-11 MACRO-OO 3.44 09-Dec-01 lJ1 Media FUrilid t ~'" I ,"c t ur-N

2313 2314 2315 , , smf - set media format. 2316 2317 entry: unit in A

2310 2319 exit: DE dpb address 2320 BC translate table 2321 : 2322 F65A CD F544 smf: ca II selunt :select unit 2323 F65D FA F5F6 jp III, retzr ,if disk not ready 2324 F660 21 F6D5 Id 111,dtype 2325 F663 36 AD Id (hl),fm.ddss :start out double density, single side, retry 2326 F665 DB IC in a, (wds I ) tread select status 2327 F667 CB 67 bit c.Oin,a :test 0" I 5" status 2320 F669 20 02 jr nz, slllfO ; if 0 inch drives 2329 F66B) CB F6 set fm.fv,(hl) illlove up to 5.25" dpbS 2330 F66D 3A F66E smfO: Id a,(stpadr) :set configurable step rate for 0" drives 2331 F66E stpadr equ $-2 2332 F670 E6 03 anel 3 ;just so seeks aren't formats 2333 F672 32 F644 Id (stepr),a ;save step rate in seek command 2334 F675 CD F641 smfOa: call recal _,establ ish pos-i t ion 2335 F670 E6 04 and B411 2336 F67A CO ret z :if not on track zero 2337 F67B FA F5F6 jp lII,retzr :if unit not ready 233B F67E OJ 31 out (wddd) ,a ,set double density 2339 F600 JE FF Id a,-I 2340 F6B2 12 lei (de),a :clear drive on track 2341 F6B3 3E 02 lei a,2 iuse track 2 for density select 2:142 F685 (13 13 out (wddt),a 2343 F607 :iE 10 Id a,lOh ;seek / no verify 2:j44 F609 CD F643 ca II isc ; issue seek command 2345 F60C JE IC Id a, 1 ct. :find id mark 2346 F60E D:1 10 out (welcrl,a ;start verify 2:147 F690 1I I 0000 Id bc,O :set timers 2:140 F693 10 FE slUtl: djnz $ :pause 2349 F6H5 DB 10 in a,(wdsr) 2350 F697 CB 47 bit O,a 2351 F699 2B DB jr z,smfla : if command completed 2352 F69B OD dec c 2353 F69C 20 F5 j r' nZ,smfl :if mOI-e t illle 2:154 F69E CD F647 ca II rdc :terminate seek 2355 F6AI 3E IB Id a,IBh ;set pseudo record not found 2356 F6A:1 E6 18 5mtla: and 18h :check record not found I crc error 2357 F6A5 13 inc de ;point to density word in track table 2358 f6Al) 12 Id (de) ,a 2359 F6A7 IB dec de 2360 F6AO 28 14 .jr z,smf2 :if density select successful 2361 F6AA [)~1 30 out (wdsd),a ;use single density

» 2362 F6AC 3E IC Id a,lch ;verify single density "0 2363 F6AE CD F643 ca II isc ,issue seek "0 2364 F6BI En 18 and 18h (1) 2365 F6B3 :W 07 jr z,smflb ; if single density successful :l 2366 F6B5 CB 7E bit fm.un, U11) :test retry 0.. 2367 F6B7 CB BE res f 11\. un . (t. I ) :clear retry X m

» Sa I CU'l.,,, Oller a I i flU Syst.,1II for- tile XEROX 820-II MACRO-OO 3.44 09-Dec-01 "U M.,l1 i a For'lIIa t Selector' "U lJ) 23bU FbB9 20 BA jr nZ,smfOa ; if retrv :J a.. 2369 FbBB (9 ret ; ,'eturn select error

2370 FbBC C(3 AE smflb: res flll.dd, (hi) ;back up to single density dpb~ >< 2371 f6BE C(3 BE slllf2: res tm.un,(hl) ;clear ,-e t ry m 2372 F6rO DB lC in a, (wdsl)

2373 F bCi CB D7 set 2,a ;select side 2 2374 f6C4 03 lC out (wdsl),a 2375 F6C6 CD F605 ca I I rdid ;'read id lIIark 2376 F6C9 20 09 jr z,slllf4 ;if no id found, must be one side 2377 F6CB OD dec c 2:HU FbCC 2U Ob jr nZ,smf4 ;if side 1 1D not read 2379 FbCE CB E6 set fm.ds,(llI) ;bump up to two sided dpbs 2300 F6DO 21 F6DI Id hI, slOf a ;set double sided status in track table 2301 F6DI slllfa equ $-2 2302 F6D3 34 inc (h I) 2:103 F6D4 21 0000 slllf4: Id hl,O ;set diskette type 23U4 f6D5 dtype equ $-2 2305 F6D7 7D Id a, I ., save type 23H6 f6DO 4C Id c,h ;preset no translate 2387 F6D9 44 Id b,h 2:W H f6DA II F430 Id de,dpbOs ;set base of disk parameter blocks 23U9 F6DD 19 add hl,de 2390 FbDE EB ex de,hl ;return DPB address In DE 2391 F6DF CB 6F bit fm.dd,a :.139:.1 F6EI CO ret nz ; if diskette is double density 2393 F6E2 01 F6ED Id bC,trn5 ; pr'ese t 5.25" skew table :.1394 F6E5 Ul 77 bit flll.fv,a :.1:395 F6E7 CO ret nz ;if diskette is slllal I 2396 F6EO 01 F410 Id bC,trn6 ,set 8" translate 2397 F6EB 3C inc a ;force NZ :.1398 F6EC C9 r'e t 2399 2400 ; i Skew by 5 translate table. :.1401 :.I4D2 F6ED o I 06 DB 10 trn5: db 01,06,.11,16 2403 F6Fl 03 OB OD 12 db 03,OB,13,18 24D4 F6F5 05 UA OF 02 db 05,10,15,02 2405 F6F9 07 OC I 1 04 db 07,12,17,04 24U6 F6FD 119 OE db 09,14 24117 2400 F6FF 7F 00 CO 00 trktDI: db 7fh,O,OcOh,O,20h,O,2,O,01h 2409 f703 20 00 02 00 :.1410 f707 U 1 2411 2412 f7UU rigdpb equ 0f708h :.1413 F770 i ot) I oc equ 0f770h 2414 2415 ,,\)ove 2416 070U" + dli.seg 2417 241B .dephase 2419 .phase Of470h 2420 F470 sasstr equ $ 2421

m 2422 Subttl Rigid Partition Disk Parameter Blocks. lJ1 2423 page W

m Balcones Operalill;! System for t I III XEROX 820-11 MACRO-80 3.44 09-0ec-B1 l.11 RiUid Partitioll D i !> I, Parameter Blocks. ~

2424 2425 There are 16 4k Blocks per pseudo track. 2426. Track Zero (2 Cylinders) are reserved for CP/M boot. 2427 2428 0040 Nt4 equ 64 ;Number of Tracks on Partition 0 2429 0020 Nt5 equ 32 ;Number of Tracks on Part it i on 1 2430 0010 Nt6 equ 16 ;Number of Tracks on Partition 2 2431 0010 Nt7 equ 16 ;Number of Tracl\s on Partition 3 2432 2433 OOOU aset 0 ;first usable track 2434 irpc n,<4567> 2435 aset .. + 1 ;reserve system track 2436 OSIll&n equ Nt&n*16-17 2437 Rtk&n equ 2438 aset .. +Nt&n-1 2439 Opbrg&n:dw 512 ;spt 2440 db 5,31 ;blkshf. blkmsk 2441 db 3+2* (Oslll&n ge 256);exlII 2442 dw Osm&n ;dsm 2443 dw 51 I ;dirmax 2444 db -1 ;a II ocO (reserve additional dir space) 2445 db 0 ; a I I oc 1 2446 dw 0 ;check size 2447 dw Rtk&n ; track offset 2448 db 1 ;256 byte sectors 2449 endm 2450 f47U U200 + Opbrg&4:dw 512 ;spt 2451 f472 05 1 f + db 5,31 ;blkshf. blkmsk 2452 F474 (I 1 + (lb 3+2*(Oslll&4 ge 256);exm 2453 f475 U3Ef + dw OSfl\&4 ;dslll 2454 F477 01FF + dw 511 ;dirmax 2455 F4h) FF + (lb - 1 ; a 11 ocO (reserve additional dir space) 2456 f47A 00 + db 0 ;a 11 oc I 2457 F47B 0000 + dw 0 ;check size 245B f47D 00111 + dw Rtk&4 ;track offset 2459 f47f n 1 + db I ;256 byte sectors 2460 f48(} (j200 + Opbrg&5:dw 512 ;spt 2461 F4B2 1I5 1 f + db 5,31 ;blkshf, blklllsk 2462 F484 01 + dl) 3+2*(Oslll&5 ge 256);exm 2463 F4B5 01Ef + dw Dsm&5 ;dsm 2464 f487 ilIff + dw 511 ;dirmax 2465 F489 ff + db -\ ; a 11 ocO (reserve additional dir space) 2466 f48A IlLl + db 0 ; a I I oc 1 2467 F4BS UOLlO + dw 0 ;check size 246B F48D (J[)41 + dw Rtk&5 ; track offset 2469 f4Bf 01 + db I ;256 byte sectors 2470 F490 U200 + Opbrg&6:dw 512 ;spt 2471 f49L 05 1 F + db 5,31 ;blkshf, blkmsk 2472 f494 03 + db 3+2*(Osm&6 ge 256);exm

» 2473 F495 !lOEf + dw OSIll&6 ;dsn!

"0 2474 F497 Ulff + dw 511 ;dirlllax

"0 2475 F498 ff .+ db -1 ; a II ocO (reserve additional dlr space) /1) 2476 f49A nn + db 0 ;a II oc 1 :J 2477 f49!:l nooo + dw 0 ;check size a. 247B F49D 0061 X'

+ Ow Rtk&6 ; t ,-ack offset

m

l> Bdleones Oper"atill,) System tor' nle XEROX 820-11 MACRO-80 3,44 o RiUio Pdrtitioll Disk Pdrdmeter- Blocks, o II) 2479 F49F III ... db 1

2480 F4AO O:WO ... Opbrg&7:dw 512 2481 F4A2 05 IF ... db 5,31

09-Dec-81

;256 byte sectors ;spt ,blkshf, blkmsk

::J 0.. )(

m 2482 F4A4 03 ... db 3+2*(Osrn&7 ge 256),exrn

m V1 V1

2483 2484 2485 2486 2487 2488 2489 2490 2491 2492

f4A5 f4A7 f4A9 f4AA f4AB f4AO f4Af

UllEf + dw Olff + dw ff + db 00 + db 0000 + dw 0071 + dw () 1 ... db

subttl page

Dsrn&7 ;dsrn 511 ,dirrnax -I ,a I' ocO (reserve additional 0 ,a\locl 0 ;check size Rtk&7 ;track offset 1 ;256 byte sectors

SA1403 - Shugart / OTC SASI Driver

dir space)

n Balcone,; Oper"ati"'J Sy,;tem for tile XEROX 820-11 MACRO-80 3.44 ~ SAI403 \SlIlI[Jart I DTC SASI O(-iver"

09-0ec-dl

» u u ro :::l Q. )(

m

2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 250B 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 25:!2 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532

EEOO

0011 0010 0013 0012

0010 0012 0012

001C

0000 0001 0002 0003 0004 0005 0006 0007

0000 0001 0000 0002 0003

i;

rgdbuf

; ;

pioA'; pioAd pioBs pioBd

Sasid Sasic Sasis

syspio

i;

b.bsy b.msg b. cd b.req b. i 0

b.,se I b.par b.rst

falun fblun fclun fdlun rglun

SA-140~D SASl driver.

equ OeeOOIi

Sasi Pio Port Addresses.

equ equ equ equ

equ equ equ

equ

11 h piOAs xor 01b pioAs xor lOb pioAs xor lib

pioAd pioBd pioBd

lch

;rigid parameter load buffer

;Pio A Status

;bus data ;bus control ;bus status

;system configuration port

Sasi controller ~tatus bit definitions.

equ equ equ equ equ equ equ equ

00 01 02 03 04 05 06 07

; ( in) ; ( in) ; ( in) ; ( in) ; ( in) ;(out) ; ( in) ;(out)

Logical Unit Assignments.

equ equ equ equ equ

o 1 o 2 3

;A: Lun ;6: Lun ;C: Lun ;0: Lun iE: Lun

controller busy status status byte completion status control byte or data byte transfer controller request for data/command data transfer directior controller select buss parity error controller reset

subttl Sasi Class Code Definitions page

l> Balcone!; Operatill0 System tor tile XEROX 820-11 MACRO-80 3.44 ~ Sa!;i Class CoU~ Uetinition!;

09-Dec-BI

J 1) ::l :l.. >< m

m 111 -..,J

2533 2534 2535 2536 2537 2538 2539 2540 0000 2541 0001 2542 0002 2543 0003 2544 0004 2545 0005 2546 0006 2547 0007 2540 0008 2549 0009 2550 OOOA 2551 0008 2552 OOOC 2553 2554 2555 2556 ODeD 2557 2550 2559 2560 0000-2561 0001 2562 0002 2563 0003 2564 2565 0000 2566 0001 2567 0006 2566 0007 2569 0000 2570 2571 2572 257:3 OUEO 2574 2575 2576 2577 2570 2579 25[10 2581 2502 2583 2584 2505 2586 2507

; ;

, ,

c . t rdy c.recal c.rsyn c.rqsn c. fmat c.vtrk c.ftrk c.flaw c.read c.wrpr c.writ c.seek c.init

, ,

c. f I py

, , ; fmds fllldd flll.s;;! flll.wr

flll.sdss fm.sdds flllddss fm.ddds fill. hard

, ,

c.tralll

, ,

Plllsg

pile"

Class Command Codes

DTC Reference Manual

class 0 commands.

equ DOh equ olh equ o2h equ o3h equ 0411 equ o5h equ 06h equ 07h equ 08h equ 09h equ Oall equ Obh equ Och

Class 6 commands.

equ OcOh

Floppy Format Codes.

equ 0 equ 1 equ 2 equ 3

equ DOh equ Olh equ 06h equ 07h equ OOh

Class 7 commands.

equ OeOh

Message Macros.

macro n,lIIsg ifl .print" +MSG NT andif andm

macro fl,m .radix 16 Pllls9 %(n),<m> .radix 10 andm

for Prom Set AS31*

Dated February 4, 1961.

;test r-eady status ;recalibrate drive ;request syndrome ;request sense after error ;format drive ;verify track format ;format single track ; format t r-ack with flaw ;read data ;write protect sector ;write data ;initiate seek ;inititiali;;!e drive

;define floppy disk format

;double side bi t ;double dens it y b1 t ;sector si;;!e bi t ; log2(fm.ddds+l)

;Single Density, Single Sided ;Single Density, Double Sided ;Double Density, Single Sided ;Double Density, Double Sided ;Rigid

;test ram buffer

m l:IalcllIHls Op''''ati,,~ Systelll for tile XEROX 820-11 MACRO-80 3.44 09-Dec-81 U1 Sas i C I ass Cocte l)e tin it i OilS 00

2588 2589 2590

subttl Sasi Pilysical Driver. page

}> Ba I COlleti Opel'a till!) Sy;;telll fOI> tile XEROX 820-11 MACRO-OO 3.44 09-Dec-81 0 Sasi Physical Drivel. 0 t1) 2591 ::J 2592 Sal403 - Sasi Physical Driver. a. ' ,

2593 X 2594 m 2595 F4BO Ob 06 Sa1403: Id b,6 :set retry count

2596 F4B2 7E sasOa: Id a, (h I) :set driver operation 2597 F4B3 ~3 inc hI :point to unit 2598 F4B4 3C inc a 2599 F4B5 28 49 jr z,sselec :if select DPH 2600 F4B7 E5 puStl hi 2601 F4B8 C5 push bc 2602 f4B9 3D dec a 2603 F4BA 3E OA Id a,c.writ :'preset write opcode 2604 F4BC 20 02 jr z,sasO 26()5 F4BE 3E 08 Id a,c.read ;assume read 2606 F4CO 3L F6FO sasO: Id (opcode),a :set Sasi opcode 2607 F4C3 7E Id a, (h I) :get driver unit :2608 F4C4 E5 push hi 2609 F4C5 CO F5AF ca II mlu :map to logical unit 2610 F4C8 E I pop hi 2611 F4C9 23 inc hi :ignore cpm dsk 2612 F4CA 23 inc hi : track low 2613 F4CB 56 Id d·, (h I) :set track 2bl4 F4CC 23 inc hi 2615 F4CO 23 inc hi 2616 F4CE 5E Id e,(I1I) :set sector 2617 F4CF CD F607 ca II cwp :check write protect 2618 F402 :ill 22 jr nZ,sas2 : if write protected and track > 0 2bl9 F4D4 E5 push hi isave requetit block address 2620 F4D5 CD F5C2 ca II mpa :map physical address to logical address 2621 f4DO 21 F6FO Id hl,opcode 2622 F4DB CD F643 ca II ices i issue controller command 2623 F4DE EI pop hi :get pointer to low sector back 2624 F4DF 23 inc hi :ignore sector high 2625 F4EO 23 inc hi :dma low 2626 F4EI 5E Id e, (h I) 2627 F4E2 23 inc hi :dllla high 2628 F4E3 56 Id d, (11 I) 2629 F4E4 cB ex de,hl :set transfer address to HL 2630 F4E5 fl6 00 Id b,O :set sector length 2631 F4E6 sec len equ $-1 2632 F4E7 dA F6FO Id a, (opcode) 2633 F4EA FE OA cp c.writ 26d4 F4EC ~U 05 jr z,sasl :if write command 2635 F4EE CD F65F ca I I tdi :transfer data in 2636 F4FI It! 03 jr sas2 2637 F4F3 CO F656 sasl: ca II tdo :transfer data out 2638 f4F6 C I sas2: pop bc 2639 f4F7 E I pop hi 2640 F4F8 2B dec hi 2641 F4F9 C8 ret Z :if no errors 2642 F4FA CD F069 ca II softv :report soft error 2643 F4FO 10 B3 djnz sasOa :if mor'2 retries 2644 f4fF (9 ret ;return error

m 2645

U1 1.0

» "0 "0 (I) :J 0-X m

Balco"es OperalillCl System for" tile XEROX 020-11 MACRO-OO 3.44 PI1ysicai Dr-ivel Select

09-Dec-OJ

2646 2641

subttl page

Physical Driver Select

!> BdlcolI"'s OP""dtiIlU System tor tile XEROX 620-11 MACRO-SO 3.44 09-Dec-Sl ] Physical Dr i VoH' '>elect ] D 2640 l 1. 2649 i i Select - Physical Driver Select.

2650 , (

2651 F500 7E sselec: Id a, (h I) ;set ptwsica I ,un it n 2652 F501 FE 08 cp 8 iverify in range

2653 F502 numunt equ $-1 2654 F503 3F ccf 2655 F504 04 f50E ca 11 nC,smfs iset media format 2656 F507 DO ret nc iif media identified 2657 2650 , , selerr - Select Error Driver. 2659 2660 F508 21 OOUO xselerr: ld hl,O iSel ect Error Driver 2661 F50B F6 FF selerl: or -1 2662 F50D C9 ret 2663 2664 , , smfs - Set Media Format. 2665 2666 entry; A = Driver unit index 2667 Exit: HL '" DPH address, if no carry 2668 , 2669 F5llE CD F6F6 slllfs: call first iexecute first time only routine 2670 F511 CD F5AF call mlu illlap to logical unit 2671 F514 EB ex de,hl iget dph index to hi 2672 F515 70 Id a, I iand A 2673 F516 29 add hi ,h I ; i nde x *16 2674 F517 29 add hl,hl 2675 F518 29 add hl,hl 2b76 F519 29 add hl,hl 2617 F51A 11 F390 Id de,Dpbase i set base of Disk Parameter Headers 2678 F51D 19 add hl,de 2679 F51E FE 04 cp 4 2600 F520 DO ret nc i if rigid unit 2bOl F521 E5 push hi jsave dph address 2682 F522 3E 00 ld a,BOh idisable el-ror recovery 2663 F524 32 F6F5 Id CdC t r I ) ,a 2684 F527 32 F5FI ld (lastfm+l) ,a 2685 F52A OA Id a ,( be) ialways try double side first 2686 F52B F6 01 or 1 shl flllds. 2ri67 F520 U2 Id (bC) ,a 2688 F52E 3E 07 Id a,O-l ; t I-y each type two times 2689 F530 n F53D slllfs 1 : Id (sillfsa),a iset ret :-y count 2690 F5::J3 C5 PUSll bc ;save define format table address 2b91 F534 CD F57A ca II cdd icheck drive density 2692 F537 C 1 pop bc 2693 F538 60 Id h,b jset format table address 2694 F539 69 Id I, c 2695 F53A 28 14 jr z,smfs2 i if diskette type identified 2696 F53C ~i E 00 Id a,D 2697 F53D smfsa equ $-1 idiskette type retry counter 2698 F53E D6 01 Sul1 I 2699 F540 38 31 j ,- c,smfs4 if media not identified 2700 F542 35 dec (h 1 ) advance disk type code 2701 F543 F2 F548 jp p,smfsla if no wrap

m 2702 F546 :H) 07 Id (111) ,fln.cldcls en .....

m l:Jalcolles Oper'at ill!) System for the XEROX 820-11 MACRO-80 3.44 09-Dec-81 en Physical Drivel' Select IV

2703 f548 CB 4E smfsla: bit fmdd, (til ) ; test for double dens it y 2704 F54A 20 E4 jr nZ,smfsl ;if double density 2705 f54C r.B 96 res fm.sz,(hl) ;set sector size = 126 2706 F54E 18 EO jr smfsl ; try more diskette types 2707 f550 57 smfs2: Id d,a .preset no translate 2708 f551 5A Id e,d 2709 F552 CB 4E bit fmdd, (h I) 2710 F554 :W 03 jr nZ,smfs3 .if diskette is double density 2711 f556 II F410 Id de,trn6 ;set single density translate 27 I 2 F559 E I smfs3: pop hi ;get dpl. address 2713 f55A E5 push hi 2714 f55B 73 Id (h I) ,e ;store translate address 2715 F55C 23 inc hi 2716 F55D 72 Id (11 I) ,d 2717 F55E II 0009 Id de,IO-1 2718 f561 19 add hi ,de ;point to dpb address in dph 2719 F562 OA Id a, (bc) ; ge't selected format 2720 F563 E6 03 and 3 2721 f565 EB ex de,hl 2722 F566 6f Id I,a 2723 F567 29 add hl,hl ; i nde x by 16 2724 f568 29 add hi "hi 2725 f569 29 add hl,hl 2726 f56A 29 add hl,hl 2727 F56B 01 F430 Id bc,dpb8s ;set dpb base 2728 f56E 09 add hi ,bc ;set dpb address (clears carry) 2729 f56F EB ex de,hl ;recover dpb pointer address in dph 2730 f570 73 Id (h I) ,e 2731 F571 23 inc hI 2732 F572 72 Id (11 I) ,d 2733 f573 EI smfs4: pop hi ;get df::h address 2734 F574 3E 00 Id a,O ;enable error recovery 2735 f576 32 f6f5 Id (dctrl),a 2736 f579 C9 r'e t 2737 2738 , , cdd - check drive density. 2739 2740 f57A OA cdd: Id a, (bc) ;get attempted side 2741 F57B E6 01 and 1 ;try s ide· I on ds, a on ss 2742 F570 II 0201 Id de,2*256+1 2743 F500 28 02 jr z,cddO ;if single side 2744 F582 16 4F Id d,77+2 ;use back side 2745 f584 CO F5C2 cddO: ca II mpa ;map physical address 2746 f5C7 21 F6fO Id hl,opco(le 2747

\ F58A 36 08 Id (hl>,c.read

2748 F58C CO f643 ca II iccs ;issue controller command 2749 F58f CD f6CE ca II sim ;set input mode 2750 F592 CD F687 cddl: ca II wfr ;wait for req 2751 F595 20 04 jr nZ,cdd2 ;if timeout or status, not data requested

» 2752 f597 ED 78' in a, (c) ;eat sector

"C 2753 F599 I U F7 jr cddl

-0 2754 f59B CD F669 cdd2: ca I I wcc ;wait command complete tJ) 2755 F59E C9 ret J 2756 a. 2757 i; p21 - Physical to Logical Mapping Table. X 2758 m

);> Balcun,;!; Opera l i IIU Sy!;ttlm fur tile XEROX 820-11 MACRO-80 3.44 09-0ec-81 0 PI,ysical 01' i vel ~),;I,;ct

0 It) 2759 First byte is the SA1403 Logical Unit Number J 2760 Second byte is extendeci drive format code 0... 2761 , X 2762 F59F UO UO p21: db falun shl 5,fm.sdss ;Floppy Drive D m 2763 F5AI ;w 01 db fblun sIll 5, fm. sdds ;Floppy Drive 1

2764 F5A3 00 06 db falun shl 5, fmddss ;floppy Drive 0 2765 F5A5 40 07 db fdlun shl 5,fm.ddds ;Floppy Drive 2 2766 F5A7 ull 80 db rglun shl 5, fm. hard ;Rigid Partition 0 2767 F5A9 6ll .80 db rglun shl 5,fm.hard ;Rigid Partition I 2760 F5AB 6ll 80 db rglun shl 5, fm. hard ;Rigid Partition 2 2769 F5AO 6U 80 db rglun shl 5, fm.hard ;Rigid Partition 3 2770 2771 . ; Mlu - Map Logical Unit. 2772 2773 Entry: A Physical Driver Unit from Deblocker 2774 Ex it: DE dph index 2775 BC pointer to format code 2776 Sasi LUN stored in command block 2777 2778 F5AF :! I F59f mlu: Id hl,p21 ;set Rigid Physical to Logical map table 2779 F5U2 16 00 Id d,D 2780 F5B4 5F Id e,a 2781 F5B5 19 add hl,de ;point to table entry 2782 F5B6 19 add hi ,de 2783 F5B7 7E Id a,(hl) ;get Sasi LUN 2704 F5B8 32 F6Fl Id ( I un) , a ;store in read/write command 2785 f5BB 32 f6EB Id (deflun),a ;store in define command 2786 f5BE 23 inc hi ;point to format descriptor 2787 F5BF 44 Id b,h 2788 f5CO 40 Id c, I 2789 F5Cl C9 re t 2790 2791 , , Mpa - Map Physical Address. 2792 2793 Entry: BC p21 format code address 2794 D Track 2795 E Sector 2796 2797 Ex it: Logical Address set in command block 279B Sec len set for transfer 2799 Controller notified of floppy format 2800 21101 F5C2 ~ 1 F4E6 mpa: ld hl,seclen ;preset sector length 2802 F5C5 36 00 ld (hl),O 2803 F5C7 EB ex de,hl ;preset Laddr. = Paddr for rigid 2804 f5C8 OA Id a, (bc) ;get drive format code 2805 F5C9 FE 80 cp flll.i1al-d 2806 f5CB 28 46 jr <;,mpa5 ;if Rigid Partition 28117 F5CD FE 06 cp fmddss 2808 f5CF :38 06 jr c,mpal ;if single density 2809 F501 2C inc I iadvance sector from 0->25 to 1->26 21110 F5D2 7C Id a ,11 21111 F5D3 1:l7 or a 2812 f5D4 20 04 j ,- nz,mpa2 ; if not on track zero

m 2813 F5D6 :W dec 1 (]) 2814 f5D7 3E 80 mpa I: Id a,128 ;set shol-t sector W

m m .J::.

» "0 "0 m ::l Q..

>< m

BaicUfltl5 Physical

2815 2816 28 \1 2818 2819 2820 2821

.2822 21:123 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856

Ope.al illu Sy'stem Dr·iver Selec't

f5D9 12 f5DA UA f 5DU. CB 47 f5DD 20 OA f5Df 7C F5ElJ I-E 4D f5E'L 38 02 f5E4 D6 4D f5EG 3F F5E7 8F F5E8 67 f5E9 E5 F5EA OA f5EB 2A f6EB f5EE 67 F5EF II FFFf f5FO F5F2 22 f5FO F5F5 B7 F5F6 ED 52 f5f8 28 OC f5FA J2 f6Ef F5FD 21 f6EA F600 CD f643 F603 CD F669 F60G EI f60l 44 f608 II OOIA F60B 62 f60C :17 f60D ED 52 f60F 04 f61D 19 F611 10 FO F613 7C f614 65 F615 6F F616 22 f6f2 f619 C9

to r- tlte XEROX 820-11 MACRO-OO

Id mpa2: Id

bit jr Id cp jr sub

mpa21: ccf adc Id

mpa22: push Id Id Id Id

lastfm equ Id or sbc jr Id Id ca II ca II

mpa3: pop Id Id Id scf sbc inc

mpa4: add djnz

mpa5: Id Id ld Id ret

subttl page

3.44 09-Dec-tll

(de) ,a a, (bC) fmds,a. z,IIlpa22 ; i f not double sided disk a,h ;map first 77 tracks to side l:ero 77 c,mpa21 ;if side zero tracks 77 ;offset to back side

a,a h,a hi isave track/sector a, (bc) ;get floppy format hi. (def lun) ;get new unit h,a de,-l ;get previously used format/lun $-2 (Iastfm),hl ;save this format/unit for next time a hl,de z,mpa3 ;if unit and format same as last time (flpfrm),a hi ,def Ipy ; issue define floppy command iccs wcc hI irecover track / sector b,h ;set track de,26 ;compute sector-26-1+(Track+l)*26 h,d ;clear upper track

hl,de ;adjust sector b ;force one pass hl,de ;mu It \p I Y track by sectors/track mpa4 ;if mwltiply incomplete a,h ;swap H & L h, I I,a (addrh),hl ;Store address in command block

Sasi Bus Control Interface

I

l> Balcones Ope'dtillU Systelll for tile XEROX 820-11 MACRO-80 3.44 09-D8C-81 "0 Sa,;i Bus Contlol Intel"face "0 I'D 2857 :l 2858 gca - get controller attention. c.. ' ,

2859 >< 2860 F61A CD FbAO 9 La : ca II r"ese t ;r-eset controller if required m 2861 F61U 7E Id a, (h I) ;get command

2862 F61E FE 01 cp c.recal 2863 F620 3E OA Id a,9+1 ;set 9+ second time-put 2864 F622 213 02 jr z,gcaO ; if recalibrate, use long time-out 2865 F624 3E 03 Id a,2+1 .use short time-out 2866 F626 32 F627 gcaO: Id (gcaa),a 2867 F627 gcaa equ $-2 ;·****=>;nlonitor one second timer address goes here 21368 F629 CO F6D2 ca II sam ;set output mode 2869 F62C 3E 01 Id a, I ;Set sasi controller address 2870 F62E 03 10 out (Sasid),a 2871 F630 3E 20 Id a, I shl b.sel ;assert Select Line 2872 F632 03 12 out (Sasic),a 2873 F634 DB 12 gca I: in a, (Sas is) ;get sasi status 2874 F63lj OF rrca ;get busy bit in C 2875 F637 38 06 jr c,gca2 ; if controller is ready 2876 F639 CD F6A5 ca II cft ;clleck for t illle-out 2877 F63C F2 F634 jp p,gcal ;if not timed out 2B7B F63F AF gca2: xor a 2879 F64U 03 12 out (Sasic),a ;drop " Select 2BBO F642 C9 ret 28BI 2882 , . iccs - issue Controller Command. 2883 2884 HL => Sasi command block 2885 2886 F64~1 7E ices: Id a, (h I) ;peek at ope ode 2887 F644 FE 04 cp c. fma t 28B8 F646 C8 ret Z ;do not a II ow format entire disk 2889 F647 CD F61A ca II gea ;get controller attention 2B90 F64A 01 0610 Id bC,Sasid+6*256 ;set port / command block length 2891 F64D CD F687 iccs I: ca II wfr ; wa it for REQ 2892 F65fJ C8 ret Z ; if data requested 2U93 F651 Ell A3 outi ;send next byte 2894 F65:i 20 FB jr nZ,iccsl 2B95 F655 C9 ret 2896 2897 ; i tuo - transmit data out. 2898 2B99 F656 CO F687 tdo: ea II wfr ; wa it for req 2900 F659 20 DE jr nz,wcc ;if not data requested 2901 F656 ED 63 o t i r ;pitch sector out 2902 F65D IB OA jr wee 29U3 2904 , , tdi t ,"ansmi t data in. 2905 2906 F65f CO fbCE t LI i : ea II sim ;set input mode 2907 F6b2 CD f687 ea II wfr iwalt for" r"eg 2908 F665 20 02 jr nz,Wcc ; if status, not data requested 2!JU9 fbb7 EO 62 inir ;read sector" 2910 2911 , , wec - wait command complete. m

Ol CJ1

m Balcolles Opel-dt lilU System tor- the XEROX 820-1 I MACRO-80 3.44 09-Dec-81 Q)

Sa"i Bus COllt, 01 Iliterface Q)

2912 2913 F66() CD F6CE wee; ca II s im ;set input mode 2914 F66t: CD F607 ca II wfr ; wa ; t for REO 2915 F66F 28 2A jr z,ecr ;if controller not providing status 2916 F671 ED 78 in a, (c) tread completion status 2917 F67:j E6 03 and 3 ; ignore unused bits 2918 1'675 47 Id b,a 2919 F676 CD F687 ca II wfr ;wait for REQ 2920 F679 28 20 jr z,ecr ;if not status 2921 F67B DB 12 in a,(Sasis) ;recover status 2922 F67D CB 'If bit b.msg,a 2923 F67F 28 lA jr z,ecr ;if not message byte 2924 F681 ED 7B in a, (c) tread message byte 2925 F6B~ 20 16 jr nZ,ecr ;if last byte not zero 2926 F685 BO or b ;set Sasi error status byte 2927 F686 C9 ret 2928 2~)29 , . wfr - wait for REQ. 2930 2931 Exit; A < 0 Timer Expired 2932 A 0 Request is for data 2933 A > 0 Request is for control 2934 2935 F681 CD F6A5 wfr: ca II cft ;check for time-out 2936 F6BA FA F69A jp m,wfrl ;if controller hung 2937 F68ll DB 12 in a,(Sasis) ,read sasi status 2938 F61lF CB 5F bit b.req,a 2939 F691 28 F4 jr z,wfr ;if request not asserted 2940 F693 ce 77 bit b.par,a ;check buss parity 2941 F695 20 03 jr nZ,wfrl ;if parity error 2942 F696 wfra equ $-1 2943 F697 E6 04 and 1 shl b.cd ;test control / data bit 2944 F699 C9 ret 2945 F69A F 1 wfrl: pop af ,pitch return address 2946 2947 , . ecr - Enable Control Jer Reset. 2948 2949 F69B AF ecr; xor a ;enable cont,-oller reset next time 2950 F69C 32 F6AD ld (reset),a ;by placing NOP at reset entry point 2951 F69f F6 FF or - 1 ;return error status 2952 F6AI 32 F5FO Id (lastflll),a ;force define floppy format 2953 F6A4 C9 ret 2954 2955 .. Cft - Check for Tillie-out. 2956 2957 F6A5 CD F066 cft: ca II idle ;idle cpu 295B F6AB 3A 0000 Id a, (0) 2959 F6A9 efta equ $-2 ;*** •• =>;This word gets the address of the timer 2960 pub Ii c cfta

» 2961 F6AB 67 or a 'U 2962 F6AC C9 ret 'U 2963 it) 2964 i i Reset - Reset Controller. ::J 291i5 0.. 2966 This routine is ca lied prior to every command that is >< 2967 issued to tl)e control:ler, but disables itself after m I

» 0 0 (I) j

a. >< m

m 0'1 .....,

Balcofles Sasi 0"5

2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 298] 2984 2985 2986 2987 2988 2989 299U 2991 2992 2993 2994 2995 2996 2997 2998 2999 :3000 3001 3002 3003 3004 3005 3006 3007 3008 3U09 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019

Opt:nJli"cI :,ystt:m foc tl.e XEROX 820-11 Cont"o I I IIte,'face

F6AD tJu reset:

F6AE 3E CF F60U 03 13 F6B2 3E 5F F6B4 03 13 F6B6 ]E 80 F6B8 0] 12 F6BA AF F6BB 03 12 F6BO 3E C9 F6dF 32 F6AO F6C2 E5 F6C3 2 I F6E8 F6C() CO F643 F6C9 CO F669 F6CC E I F6CO (9

. , F6CE 3E 4F silO: F()OO 18 02

, ,

F6D2 3E OF sam: F604 03 II 50101: F606 C9

; ;

F6D7 OA cwp: F6D8 E6 80 F6DA C8 F6DU :iE UO F6DC ,-doli I y F6D[J 07 F60E C8 F60F 7A F6EO 07 F6EI C8 F6E2 3A F6FO F6E5 D6 08 F6E7 C9

MACRO-80 3.44 09-Dec-81

cunnillg. When, and if the contcollec times-out, this coutine is re-enabled. Thus, the controller w I II be reset again before the next command is issued.

nap j*····::::>iNote RET gets put here aftltr reset I NOP gets put thtlrtl 'If t1mtl-out

Id a , I 100 I I I I b ;initialize pia In mode 3 out (pioBs),a Id a,OIOlllllb ;d7, d5 are outputs out (pioBs),a Id a, I shl b.rst ;assert reset to controller out (Saslc),a xor a out (Sasic),a ;de-assert reset Id a,Oc9h Id (reset),a' ;disatJle reset until time-out push hI I (j hI, rgreca I ca II iccs i issue recursive rigid recal ibrate ca II wcc pop hI ret

Sim - Set Input Mode.

Id a,OIOOllllb ;set pia A input mode jr sonl1

Sam - Set Output Mode.

Id a,OOOOllllb ;set pia A output mode out (pioAs),a ret

cwp - checl< write protect.

Id a, (UC) ;get d,- i ve type and fm.hard ret z ;if not rigid disk access Id a,O ;get dirty parameter flag equ $-1 or a ret z ;if not write protected Id a,d or a ,-et z ;it track zero request Id a,(opcode) sub c.read ;a Ilow reads, but no writes to f II e system (-et

subttl Sasi Command Blocks page

m Ol 00

Balcones Ope,·"tillu System for t1)e XEROX 82D-ll MACRO-8D 3.44 Sasi COIIUlldlld £lloLhs

09-Dee-Bl

JU;1U 3021 J022 3D23 3024 3025 f6Etl Ul J026 f6E9 60 3027 302B f6EA CO 3D29 f6F.B 00 JO:lO f6EC on no 00 3031 f6Ef 00 3032 3033 f6fO 00 3034 F6Fl 00 3035 f6f2 00 3036 f6f3 00 3037 f6f4 01 303B f6f5 00 3039 3040 3041

Sasi Command Blocks.

rgreca I: db c.recal 3 shl 5 reclun:

deflpy: deflun:

flpfrm:

opeode: lun: addrh: addrl: nblk: dct r I:

db

db db db db

db db db db db db

c.flpy o D,O,O o

o o D o 1 o

;define floppy format

;Class eode / Operation ;Logical Unit & Logical Address 20-16

Logical Address 15-8 Logical Addre~s 7-0

;Number of Blocks ;Error Retry Disable Control word

subttl Overlayable Initialization Code page

» Biilcolles Ope'"dt 111~J ':>ystelll for' ttle XEROX 82U-II MACRO~BO 3.44 09-Dec-81 "0 Over' I ayahl e I'litializdtioll Codt! "0 II) 3042 :::l 3U43 First - First time only. 0.. ' ,

3(J44 )( 3045 FbFb F5 f i r-s t : PUSll af m 3046 phex $-dskdvr,<SASI Resident Length is>

3U47 001U + .radix 16 3048 \ OOOA + .radix 10 3049 F6F7 3E C9 Id a,Oc9h inuke self first t I me 3050 F6F~1 32 F6F6 ld (first),a 3051 F6FC 26 00 Id h,O ; i nd i ca t e return register value 3052 F6FE CO F039 ca 11 dayt I ;get address of monitor timer 3053 F701 28 dec hi 3054 F702 22 F6A9 Id (efta) ,Ill ;store addr'ess of timer for check routine 3055 F705 22 F627 Id (gcaa),hl ;and for command startup 3056 3057 F708 21 F767 f i r-5 t I : Id hi, cnfdpb jpoint to physical driver read command 3058 F700 CO F480 ca I I sal403 jread partition parameters 3059 F70E 87 or a 3060 F70F CC 1'723 ca II z,cpb ;if no error-s then check parameter blocks 3061 F712 2B 00 jr z,first2 j if parameters are loaded 3062 F714 21 F76C Id hi, cnfdpb+5 jtry backup heads 306:3 F717 7E ld a, (h I) ;get logical sector 3064 F711:l C6 20 add a,32 ; aelvance to next head 3065 F71A 77 Id (h 1) ,a 3066 F71B 20 E8 jr nZ,firstl j if 4 heads and 2 cylinders not attempted 3067 F710 2F cpl ;set tracks > 0 read only 306B F71E 32 F6DC Id (rdofl I y), a 3069 F721 f I f i n;t2: pop af 3070 F722 [9 ret 3071 :1Il 7 2 , , cpu - clleck paramete,r blocks. 3073 3074 F72:l

" I EEOO cpt) : Id Ii I , r-g(lt)u t ;point to dpb buffer.

3075 F7:!6 :jA F76C Id a, (cnfdpb+5) jget sector this dpb set came from 3076 1'729 FE 20 cp 32 3lJ77 F72B 2U 04 j r- nZ,cpbl jif not pr i mar-y set 3078 F72fJ 7E Id a,(rll) 3079 F72E FE E5 cp Oe5h :H180 F730 CB r-e t Z i·u~e. default dpbs if none configured 3081 F731 11 OOOF cpUI: Id de,16-1 ;set offset from high spt to deblock control 3082 F734 1I6 04 let b,4 jverify 4 eJplls 3083 F736 'IE cpb2: Id a, (Ii I) ;set low sectors / track 3084 F7:37 87 or a 3085 F738 ell ret nz jif bUHunec sectors / track 3086 F7:19 19 add hi ,de ;advance to deblock control 30B7 F7JA IE Id a,Ud) 3088 F73B E6 87 and 871i 3089 F73D C8 21' sra a 3090 F73F C8 2F sra a 3091 F741 CO roe t nz jif ba(l deblocking constant 3092 F74L 23 inc hi 3093 F743 10 F I djnz cpb2 3094 1'745 28 dec hi 3095 F746 11 F4AF Id de,Dpbrg4+16*4~1

m 3096 F7MJ III 0040 Id be,16*4 (J) W

m -....J a

» -0 -0 (1)

::l a.. >< m

Balculles Ope,-alillU System for the XEROX 820-11 MACRO-SO 3.44 Overlayable Initial ization Code

09-Dec-BI

3097 309S 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138

F74C F74E F751 F754 F757 F759 F75A F75B F75C f75D F75E F75F F760 F761 F762 F76~ F764 F766

F767 F76A F76C F76E

0300

FAOU

OAOU··

FAOtl

fAOU

FA08 fADS FAOD

ED B8 01 0010 1 1 F3DE 21 F47D 310 04 F5 7E 3D U7 12 09 EB 09 EB F 1 3D 20 f3 C8

01 04 00 0000 0020 EEOO

21 0000 F6 fF C9

cpb3:

cnfdpb:

sasidl

dloc

Dvr-Imt:

r-qtop

s I erT:

Iddr ,move dpbs into place Id bC,16 ;set 16 bytes/dpx Id de,Dpbase+4*16+14 ;point at al lac vector pointer Id hl,Dpbrg4+13 ;point at reserved tracks Id a,4 ;count off 4 partitions PUSll Id dec add Id add ex add ex pop dec jr ret

db dw dw dw

af a, (h I) a a,a (de),a hl,bc de ,Ill hl,bc de,hl af a nZ,cpb3 z

01,4,0 o 32 rgdbuf

equ $-sasstr .depl1ase defl dloc+sasidl .phase dloc

above d&seg

equ $

Id 111,0 or -1 ret

;get reserved tracks for partition ;just so nice numbers come out ; 16 blks/track / 8 blks/byte = 2 bytes/track ;store low allocation vector address ;advance to next dpb

;advance to next dph

;if more to allocate ,return success

;read partition 0 ; t,-ack zero ;sector 32 ;rigid parameter table buffer

;disk dr-iver limit

;set required top of reside~t monitor

subttl 820 StyJe Disk Driver Emulator page

» Baleolles Opel'at ; II!] System for' tile XEROX 820-11 MACRO-OO 3.44 09-Dec-01 U U

020 Style Dish [J,; ver Emulator

It> 313!oJ ::l 3140 820 Style Disk Driver Emulator. 0. ' , ><

3141 3142 above ;generate code in ram

m 3143 DADE" + dB.seg 3144 3145 FAOE ff phycmd: defb -I ,pl1Ys i ca I Driver Command 3146 fAOf ff pl1yun t : defb - I ,physical unit 3147 fAl0 00 phydrv: defb 00 ,logical unit 3148 FAil 0000 phytrh: defw 00 ,track 3149 FAI3 0001 physec: defw 01 ,sector 3150 fAI5 EOOD phydma: defw bootbf ,dma address 3151 3152 , , Select - Select Unit for I/O. 3153 3154 Entry: C Unit 3155 Ex it: A = 0 if no,errors 3156 A -I if errors 3157 3158 fA 17 79 select: Id a,c ,set drive selected 3159 FA10 FE 08 cp 8 3160 fAIA 30 10 jr nC,sel1 3161 FAIC 32 fAIO Id (phydrv) ,a ,save logical CP/M drive 3162 fAlf 21 FA5A Id hl,seltbl ,set select table address 3163 'fA22 06 00 Id b,O 3164 fA24 09 add hi ,bc i i nde x into select table J165 FA25 7E Id a, (h I) 3166 FA26 B7 or a 3167 fA27 EB ex de,hl 3160 FA20 67 Id h,a iin case previous select worked, say no dph 3169 fA29 of Id I,a ;to internal routines 3170 fA2A CO ret z , if drive has already been selected 3171 fA2B 05 push de isave table address 3172 fA2e 06 Ff Id b,-I ,set Select operation 3173 FA2E CD FA51 ca 11 xqphys ,execute physical driver 3174 FA31 70 Id a, I ,get returned dph address 3175 fA32 84 or h 3176 FA33 01 pop de ,retrieve select table address 3177 FA34 28 03 jr z, se I I ,if select unsuccessful 3178 fA36 Af xor a ;return no errors 3179 fA37 12 Id (de) ,a ,prevent more density re-selects 3100 fA3£! C9 ret 3181 FA39 F (i FF se II: or -I , r'eturn error 3102 FA38 C9 ret 3103 3104 , , Home - Position to track zero. 3185 3106 FA3C liE 00 hom",: Id c,O ,force track zero 3187 3100 . , Seek - Seek Track. 3109 3190 Entry: C Track to r'ead/write from next 3191 3192 FA3l 79 seek: ld a,c

m 3193 FA3F 32 FA II Id (phytrk),a -...,J -"

m ...., tV

:J> c C I'D :J 0.. X m

Balcunes Oper-atill;! Systelll tor tile XEROX B20-I1 MACRO-OO 3.44 020 Style Disk D, iver Emulator

09-Dec-01

3194 3195 3196 3197 3190 3199 3200 3201 3202 3203 3204 3205 3206 3207 320B 3209 3210 3211 3212 3213 3214 3215 3216 3217 3210 3219 3220 3221 3222 3223 3224 ::1225 3226· 3227 3220 3229 3230 3231 3232 :1233 3234 3235

FA42 FA43

FA44 FA46

FA40

FA4A FA4B FA4E

FA51 FA54 FA55 FA50 FA59

FA5A FA5E

AF C9

llo 00 18 02

06 01

79 32 FA13 22 FA15

21 FADE 70 CD F344 B7 C9

FF FF FF FF FF FF

FF FF

xor ret

a ;return no errors

write;

read:

rdwr;

Wr it e - Wr i te Physical Sector.

ld b,O ;set j ,- rd ...

Read - Read Physical Sector.

Id b,l ;set

Rdwr - Rea~/Write Processor.

Ent,-y: C HL

Ex it : A A

Sector Transfer Address o if no errors -1 if errors

Wri te

read

operation

operation

Id Id ld

a,c (physec),a (phydma) ,hI

;set physical sector ;set transfer address

;; xqphys - Internal Ex~cute Physical Driver.

Entry; B -\ for Select

xqpl1ys; I d Id ca II ar ret

B B

o for Write for Read

hI, phycmd (h I) , b xqdvr a

;point ta physical command block ;store aperation ;execute driver ;set flags

;; Emulator PiSk 1/0 Ram.

seltbl: defb defb

-1,-1,-1,-1" -1,-1,-1,-1

;drive already selected table

subt t I Command procest;or page

» I:ldlcolles Ope.a I i flU System for' tile XEROX 820-11 MACRO-80 3.44 09-0ec-81 'U COIiUlld.ICj P'·OCtlS"Ll.

'U ([) :J23ti :l 3237 above ;put corJe upstairs 0.. 3238 OAti2" + d&seg >< 3239 prompt user for command. , , m 3240

3241 fAti2 fB prompt: ei 3242 fA63 :n 0000 Id sp, s.t ack ,reset system stack 3243 fA66 CD fC3D ca II pnext 3244 fA69 00 OA defb cr, If 3245 fA6B 2A 20 defm ' . 3246 fA60 04 defb eot 3247 fAtiE 2 I ff5C Id hi ,I inbuf 3248 fA71 DE 50 Id c,80 ,butfer. of 80 chars (ver. 2.0) 3249 fA73 CO fB37 ca II ge t lin ; input a bufered console line 3250 fA76 38 51 jr c,what ,print '.,hat ? ' i f input error 3251 fA78 3A ff5C autobt: Id a,(linbuf) ;get first character in line 3252 fA76 fE 00 cp cr 3253 fA70 28 E3 jr z,prompt , jump if a null line 3254 fA7f 06 40 sub .@'

3255 fA81 fE 16 cp 'Z'-'@'+I 3256 fA83 30 44 jr nC,what , if not letter 3:!57 fA8G 87 add a,a 3258 fA86 4f Id c,a 3259 fA07 06 00 Id b,O 32tiO fA89 21 fAD9 Id hl,cmdtab+1 , i nde x command table with character 3261 fASC 09 add hi ,bc :3262 fASD 7E Id a, (h I) 3263 fA8E 26 dec hi 3264 FAOf 6E Id I ,(til) ;get dl1dress of command processor 32ti5 fA90 67 ILl h,a 3266 fA91 E6 80 dnd 8011 3267 fA93 20 17 jr nz.prmtl ; if resident command 3268 fA95 II fC55 Id de,cloc jffiOVe transient command t.o RAM area :l2ti9 fA98 05 push de 3270 fA99 01 0299 Id bc, tpamax ,set length of largest transient 3271 fA9C f3 di 3272 fA9D DB IC in a, (syspio) 3273 fA9F 67 or a :J 27 4 fAAO F5 push af 3275 FAAI f4 F29C ca II p,crton ,enable rom if disabled 3276 FAA4 ED 60 Idir 3277 FAA6 F I pop af 3278 FAA7 F4 F293 ca II p,crtoff ,disable rom if enabled 3279 FAAA FB ei 3280 FAA6 E I pop hi ,set e~ecution address 3281 FAAC E5 prmt I: push hi 3282 FAAO CO FC36 ca II crlf 3263 FABO FO 21 FF50 Id i y, I i nbu f + 1 3264 FA64 co f65F ca II params ; input numeric parameters from " 3285 FA67 DO EI pop i x , line buffer and test if error 3286 FAB9 ".'.A FFB5 ILl hl,(paraml) 3287 FAB£: ED 56 FF67 III de,(param2) 3280 FACU ED 46 FF69 Id bc,(param3) 3209 fAC4 CD FAD6 ca II jpix ,ca I I subroutine @ ix

m 3290 FAC7 :W 99 jr nc,prompt ;9° back to prompt if no errors

" W

m lJalcones Oper'a t i II!J System tor' tt1e XEROX 820-11 MACRO-80 3,44 09-Dec-81 ...... Command pr'ocest.ur -t>-

3291 3292 FAC9 CD FC3D wt1a t : ca II pnext 3293 FACC 20 77 68 61 defm what?' 3294 FADO 74 3F 3295 FAD2 U7 defb 'G'-64 ;say '"hat ? ' and squeal 3296 FAD3 04 defb eat 3297 FAD4 lEl 8C j r' P'-Olllpt 3:.!98 3299 FAD6 DO E9 jpix: jp ( i x) ; ca II subroutine @ ix 3300 3301 FAD8 177B cmdtab: oefw help j@ - Help user 3302 FADA I1B8 defw boot :a - boot cp/m :n03 FADC 1353 defw baud ;b - bit rate 3304 FADE 1436 defw block ; c - memory block move 3305 FAEO 12F2 defw memdmp ;d - dump memory in hex/ascii 3306 FAE2 1315 defw view ; e - enter memory 3307 FAE4 1428 defw f i I I ; f - f i I I memory 3308 FAE6 12DB defw goto :g - goto program 3309 FAE8 14E2 defw term ;h - host terminal 3310 FAEA 13CA defw incllld ; i - read from input port 3311 FAEC FAC9 def .. what ; j - not used 3312 FAEE FAC9 def .. what ;1< - not used 3313 FAFO 11 B8 defw boot ; 1 - load systelll 3314 FAF2 1315 defw view ;10 - memory examine/change 3315 FAF4 FAC9 defw what ;n - not used 3316 FAF5 13F 1 defw outcmd ; a - write to output port 3317 FAF8 1459 oefw proto ;p - printer protocol 3318 FAFA FAC9 defw what ;q - not used 3319 FAFC 1 :367 oef .. dskcmd ; r - display disk sector data 3:.JLU FAFE FAC9 defw .. hat ; s - not used 3321 FBOO 1477 defw type ; t - typewriter 1II0de 3322 FB02 FAC9 defw what :u - not used 3323 FB04 1443 defw vercmd ;v - memory block compare 3324 Fa06 1367 defw dsl<cmd ; w - disc sector write command 3325 Fa08 13FB defw test ; x - ram diagnostic 3326 FBOA FAC9 defw what ; y - not used 3327 FBOC FAC9 defw what ; z - not used 3328 0036 cmdsiz equ $-cmdtab 3329 3330 fBOE BE cl1ecl< : cp (1',1 ) 3331 FBOF CO ret z ;return if (h I ) =a 3332 FB10 F5 pust1 af 3333 FBll CD FB22 ca II IIldata ; pr i nt what was actually read 3334 FB14 CD FC3D ca II pnext 3335 FB17 73 58 6F 75 defm ' stlOU 1 d= ' 3336 fB1B 6C 64 3D 3337 FB1E n4 defb eat 3338 FBIF F 1 pop af 3339 ,FB20 18 07 jr put2j

):> 3340

"0 3341 FBn CD FC36 lIIoata: ca II crlf "0 3342 FB25 CD FC16 ca II put4hs ([) 3343 FB2e 7E 10 a. (h I) ::l 3344 FB29 C3 FC I,B put2j: jp put2hs a. 3345 >< 3346 subttl Console support routines m

» "0 "0 It) :J 0-x m

m ....... V1

Sulcunes Open,tillu Systelll for the XEROX 820-11 (OIlSO I '" SllPPOI t /Llllt i nes

3347

MACRO-80 3.44 09-Dec-BI

page

m Balconl:s 0pl:ratill!J System for the XEROX 020-11 MACRO-OO 3.44 09-0ee-01

" CUlisole suppurt I'uut int:s Ol

3340 3349 , , ge t lin - read line into buffer. 3350 3351 FB2C 3E 40 gethlp: Id a. '@'

3352 FB2E 32 FF5C Id ( I i nbuf i ,a 3353 FB31 3E 00 Id a,cr 3354 FB33 32 FF50 Id (linbuf+l),a 3355 FB36 C9 ret 3356 FB37 41 getlin: Id b,c .save max line length parameter in b 3::157 FB30 CO FC27 9 lin I: ca II echo ;get a character from the console :1::150 FB3B FE IE ep Helpkey 3:j59 FB::IO 28 ED jr z,gethlp ;if user needs help 3:i6D FB3F 77 Id (h I) ,a 3361 FB40 FE 00 cp cr ;check for carriage return 3362 FB42 CO ret Z ; i f end of line ::13(;3 FB43 FE Olj cp 'H'-64 ;check for ctl-h backspace 3~164 FB45 28 09 jr z, 9 Ii n4 3365 FB47 FE 20 cp 3~j66 FB48 LJIj ret c ;other control characters are illegal 3367 FB4A 23 inc hi ;store cllaracter in buffer 3360 FB4B 00 dec c 3369 FB4C it} EA jr nZ,gl in1 ;get another if there's more room 3370 FB4E :n scf 3371 FB4F (,9 ret ;return with carry=\ if too 3372 ;many characters are entered 3373 FB5U 2B gl in4: dec III ;delete last character from buffer 3374 FB51 CD FC3D ca II pnext 3375 FB54 20 00 defb ' , '1-1' -64 ;delete character from screen 3376 FB56 04 defb eat 3377 FBS7 OC inc c 3370 FB50 70 Id a,b j5et max line length 3379 FB59 91 sub c :l:]80 FB5A 30 DC jr nC,glinl ; if backspace not past the start of the line 3381 FB5C C9 ret 3302 3383 FB5[J FD 23 paraO: inc.: iy ;advance character scan 3::184 FB5f 01 DOff params: Id be. low -I ;set parameter index ::1385 FBG2 FD 7E 00 Id a,(iy+O) ;fetch character 338G FBG5 D6 00 sub cr 3:.l87 FB67 CO I'e t Z ; if no parameters 3::188 FBGO 06 13 sub ' -c,' 3389 fB6A 20 F I jr z,paraO ,if leading blanks 3390 fBGe UC para I: inc c ,advance pal'ameter index ~j391 fB6D CB 51 bit 2,c 3392 fB6f 37 scf 3393 FB70 CO ret nz jerror if > 4 numbers entered 3394 FB71 C5 paJ'ii2: push be .save parameter count 3395 FB72 CD FBOA ca II gethex ;read a number from line buffer 3396 FB75 C I pop be

);> :3397 FB76 DO 21 FFB5 para4: Id ix,paraml ;point to parameter storage area

1J 3390 FB7A DO 09 add ix,bc ;add parameter count in bc

1J 3399 FB7C DO 09 add iX,bc (1) 3400 FB7E OD 75 00 Id (ix+O), I :J 3401 FB81 DO 74 01 Id (ix+\),h ;store data returned from 'GETHEX' a.. 3402 FB84 FE 20 cp )(

m

» Balc.ones Ope I-a lin" ~ystelll f 01' tile XEROX B20-11 MACRO-BO 3.44 09-0ec-'BI "0 Console SUPPOI-t routines "0 it)

3403 FBB6 LU E4 jr z,paral ;get anothel- item if space :J a. 3404 FBBO FE 2C cp

>< 3405 FBOA LB EO jr z,paral ;get anotl1er item if comma 3406 FBBC 79 Id a,c ;set parameter count m 34t)] FBBD 3C inc a 340B FBBE C9 ret 3409 3410 , , dump - dump melilory. 3411 3412 FBBF E5 dUIIIP: push hI .save star-ting address 3413 FB90 CD FC16 ca II put4hs ;print starting address in hex 3414 FB93 CD FCIE ca II space 3415 fB96 L16 10 Id b,I6 3416 fBDO .iE Of " , dump2; Id a,16-1 ;skip 3 columns on 16 byte boundry 3417 fB9A CD fC23 ca II dlllpfmt 341B fB90 3E 07 Id a,B-I ;skip 2 columns on 8 byte boundry 3419 FB9F CD FC23 ca II dmpfmt 3420 FBA2 :iE 03 Id a,4-1 ;skip column on 4 byte boundry :-1421 FBA4 CD FC23 ca II dlllptmt 3422 FBA7 7E ld a,(tll) :get a data byte @ hI 3423 FBAO L3 inc hi 3424 FBA9 CD FCIB ca II put2hs :print the data in hex 3425 FBAC III EA djnz dump2 :repeat 16 times 3426 FBAE l.D FCIE ca II space 3427 FBBI E 1 pop hi :restore starting address 342B fBB2 06 10 ld b,16 3429 FBB4 :iE 1 f dump3: Id a,lfh :force next character 3430 FBB6 CO FOOC ca 11 conout 3431 FBB9 7E ld a, (h I) ;get back data byte @ hi 3432 FBBA L3 inc hi 3433 fBBB CD FOOC ca II conout ;print ascii character in a 3434 FBBE 10 f4 djnz dump3 3435 fBCO CD F006 ca II canst ;check console status 3436 FBC3 20 DC jr z,dump4 ;it char not ready 3437 FBC5 CD F009 ca 11 conin :read char-3430 FBCti FE 00 cp cr 3439 fBCA CO ret z ;it user abort 3440 fBCB CD F009 ca II cunin :pause wll i Ie user examines display 3441 FBCE FE OD cp cr 3442 FBDD CO ret z ; if user found it ::1443 FBDI CD FC36 dump4: ca II crlf ;send end of line 3444 FBD4 lB dec de 3445 fBD5 7A Id a,d 3446 FBD6 B3 or e 3447 FBD7 20 B6 jr nZ,dulilp ; if dump not complete 3448 FBD9 C9 ret 3449 3450 , , getllex converts ascii to binary. 3451 3452 carry set on il legal conversion result ]453 tenninat ing cllarac t-er retul"ns in a. 3454 III I"eturns with 16 bit binary integer :i455 3456 FBDA 21 0000 gethex: Id III ,0 :pl-eset result

m 3457 FBDD 54 Id d,ll -...J 3450 FODE 5D Id e, I -...J

m Bdlcones Oper'at ill e) Sy,;telll f or- ttle XEROX !l20-11 MACRO-BO 3.44 09-Dec-Bl

" Console suppo,' t I o"t ines 00

3459 fBDf 29 gnuml : add 111 I h I ;multiply result by 16 3460 fBED 29 add til ,h I 3461 fBEI 29 add hl .. hl 3462 fBE2 29 add hl,hl 3463 fBE3 19 add hl,de ;append next dig It 3464 fBE4 fD 7E 00 9 nu1ll3 : ld a,(iy+O) ;get next character from line buffer 3465 fBE7 4f, Id c,a 3466 fBEB FD 23 inc iy ;advance buffer address 3467 FBEA eo fBF3 ca II hexbin ; conver"t one ascii hex to binary 34GB FBED 5f Id e,a 3469 fBEE 30 Ef jr nC,gnullll 347D fBfO 79 Id a,c ;return first non hex digit

,3471 FBFI B7 or a 3472 FBf2 C9 ret :1473 3474 ; i hexbin - convert hex to binary. 3475 3476 FBF3 Db 30 11e"bin: sub 'D' 3477 FBf5 DB ret c 347B fBFb FE OA cp 10 3479 FBF8 :IF ccf 348D FBf9 DU ret nc 34!l1 fBfA 06 07 sub 7 34B2 fBFC FE OA cp ID :l4B:l fBfE DB ret c 34!l4 FBff FE 10 cp 16 3485 fCOI :Jf ccf 3486 fCO:! C9 ret 3487 34B8 FCD3 F5 put2hx: push af 34B9 fC04 If rra 3490 fe05 If rra 3491 fC06 If rra 3492 FeD7 If rra 3493 fCOB eD FCOC ca 11 putnib 3494 fCOB F I pop af 3495 fCOC E6 Of putnib: and 000011 1 III 3496 fCOE C6 90 add a,90h 3497 FCIO 27 daa 3498 fC II CE 40 adc a,40h 3499 FCI3 27 daa 3500 fCI4 18 OA jr output 3501 3502 fCI6 7C put4hs: Id a,h 3503 fCIl CO fe03 ca II put2hx 3504 fCIA 70 Id a,l 3505 fC 18 CD fC03 put211S: ca II put2hx 350b 3507 , , space - output space.

);> 3508

'"0 3509 fCIE 3E 20 space: Id a, ; fa 11 through to output space

'"0 3510

ttl 3511 fC2C C3 fODC output: jp conout ;display cl1aracter ::J 3512 0.. 3513 i; [jlllpfmt - Dump Command Output formattef'. >< 351'4 m

l> fli:1ILolle~ O~el"'l il'!J ~y~tem for" tile XEROX B20-1I MACRO-BO 3.44 09-Dec-Bl a CO/lsole :;"pporl loutilles a /1') ::1515 FCL::I A" dmpfmt: and ;check address boundry :l

.)

0... :J516 FC24 CO ret nz ; if not on boundry ::1517 FC25 18 F7 jr space ;skip one column

)( :J511l m 3519 , , echo - read and echo console character.

3520 3521 Echo irlputs one character from the console 3522 device, prints i t on the console output and 35:l3 then returns it in the A register 1n upper case, 3524 3525 FC27 CD F009 ecllo: ca 11 conin ; input "a character and echo it :i5L6 FC2A FE IE cp Helpkey ::1527 FC2C CH ret z ;do not echo help key 3528 FC20 CD FOOC ca II conout 3529 FC30 FE 61 ep , a' 3530 FC32 08 ret c ;if not lower case 3531 FC33 06 20 sub 'a' -' A' iconve,..t lower case to upper case 35:i2 FC35 <:9 ret 3!;33 3534

" cr'lf - carriage return-liflefeed.

3535 3536 FC36 UJ FC30 crlf: ca II pnext ;print next message 3537 FC39 O[J OA 04 defb cr,lf,eot 353B FC3C n) ret 3539 3540 , , pnext - print mes:;age after- ca 11. :i541 3542 FC3D E :1 pnext: ex (sp) ,hI ;set message address 3543 FC3E 7E Id a, (h I) 3544 FC3F 23 inc hI 3545 Fe40 E3 ex (Sp),111 ;set return address 3546 FC41 FE 04 cp eat :1547 FC43 CB ret z 354B FC44 CO FOOC ca II conout :1549 FC47 18 F4 jr pnext 3550 3551 if options and (o.move or o.verf) 3552 , , set block address for move and verify. 3553 3554 FC49 F.B bloead: ex de,hl 3555 FC4A 67 or a ;clear carry 3556 FC4B ED 52 sbc III ,(je :get diffrenee between 3557 FC4D EEl ex de,hl ;hl & de for by tee aunt 3558 FC4E 05 PUSll de ;exchange de,be :i559 FC4F 50 Id d,b 3560 FC50 59 Id e,c 3561 FC51 Cl pop be 3562 FC52 03 inc i)c ;get count+l into bc 3563 FC53 C9 ret 3564 endif 3565 FC54 (9 ret 3566 3567 subttl Transient Command Area 3568 page

m -...,J ID

m Bcd COlll"Hi Open,t illY System for" tile XEROX 820-11 MACRO-80 3.44 09-0ec-81 00 Trails i ,HI t COlllllldnLJ Ar'ea 0

3569 3570 FC5!) cloc defl $ ;estatJlish ove,' I ay execution address 3571 overlay start 3572 OC55" cB.seg 3573 .. signoll - Announce System Ready. 3574 3575 FC55 OU signon: ex af,af' 3576 FC56 f:O F293 ca I I crt off ;disable rom/ram 3577 FC59 IJB ex af,af' 357U FC5A L8 4A jr z,sign4 ;if Rxl984 loaded disk driver 3579 FC5t: UB ex af,af' ;get syspio data 35UO FC5D 11 FO!11 Id hl,confg ;point to configuration byte 3581 f UiU CB 47 bit O,a 35B2 FC62 28 24 jr z,sign3 ; i f SASI interface present 35U3 FCb·1 F3 di 35B4 FC65 :JE CF Id a , 1 I 00 I 1 1 1 Il iset Pia B in Bit Mode 35U5 FCb7 03 10 out (sysctll,a J5B6 FC69 JE J8 Id a, 00 I 1 1000b i turn around dO, 1,2 3587 FC6B 03 10 out (sysct I) ,a 3588 FCnD D3 lC out (syspio),a :drop al I drive selects 35B9 FC6f :lE DO Id a,OdOh :reset wd-1797:-02 3590 FC71 D3 10 out (wdI797),a 3591 FC73 10 FE signl: djnz signl ;wait 1797 not busy 3592 FC75 DB lC in a,(syspio) 35!13 Fen CB 67 b; t c.five,a 3594 FC79 :lE 02 ld 0,2 ;preset 10 rnsec step rate 35!15 FC7B 20 04 jr nZ,sign2 ; if not 5" ~l596 FC7[l CB E6 set c.five,(hl) 3597 FCn :JE 03 Id a,3 :set long step 359B FC81 D3 10 sign2: out (wdI797) ,a : I'estore / unload heads 3599 FlB3 :32 Ff54 Id (steprt),a 3600 FCUG 18 IE jr sign4 3601 FCUB CB F6 sign3: set c . sas i , (10 I ) ;set Sas; card installed 36112 FCBA 21 F708 Id 10 I ,R igdpb :set address of rigid dpb J603 FC8D II F470 Id de,dpb5s ;set address of 5.25" floppy dpb 3604 FC90 [) 1 0300 Id bC,Sasidl :set sasi driver length 3605 FC93 EO BO Idir ;Move driver down 3606 FC95 E6 02 ane! 2 3607 FC9] 20 00 jr nz,sign4 ; if not A/E swap 3608 FC99 21 F361 Id hl,Seltab+l 3609 FC9C 06 08 Id b,8 3610 FC9l' 7E s i yn:3a: 1(1 a, (h I) 3611 FC9f EE 04 x or" 4 3612 FCAI 77 Id (10 I) , a 3613 FCA2 2 ~~ inc hI 3614 FCA3 23 inc 111 3615 FCA4 10 F8 djnz si9n3a 3616 3617 FCA6 CD FC3D sign4: ca I I pnext

p 3618 FCA9 IA defb clrs ;clear screen -0 3619 FCAA IB 38 defb esc 1'8' ;set low light as default mode -0 3620 FCAC 38 32 30 20 defm '820-11 v (() 3621 FCBU 49 49 20 76 :J 3622 FCB'l 2() a. :3(j23 FCIE; 34 2E 30 31 eJefb rev/100+'O','.' ,(rev lIIod 100) / 10+ '0' , (rev mod 10)+'0' )(

m

» Balcunes 0P""- at ill!) System f 0'- t t,,~ XEROX 1l20-II MACRO-IlO 3.44 09-0ec-lll -0 Trdllsiellt COlllllldllLi Area -0 It) 3624 FCB9 ~O 1 F lC 20 deflll ' .31.28; , 1982 Xerox Corp' ::J 0.. 3625 FCBD ~J1 39 38 32

)( 3626 FCCI 20 58 65' 72 3627 FCCS of 78 20 43

m 3(;28 fCC9 of 72 70 3b29 FCCe OD OA defb cr, If 363fl FCCE flA defb If 3631 FCCF 4C 20 20 20 (lefm 'L - LOdd System' 3Gn F CD:.! 4C GF 61 64 363:i FUll :W 53 79 73 3634 fCDEl 74 65 60 3635 fCOE 00 OA defb cr, If 3636 3637 if options and o. ·'errn 3630 feEU 40 20 20 20 defm 'H - ~Ios t Terminal' ]639 fCE4 48 6F 73 74 :.!640 FCEU 20 54 65 72 3641 FCEC 60 69 6E 61 3642 FCFO be 3643 FCfl . 00 OA defb cr, If ]644 endif 3645 if options and o. type 3646 FCF:l 54 20 20 20 defm 'T - Typewriter' 3647 FCf7 54 79 70 65 3641l FCFB 77 72 69 74 3649 FCff (-i5 72 3650 fOOl LID OA defb c r, If 31151 endif 3652 fOO:.! 07 04 defb 7,eot :J653 :1654 fDOS CD f006 eatkey: ca II canst 3655 fDUU CA fOO3 jp z.warm ;90 enter monitor 3656 FDOO CD F009 ca II conin 3657 FDOE 18 F5 jr eatkey 3650 3659 subttl lID byte Drivers 30GO page

m Balcone5 Operat illU SY5tem for t11e XEROX 820-1 I MACRO-80 3.44 09-Dec-8'1 00 I/O lJyte 01' ive. 5 N

3661 3062 overlay iobdvr 3663 OOBB' + c&seg 3664 3665 . depllase 3fi66 .pl1a5e lobloc 3667 3668 , , comins - Communications input status. 3fi69 3670 F770 DB 06 comins: in a,(siocpa) :167 I F772 OF rrca 3672 F773 9F sbc a,a 3673 F774 C9 ret 3614 3675 , , cominp - Communications input data. 3676 3677 F775 DB U6 cominp: in a,(5iocpa) 3678 F777 (IF rrca 3679 F778 3ll FB jr nC,cominp 3680 F77A DB 04 in a,(siodpa) 3681 F77C C3 FOE2 jp kbma5k 3682 3683 , , comout - Communications output. 3684 36B5 F77F CD F788 CO//lout: ca II comots 3686 f782 21:l FB jr z.comout 3687 F784 79 III a,l:; 3688 F785 (J:l (14 out (s i odpa) ,a 3fi89 f707 C9 ret 3690 \ 3691 , . comots - Communications output 5tatus. 3692 3693 F788 DB 06 comots: in a.(siocpa) 3694 f78A Efi 04 and 4 3695 F78C C8 ret Z 3696 f78D f6 FF or -I 3697 F78f C9 ret 3698

'3699 i; coniob - get console i/o byte. 3700 37111 F790 3A 0003 coniob: I Ll a,(iobyte) 3702 F793 E6 03 and 00000011b 3703 f795 C9 ret 3704 3705 . , iocono - Console output thr.ougtl iobyte. 3706 3707 F 79(; CD f790 iocono: ca II coniob 3708 f799 2!l E4 jr z.comout 3709 F798 ::SD dec a

» 3710 f19C CA F2fE jp z,fastcrot "0 :37 11 F79f 79 Id a,c "0 3712 f7AD C3 fOf8 jp s;oout tt> 3713 :::l 3714 ; ; iocons - Console 5tatus through iobyte. 0- 3715 )(

m

» Balcollt!s Opt!r'at il'" Syst"m for- tl1e XEROX 820-11 MACRO-80 3.44 09-Dee-81 0 1/0 uytt! D,-ivt!I S

0 ttl :1716 F7A3 co F790 ioeons: ea II eoniob :J 3717 F7Ab 2U CU jr z,eomins 0- 3718 F7A8 ,H) dec a >< 3719 F7A9 CA FOCD jp z,kbdst m 3720 F7AC C:i FOE5 jp siost

13721 Console input 3711 , , ioeoni - tl1rough iobyte.

3723 , 3724 F7AF CD F790 ioeoni: ea II eoniob 3725 F7B2 28 C 1 j ,- z,eolllinp 3726 F7B4 3D dec a 3727 F7B5 CA FOD8 jp z,kbdin 3728 F7BB C3 FOFO jp sioin 3729 3730 , , Istout - List output through iobyte. 3731 3732 F7BB 3A 0003 i a lis t : Id a.(iobyte} 3733 F7BE Eo CO and 1I00OOOOb 3734 F7CO 28 BD jr z,eomout 3735 F7C2 EA F70C jp pe,pioout 3736 F7C5 79 Id a,e 3737 F7C6 FA FOF8 jp m,sioQut 37:W F7":9 Ci F2FE jp fastert 3739 3740 , , List output through iobyte 3741 ; 3742 F7Ce ,jA U003 iolsts: Id a,(iobyte) 3743 F7U E6 CO and 1I00OOOOb 3744 F701 :!tl B5 jr z,eomots 3745 F703 EA F7F4 jp pe,piosto 3746 F70b FA 1'105 jp m,siordy 3747 F7D9 F6 FF 0'- - I 3748 F7DB U) ret 3749 3750 , , Para I I e I Output Driver. 3751 3752 F7DC CO F7F4 pioout: ea II piosto 3753 F7DF Lll F8 jr z,pioout ;if printer not ready 3754 F7El 79 Id a,e 3755 F7E2 OJ 08 out (gpioda),a ; load ellaraeter data 3756 F7E4 DB OA in a,(gpiodb) 3757 F7E6 CB 97 ,-es p.strb,a ;assert strobe 3758 F7EU D:J OA out (gpiodb),a 3759 F7EA LB 07 set p.strb,a ;release staDe 3760 f7Ee D3 OA out (gpiodb),a 3761 F7EE :JE OA Id a,IO ;delay fo,- ACK 3762 F7FO :W pial: dec a 376J F7FI 20 FD jr IIz,piol 3764 F7F3 C9 ret 3765 3766 .. Parallel Output Status. 3767 3768 F7F4 DB OA piosto: in a.(gpiodb) ;read status 3769 F7Fb 2F epl

m 3770 F7F7 [:,6 10 and shl p.rdyo

OJ 3771 F7F9 CO ret Z ;if ready W

m co .J::>.

Baleu!!"" Oper'ali .. , .. System tor tile XEROX 820-11 MACRO-80 3.44 09-Dec-dl liD uyte D,-ive",

3772 3773 3774 3775 3776 3777 3778 3779 3780 3781

FHA F7fC

OU80

f(j FF (,9

iO\..J(Jv5

or -1 ret

equ $-iobloc

.dephase

.phase c\oc+iobdvs

subttl Transient Command Processors page

p Elalcofles OperatillU System for' the XEROX 820-11 MACRO-80 3.44 09-0ec-81 :J Transient Commdnd Processors 0 It) 3782 j

3783 if options and o.ddvr a.. 3784 disk boot loader command )( 37tl5 m 3786 overlay boot

37117 1114U' + c&seg 3788 37n9 FC55 11 Ff50 Id hi, I i nbu f + I 3790 FC58 7E hoo t I : Id a, (h I) ,scan command line 3791 FC59 2C inc I 3792 FC5A 06 00 sub cr 3793 FC:)C 28 DB jr z,boot2 ; if no par·ameter. boot from A: 3794 FC5E FE 13 cp '-cr 3795 FC60 28 F6 jr z,bootl ;Skip leading blanks 3796 FC62 06 34 sub 'A'-cr 3797 FC64 D8 ret c ; i f invalicj drive 3798 FC65 FE 10 cp 16 3799 FC67 :1 F ccf

13UOO FC6n DU ret c ;if had drive 3801 FC69 4F boot2: Id c,a ;set boot drive selected 3U02 FC6A C6 41 add a, 'A' 3803 FC6C 32 FCOO Id (bootd),a ;set up error message 3804 FC6F LE 00 Id I ,0 ;set A: 3805 FC71 C5 push bc 3B06 FC72 E5 push hi 3807 FC73 CD FCEE call swap ;switch boot drive with A: 3808 FC76 21 FC09 Id hi ,booter ;set boot error return 3809 FC79 E5 pusl1 hi 3810 FC7A DE 00 Id c,O ; then boot from A: 3811 FCn CD FA17 ca II select 3812 FC7F CO ret nz ; if drive not configured or density error 3813 FC8lJ 3E Ff Id a,-1 3814 FC82 12 Id (de) ,a 3815 FC83 II OOOA Id de ,10 ;set dpb address offset \~I tl1in dpl1 3816 FC86 19 add 111, de 3tll7 FC87 ~) E Id e, (h I) .set dpb adeJ,'ess 3818 FC88 23 inc 111 3819 FC89 56 Id d, (h I) 3820 FC8A CD FA3C ca II home 3821 FC8D DE 01 Id c,l ;set sect 0" 1 3822 FC8F lA Id a, (de) ;get low sector's per track 3823 FC90 J .) FC04 Id (boots),a ; inform boot loader 3824 FC93 57 0,' a 3825 FC94 20 00 jr nZ,boot3 ; if not rigid 3826 FC96 21 0000 Id hl,I3 ;set reserved track offset wi thin dpb 3827 FC99 19 add h I ,de 3828 FC9A 4E Id c, (h I) ;get reserved tracks 3829 FC95 ~J inc hi 3830 FCge 46 Id b. (h I) 3831 FCH[l lJB dec bc ;point l:Jehi ;-\d dirE:lctory 3832 FC9E ED 4:J FA II Id (pt'tytrk) ,bc ;do i IIIP I i e(J seek 3U33 FCA~ 'If' ld c,a ;set sector zero for rigid 3834 FCA3 :! 1 E080 boot3: Id hl,bootbf ;point to boot load buffer 3835 FeAt) eLl FA48 ca II read jread co I (j start loader

m 3836 FCA9 CO ret nz ; if ,'ead error 00 lJ1

m Balcones Opera l i flU System for- tI)e XEROX 820-11 MACRO-80 3.44 09-Dec-81 00 Tr-allsient COlllllla.ld Processors aa

3837 fCAA II DOff Id de,bootld+128-1 ;sat boot loader address 3£13£1 fCAU 2 I EDff Id hl,bootbf+128-1 3!l39 fCBO 01 0080 Id. bc,128 3840 fCB:j ED fl8 Iddr ;move front half of boot loader to 80h 3841 fCB5 13 inc de 3842 fCBb lA Id a, (de) ;verify instructions read in 3843 fCB7 fE E5 cp Oe511 3844 fCfl9 (8 ret z , if disk I)as no system 3845 fCBA 21 fOOD Id hl,Monitr 3846 FCBD 22 f004 Id (warm+l),hl ,set warm start to reload monitor 3847 fCCD CO fD05 ca II Icp , load configuration parameters 3848 fCC3 21 112B Id hi, i obdvr , load iobyte driver 3849 fCC6 1 1 f770 Id de, i ob I oc 3850 FCC9 01 008D Id bc, i obdvs 3851 fCCC AF xor a 3852 FCCD CD f2A3 ca II crt Idi r 3U53 FeDD 11 0080 Id hl,bootld ,set start address 3854 fCD3 3E 00 Id a,O 3855 fCD4 boots equ $-1 ;sector-s per track 3856 fCD5 11 fADE Id de,phycmd ,te II boot loader from whence he came 3857 fCD8 E9 jp (h I) ;execute Boot Loader with return to boater 3858 3859 , . Booter - Boot E r"ror Processor. 3860 3861 fCD9 CD fC3D booter: ca II pneJ<t 3862 fCDC 117 defb 7 3U63 fCDD 64 3A 20 4C bootd: de fill 'd: Load error. 3864 fCEI 6f 61 64 20 3U65 fCE5 65 72 72 6f ~j 8 ()() fCE9 72 2E 3867 fCE8 LJ4 dafb eot 3868 fCEC C 1 pop bc ,switch drives back 3869 fCED E 1 pop hi 3870 3871 , , swap - swap logical drives. 3872 3873 Entry: C first drive inelex. 0-15 3874 L second drive index, 0-15 3875 3876 feEt lIb llO swap: Id b,O ;clear upper indices 3877 fCfO fill Id h,b 3U78 fCfl II f360 Id de,seltab iiset select table add"ress 3879 fCf4 29 add hi ,hi 3880 fCf5 19 add hi ,de 3881 fCf() EB ex de,hl ;set second add/·ess to DE, get seltab to HL 3882 FCf7 !l9 add hi, bc 3883 fCf8 09 add 11 I ,tIC ;set firs t address to HL 3884 fCf9 (16 02 Id b,2 38U5 fCfB 4E swapl : Id c, (h I) :swap two bytes

}> 3886 fCfC IA Id a, (de) 'U 3887 FCfO 77 Id (h I) ,a 'U 38U8 fCFE 19 Id a,c /1) :W89 fCff 12 Id (de), a :J 3U90 FDOD 23 inc hi a... 3891 fOOl 13 inc de X 3892 F002 In f7 djnz swapl ,it swap not complete m

l> Balcones Ope,-a l i "~J Systtlfll for tile XEROX 020-11 MACRO-80 3.44 09-Dec-81 U Tr"ansient COIiUlldllll Pr"ocessor-s U ttl 3tH) 3 FDJiI U) ,"et ~ 3U94 0... 3095 Icp - load configuration parameters. , , )( 3896 , m 3897 FOll5 :jE 81 Icp: Id a,lOOOOOOlo ;default i/o byte to CRT: and LPT:

:1Ol'1O FDOl J2 0003 Id (iobyte) ,a 3899 FDOA 3A FCD4 Id a,(ooots) ,get boot diskette type 3900 FDOD 67 or a 3901 FDOE DE 20 Id c,32 3902 FD10 21 E080 Id hi ,oootllf ;use boot loader buffer 3903 FOl3 20 08 jr z,lepl ,if rigid, use system track, sector 32 3904 FOl5 FE 16 cp 26+1 3905 FD17 08 ret c ;no parameters from single density boots 3906 FOl8 DE 03 Id c,3 odd configuration comes from track 0, sector 3 3907 FDIA ~ 1 EEOO Id hI .bootbf+ 128 ;use second half of boot loader buffer 3908 FDID CD FA48 I cpl: ca II read 3909 F020 CO ret nz fit can't read configuration 3910 FD21 jA EEOO Id a,(bootof+128) 3911 FD24 Do E5 sub Oe5h 3912 FD2b C8 ret z 3913 FD27 :lA EE76 Id a.(z.xonp) ;configure Xon-Xoff 3914 FD2A 57 or a 3915 FD25 20 03 jr z ;lcp2 3916 FD2D FE C9 cp Oc9h 3917 FD2F CO ret nz 3918 FD3U 32 F 115 Icp2: Id (Xonenb) ,a 3919 FD33 3A EE60 Id a,(z.stpr) ;configure step rate 3920 FD36 32 FF54 Id (steprt),a :j921 FD39 3A EE5F Id a,(z.scra) ;configure screen attribute 3922 FD3C 32 FD49 Id (Icpa) ,a 3923 FD3f 3A EE62 Id a,(z.keym) ;configure keyboard mask 3924 F042 32 FD46 Id (Icpb),a 3925 FD4S CO FC3D ca II pnext 3926 FD48 16 defb esc 3927 FD49 110 Icpa: defb 0 3928 FD4A 16 defb esc 3929 F04ll 00 Icpb: defb 0 :1930 FD4C 04 defb eot 39:1 I f D4fJ 21 EE63 Id hl,z.sioA ; conf i gUf"e Sio channels 3932 FD50 3E 02 Id a.2 3933 FD52 46 Icp3: Id b, (h I) ;get number" of bytes 3934 FD53 23 Inc hI 3935 F05'1 'IE Id c, (h I) ;get port address 39:J6 FD5!, 1:1 inc hi ,,9:17 FD5G ED 63 o t i r 3938 FD58 3D dec a 3939 FD59 20 F7 jr nz. I cp3 3940 FD56 3A EE7D Id a,(z.baua} ; conf i gur"e cllanne I A bit rate 3941 FD5E D3 00 out (bauda),a 3942 FD60 3A EE7E Id a,(z.baub) ;configure channel 6 bit rate 3943 FDln D3 OC out (baudb) ,a 3944 F D6!'> JA EE77 Id a,(z.siom) ;configure printer ready mask 3945 FOGel .l2 FlOC Id (siomsk},a 3946 FDoll 3A EE79 Id a.(z.siov) ;configur"e pl'inter ready value

m 3947 fObE :n FIDE Id (sioval) ,a 00 3948 F071 JA EE7F Id a,(z.iobt) ; conf igur'e I/O byte .......

m Belleones Oper'a t i IIU System for the XEROX 820-11 MACRO-80 3.44 09-Dec-81 00 T ,"ailS i en t [OIlU1kjl){l P,"ocessors CO

3949 FD74 32 0003 Id (iobyte),a 3950 FD77 C9 ret 3951 else 3952 boot equ wllat 3953 endif 3954 \ 3955 _L goto to memory location command --, , 3956 3957 overlay goto 3958 026B' + c8.seg 3959 3960 fC55 B7 or a 3961 FC56 37 scf 3962 FC57 C8 ret Z ;if no parameters 3963 FC58 E5 push III ;set goto address :l964 FC59 DD EI pop i x ; Id i x ,hI 3965 FC5B EB ex de,hl ;set second arg to HL 3966 FC5C 7D Id a, I ;and A 3967 FC5D 50 Id d,b ;set third arg to DE 3968 FC5E 5D Id e, I 3969 fC5F ED 4B FFBB Id bC,(param4) ;set fourth arg to BC 3970 FC63 CD FAD6 ca II jpix 3971 FC66 CO FCIB ca II put2hs ;print A reg 3972 fC69 C3 FCI6 jp put4hs 3973 3974 , , memory dump ~ommand --3975 3976 overlay memdmp 3977 02B2' + c8.seg 397B 3979 FC55 jD dec a ; clleck parameter count 39BO FC56 28 Ob jr z,mdmp2 39BI FC50 :30 dec a 39B2 FC59 2B 00 jr Z,IIldlllp3 39B3 FC5B 2A FFBD mdlllpl : Id hl,(last) 3984 FC5E 1 1 0010 mdlllp2: Id de,16 39115 FC51 18 OE jr mdmp3b 39fJ6 39fJ7 FC6] EB mdlllp3: ex de,hl 39B8 FC6'1 ED 52 sbc hl,de ;derive bytecount for dump range 3989 FC66 DIl ret c ; i f addresses backwards 3990 FC67 06 04 Id b,4 3991 FC69 CB 3C mdmp3a: srI h ;divide bytecount by 16 3992 FC6B CB lD rr 1 3993 FC6D 10 FA djnz Illdlllp3a 3994 FC6F 23 inc hI 3995 FC70 EB ex de,hl ~i996 FC71 CD FBBF ml11llp30: ca II dump ;dump de*16 bytes strting at hi 3997 fC74 ~L fFBD Id ( I as t ) ,Ill

» 3998 FC77 [9 ret 1) 3999 1) 4000 -- memory examine command --(1) 4001 ::J 41102 overlay view Q., 4003 02A5' c&seg )( 4004 m

» BolLolles OfJero till,) Systelll fo, tile XEROX 820-11 MACRO-80 3.44 09-0ee-81 "0 T'"olls i ent COllllllalltl P,-ocesso,'s "0 J It) 4005 Fc~55 CO FB22 viewO: ea II mdata :J 4006 FC50 CO FC27 'ca 11 echo 0..

4007 FC58 FE 00 cp cr )( 4008 FC5ll 28 2F jr z,view4 m 4009 FC5f FE 20 cp

4010 FCGI 28 20 jr z,view5 4011 FCG3 FE 22 cp 4012 FC65 20 08 jl' nZ,viewl 4UI3 FCG7 CO F009 ca II conin 4014 FCGA CD FOOC ca II conout 4015 fC6D 10 IB jr view3 4016 FCGf CD FBF3 viewl: ca I I hexbin 4017 FCn ~l F ccf 4018 FC73 DO ret nc 41119 FC74 4F Id c,a 4020 FC75 87 add a,a 4021 FUG 07 add a,a 4022 FC77 07 add a,a 4023 FC70 U7 add a,a 4024 FU9 47 Id b,a 4025 FUA CD FC27 ca II echo 4026 FC7D D6 00 sub cr 4021 FC7F 28 08 jr z,view2 4020 FCUI CG 00 add a,cr 4029 FC83 CD FBF3 ca II lIexbin 4030 FCU6 :IF ccf 40:11 FCU7 DO ret nc 4032 FCOO 48 Id c,b 4033 FC!l9 B 1 view2: add a,c 40:14 FCOA 77 view3: Id (h I) ,a 403!) FCOB CD FBOE ca II check 4036 FCUE 2J view4: inc hI 4037 FCOF 23 inc hi 403B FC90 2B view5: dec hI 4039 FC91 I B C2 jr viewO 4040 4041 if options and o.baud 4042 Baud Rate Command 4043 4044 * B<rate> [channe I I ; cllanne I may be 0,1 or AlB 4045 4046 overlay baud 4047 02E3' + e&seg 404B 4049 FC55 B7 or a 4050 FC56 37 scf 4051 FC57 CO ret Z ;if no parameters 4052 FC5B 3D dec a 4053 FC59 20 02 j r. nZ,baudl ; if channel specified 4054 FC5B IE 01 Id e,l ;set channel 1 (B) 4055 FC5D CB 43 baud I : bit O,e ;elleck fJort 4U56 FC5F OE 00 Id c,bauda ;set COllllllunicat ions port 4057 FUji 2B 02 jr z, baue12 405B FCG3 DE OC Id c,baudb ;set printer port

m 4059 Fe£)5 ED 69 tlaud2 : out (c) , I ;set baud rate 00 4060 FCG7 AF xor a \.0

m Bdleu",,:> 0PtH" l ill\) ~ystelll t u ,- tile XEROX 020-11 MACRO-OO 3.44 09-Dee-81 lD Transient COllllHdllll p,-oc t!sso rs 0

4U61 FC6U [9 ret 4062 else 4063 baud equ wl1at 4064 endif 4065 4066 if options and o.disk 4(1)7 ; ; disk sector read/write command 4068 4U69 " R <unit> <track> <sector> <address> 4070 " W <unit> <track> <sector> <address> 4U71 4072 overlay dskcmd 4073 02F7' + c&seg 4074 4075 fC55 47 Id b,a 4076 fC56 3A FF5C Id a,(linbuf) 4077 FC59 06 57 sub 'W' 4078 FC5B 20 IE jr nZ,dskl 4079 FC5D BO or b 4080 FC5E 20 16 jr nZ,dskO 'lOBI fC60 4f Id c,a 4082, FC61 CD F2FE ca II Fastcrt 4083 FC64 LJ inc 111 4084 FC65 II 00 II 10 de,I7 40U5 FCbU II I 0015 Id bC,21 4086 FC6B EB ex de,l1l 4087 fC6C Af xor a 4088 FC6D 32 FC54 Id ($-25),a 4089 FC70 CD F2A3 ca II crtldir 4090 FC73 C:~ FC36 jp crlf 4091 4092 FC76 :lA FC54 dskO: Id a,($-34) 4093 FC79 B7 or a 4094 fC7A CO ret IlZ 4095 FC78 78 dsk 1: ld a,n 4096 FC7C fE 04 cp 4 ;cl1eck parameter count 4097 FC7E :n scf 4098 FC7F CU ret nz 4099 FC80 21 FFB5 Id 111, paraml ;move parameters to disk command 4100 FC83 II FAIO ld de,pl1ydrv 4101 FC86 L) 1 OU07 Id bC,3*2+1 4102 FC89 ED AO I d i "1103 FC8B 23 inc hi ;skip ·upper unit 4104 FC8C ED BO Idir 4105 FC8E U5 dec n ;set select operat'i on 4106 FC8F CD FA51 call xqpllYs ;eJ<ecute physical select 4107 FC92 7D ld a, I 4100 FC93 B4 or 11 4109 FC94 28 16 jr Z ,dsker-r ;if select error

» 4110 FC96 06 00 Id b,O ; pr-ese t write command "0 "I I I I FC9U :lA Ff5C Id a,( I illbuf) ;get command "0 4112 FC9B FE 57 cp 'W' (J) 4113 FC9li 20 01 jr z,dsk3 ;if write ::J 4114 FC9f 114 inc b n.. 4115 FCAO CD FA51 dsl,3 ; ca II xqphys ;execute driver >< 4116 FCA3 LA FFBB Id 11I,(paraIll4) m

I> Balcolles Ope'~dt ill,.) System for t I,e XEROX B20-11 MACRO-BO 3.44 09-Dec-Bl

J T,'dllsient CO"""ii'ltj P,oce5surs J 1) 4117 fCAb II 0010 Id de,I6 ;assume 256-byte sector :J 41 Ifl fCA9 LA FBBF jp z,dulIlp ;dullIp disk read buffer If no error :l.. 4119 ~ 4120 FCAC Cll FC30 dsk.HT: ca II pnext

" 4121 FCAF 44 73 68 20 deflll 'Osk Err' 4122 FCB3 45 72 72 4123 FCB6 04 defb eat 4124 FCB7 C9 f'e t 4125 else ;(not disk options) 4126 dskcllld equ what 4127 endif 412B 4129 if options and o. inpc 4130 , , read input port command 4131 4132 • 1 <16-bi t port address> 4133 4134 overlay incmd 4135 035A' + c&seg 4136 4137 FC55 3D dec a 413B FC56 37 scf 4139 FC57 CO ret nz ;if not one parameter 4140 FC5!l 40 Id c, I '; set input port 4141 FC59 44 Id b,h 4142 FC5A CD FC36 in 1 : ca II crlf 4143 FC50 79 Id a,c ;display port addrflss 4144 FC5E CO FCIB ca II put2hs 4145 FC61 ED 7B in2: In I a, (c) 4146 FC63 CD FCIB ca II put2hs 4147 FC66 CO F009 ca II co,li n ;read character 414B FC69 FE 20 cp 4149 FC6B 2!l F4 jr z, i n2 ;read same port again 4150 FC60 FE OD cp cr 4151 FC6F 28 06 jr z, in3 ;if read ne)(t 4152 FC71 FE 20 cp 4153 FCn 28 04 jr z, i n4 ;if read previous 4154 FC75 87 or a ;elear carry 4155 FC76 C9 ret 4156 FCn (13 in3: inc be .advance to next port 4157 FC78 113 inc be 4158 FC79 OB in4: dec be 4159 FC7A lU DE jr in 1 4160 else 4161 incmd equ what 4162 endif 4163 4164 if options and O.Dute 4165 . , wr i te to output port eo""nand 4166 4167 * (] <t6-blt port address> <a-bit value> 416B 4169 overlay outcmd 4170 03!l1 ' + c&seg

m 4171

I.D 4172 FC55 FE 02 ep 2 ; requ i ,'e two parameters ~

m Balcolles Opel-iJt ill~J :'y:;telfl fOI' tile XEROX 820-11 MACRO-80 3.44 09-0ec-81 lO T I-all:' i ell t COllllllalid f'roc es so r- s IV

4173 FC57 37 scf 4174 FC58 CO ret n.: ; if not 2 parameters 4175 FC59 4D Id c, I ;set 16 bit output port address 4176 FC5A 44 Id b,h 4177 FC58 ED 59 out (c) ,e :output to dO-d7 and address to aO-al7 4178 FC5D 87 or a 4179 FC5E C9 I'et 4180 else 4181 outcllld equ what 4182 endif 4183 4184 if options and o.ramt 4185 ; i memory read/write diagnostic command --418b 4187 * X <fir-st addr> <last addr> 4188 4189 overlay test 4190 0388' + c&seg 4191 4192 FC55 FE 02 cp 2 ;check parameter count 4193 FC57 -:n scf 4194 FC5S CO ret n.: 4195 FC59 13 inc de 419b FC5A 5A Id e,d ;get ending page address into e 4197 FC5B 54 Id d,h :get starting page address into d 419t:1 FC5C Ob DO Id b,O : initial i.:e pass counter" 4199 FC5E 62 test1: Id h,d :point hi to start of block 4200 fC5F 2E 00 Id 1,0 4201 FCbl 70 test2: Id a,l 4202 fC62 AC xor h :generate test byte 41D3 FCb3 AS xor b 4204 FC64 77 Id (h I) ,a ;store byte in ram 4205 FC65 23 inc hi 4206 FC6!; 7C Id a ,II 4207 fCb7 BB cp e :check for end of test block 4208 FCbB 20 F7 jr n':,test2 4209 FC6A 62 Id h,d ;now read back each byte & compare 4210 fCb8 2E 00 Id 1,0 ;point hi 'back to start 4211 FCbD 70 test3: Id a, I 4212 FCbE AC xor II ;re-generate test byte data 4213 fC6f AS xor b 4214 FC7U CD fBOE ca II check ;verify memory data s til I good 4215 FC73 CO ret n.: ; ex i t if escape request is indicated 4216 fc/4 23 inc III ; else go on to next byte 4217 FCn 7C Id a ,I. 4218 F06 B8 cp e ; cl.ec k for end of block 4219 fCn LO f4 j r- n':,test3 4220 FC79 D4 inc b ;bump pass count 42LI FOA 3E 1B I (j a, '+'

» 42L2 FOC CD fC20 ca II output

U 4223 FC7F 28 DO jr .:, t es t 1 ;do another pass if user not unhappy U 4224 FCBl C9 ret m 4225 else ::l 4226 test equ what 0.. 4227 endif X 4228 m

};. Baleo"e:; Opera! illU System tor tile XEROX 820-11 MACRO-80 3.44 09-Dec-81 U TI'ansient Command P,'ocessors U tD 4n9 if options and o.fill :::l a. 4230 · . f i I I memory with constant command --

>< 4231 4231 overlay f i I I

m 4233 0388' + c&seg 4234 4235 FC55 FE 03 cp 3 ;check if parameter count=3 4236 FC57 37 scf 4237 fC58 CO ret nz 4238 FC59 71 fill 1 : Id th I) . c 4239 FC5A E5 PUSll hi 4240 FC5B B7 or a 4241 FC5C ED 52 sbc hi ,de ;compare hi to end address in de 4242 FC5E E 1 pop hi 4243 FC5f 23 inc hi ;advance pointer after comparison 4244 FC60 38 F7 jr c • f i I I 1 4245 FC62 C9 ret 4246 else 4:147 f i I I equ what 4248 elldif 4249 4250 if options and o.move 4251 · , memory block mO,ve command 4252 4253 overlay block 4:154 n:3C ()' c&seg 4255 4256 FC55 fE 03 cp 3 ;clleck if parameter count=3 42fj'1 FC57 :J7 scf 4258 FC5f1 Cll I-e t nz 4259 FC59 CD FC49 ca II blocad 42bO fC5t: 79, Id a,c 4261 FC5D BO or b 4262 FC5E C8 ret z ; ex i t now if bc=O 4263 FC5F ED BO Idir 4264 fC61 C9 ret 4265 else 4266 block equ what 4267 endif 4268 4269 if options and o.vel-t 4270 · , memory block compare cOllI/Band 4271 4272 overlay vercmd 4273 O:j(lj' + c&seg 4274 4275 FC55 FE 03 cp 3 ;check if parameter count=3 4276 fC57 :J7 scf 4277 FC58 CO ret nz 4278 FC59 CD FC49 ca I I blocad 4279 fC5C 18 08 jr verf2 4280 4281 FC5E IA verf 1 : Id a. (de) 4282 FC5F CD FBOE ca II check ; compal'e data I!!> de and @ hi

m 4283 FC6:! CO ret nz ;exit if escape request is indicated lD 4284 FC63 23 inc hI W

m Baleoll"''; OP<H ali IIU System tor t I)e XEROX 829- 11 MACRO-80 3.44 0!:)-Dec-81 lO Tran,;ient COllllllalH1 f' roo c e,;,; 0 r" s .t:-

4285 fC64 I j inc de 4206 fC65 DB dec be 4287 fC66 7B verf2: Id a,b 4200 fC67 B I or c 4289 fC68 2C1 f4 jr nZ,verfl 429C1 FC6A C9 ret 4291 else ·1292 vercmd equ what 4293 endif 4294 4295 if options and o.prot 4296 , . Printer Protocol. 4297 4298 overlay proto 4299 03E9' + c&seg 4300 4301 FC55 3D dec a 4302 FC56 28 10 jr z,protl ; if one parameter 4303 FC58 06 02 sub 2 4304 FC5A :17 scf 4305 FC5B Cil ret nz 4306 FC5C 7B Id a,e 4307 FC50 F6 04 or 4 4308 FC5F ]2 FlOC Id (siolllsk.l,a 4309 FC62 79 Id a,c 4310 FCb3 F6 04 or 4 4311 FC65 32 FlOE Id (sioval),a I

4312 FC68 7D protl: Id a,l 4313 FC69 B7 a" a 4314 FC6A 3E C9 ld a,Oc9h 4:315 FCbC 20 01 jr z,prot2 4316 FC6E AF xor a 4317 FC6F 3L F 115 prot2: Id (Xonenb), a 4318 FC7L (9 ret 4319 else 4320 proto equ what 4:321 enti if 4322 4323 if (options and o:type) ne 0 4324 .. Type - Simple Typewriter. 4325 4n6 overlay type 4::127 0407' " c&,;eg 4328 4329 FC55 B7 or a 4330 FC56 20 06 jr z, typO :if no tJaud rate 4331 FC58 3D dec a 4332 FC59 :n scf 4333 FC5A CO ret nz ; i f lIIore than one parameter

):> 4334 FC5b 70 Id a, I U 4335

\ FC5C 03 DC out (baudb),a ;set printer baud rate

U 4336 FC5E CO FC30 typO: ca II pnext II) 4337 FCbl IA defb clrs :J 4330 if (options and o.esct) ne 0 a.. 4339 Fe6:' lB 31 defb esc, ' 1 ' iset B bi t keyboard mode >< 4:l40 else m

» U U tl) ~ a. )(

m

m lD Ul

BClI C'"H;:; Op.H'd! ill~1 Trdllsiellt CUJlUHdfld

4:l41 4342 4:l43 fC64 4344 fC6il 4345 fe6C 4346 FC70 ,U47 FC74 434U fC7U 4349 fC7C 4350 fCUO 4351 fC04 4352 FCOO 4353 fCOC 4:154 FCOD 4:155 4356 fC90 4357 FC93 4350 FC95 4359 fC90 4360 FC9A 4361 fC9D 4362 FC9f 4363 FCAI 4364 fCA4 4365 fCA7 4366 FCA9 4367 fCAC 4368 fCAF 4369 fCB2 4370 FCB4 4371 fCB6 4372 fCBB 4373 fCBB 4374 FCBE 4375 4376 4377 4370 4379 4300 4301 4302 4303

:)ystem f 0 ,- tl1e XEROX 020-11 MACRO-OO F'I-oce:;so,-s

detb endif

54 79 70 65 def," 17 72 69 74 65 72 20 60 6f 64 65 2E 20 20 54 6f 75 63 60 20 43 54 52 4C 26 45 53 43 20 74 6f 20 65 70 69 74 2E 00 OA 04 defb

CD fOE5 typ I: call 2B Of jr CD FOFO ca II E6 7f and CD fOOC ca II fE 00 cp 3E OA Id CC FOOC ca II CD fOO6 typ2: ca II !1I E7 jr CD fOD9 ca II CD FOfO ca II CD FODC ca II fE DD cp !D DA jr :l E OA Id CD fOfO ca II CD FOOC ca II III DO jr

else type equ

endif

if , . Terminal

subttl page

3,44 09-Dec-01

'0'-'",,' ;set 0 bit keyboard 1Il0de

'Typewriter mode. ,Toucl1 CTRL+ESC to ex it. '

cr,lf,eot

siast ,status printer z,typ2 ; if cl1ar not ready sioin ;read cl1aracter 7f11 ;strip parity bit conout cr a, 1 f z,conout const ;statu:; console z,typl ;if user not active conin ;read keyboard sioout ;send cl1aracter to printer conout :and screen cr nz,typl ;if not CR a. If ;send line feed to screen and printer. sioout conout typl

wl1at

options and o.term / Scro II Drive,- .

Terminal / Screen Manager

m lD Cl'

}> "0 "0 (J)

:J 0.. )(

m

Balcones Ope/'ati,,;) System fO/- tI',e XEROX 820-ii MACRO-80 3.44 Terminal / Scr-eell Md.lager

09-Dee-Bl

4304 4305 4386 overlay term 4387 0472' + c&seg 4388 4309 OOOF pass8 equ 15 4390 0016 ins lin equ 22 4391 0017 dell in equ 23 4392 00lA clrchr equ 26 4393 ODIE hOlllscr equ 30 4394 001F force equ 31 4395 I

4396 0081 kuplin equ 81h ;Move top line off screen to 4397 0082 kdnl in equ 82h ;Move bottom line off screen 4398 OOBI Rllltto9 equ 80h+' I' ;To9gle Remote Echo 4399 OOB2 Rllltalf equ 80h+'2' ;To9gle Remote Auto LF after 4400 OOOA Localf equ 801l+lf ;Toggle Local Auto LF after 4401 OOFF Typtog equ 80))+7fll ;Toggle Local Echo 4402 OOAE Brkkey equ 8011+' . ;Hardware BREAK function 4403 4404 0007 s. I ecllo equ 7 ;.1 oca I ecl10 4405 0006 s.recho equ 6 iremote echo 4406 0005 s.autol equ 5 ; I oca I auto If after cr 4407 00U4 s.autor equ 4 :remote auto If after cr 4408 4409 0100 T,'mllu f equ 100h 4410 EE8D Buftop equ Tr/llbuf+760~80

4411 EfOO Siobuf equ Monitr-IOOtI 4412 EFOn T nns t k equ Siobuf 4413 4414 FC55 FE 02 cp 2 :check number of arguments 4415 FC57 3F ccf 4416 FC58 DO ret c ;if more than 4417 FC59 B7 or a 4418 FC5A 20 02 jr nz, tenn1 :if port specifed 4419 FC5C 2E 00 I d 1,0

bu·ffer to buffer

CR CR

4420 FC5E 01 0406 tennl: I (j bc,siocpa+siodpa*256 ;preset A channel ports 4421 FC61 CB 45 bit 0,1 442l FC63 :w 03 jr z,tenn2 ; if Oil or AlB 442~1 FC65 o 1 0507 ld llc,siocpb+siodpb*256 ;set B channel ports 4424 fC68 EO 43 fU8 terlll2: Id (ports),llc 4425 FC6C 31 EFOO Id sp,trmstk 4426 FC6F CO FC30 ca 11 pnext 4427 FC72 lA db clrs 4428. if options and o.esct 4429 FC7:3 1 B :31 [H) esc, ' 1 ' 4430 else 4431 dll passO 4432 endif 4433 FC75 54 65 72 60 db 'Terminal mode. Touch CTRL+ESC to ex it .• 4434 FC79 69 6E 61 6C 4435 FC70 2U 60 6F 64 4436 FC81 65 2E 20' 20 4437 fC8S 54 6F 75 63 4438 FC09 68 2U 43 54

}> tJa1COIlt!5 OPt!"u till,) Sy"tem f 0'- tile XEROX H2O-II MACRO-BO 3.44 09-Dec-Bl -0 Te,.,,, ilia I / Sc ( t:H:!1I Manager' -0 In 44::19 fCHD !) " 4C 2B 45 :J 4440 fC!:)1 ~J ~:i 43 20 74 C1.

4441 fC9S (if 20 65 78 )(

444L fC99 6y 74 2E m 4443 fC9C OD OA du cr-, If

4444 fC9E 04 db eat 444!) 4446 fC9f FO 21 fEE5 Id Iy,status ;set pointer to status byte 4447 444H fCA::I Cll fOll6 term3: ca II canst ;status keyboard 4449 fCAli C4 fCBI ca II 'u,pkl ; p,'ocess keyboard input 4450 FCA9 CD FEC8 ca II slolst ;status sio 4451 fCAC C4 fD40 ca II nz,prc ;process remote character 4452 FCAF lU f2 jr term3 ;untll user escapes 4453 4454 , , pki - Process Keyboar-d Input. 4455 ; 4456 FUll jE OU pk I: I'd a,O 4457 feBL brkfly equ $-1 445B fCBJ tn or a 4459 fCB'1 C4 f021 ca II nZ,clrbrk ;termlnate pending break 44bO fCB7 CO f009 ca II conin ;read input 4461 fCBA CB 7f bit 7,a 4462 fCaC 20 DB jr nz,pkll ;if function key 4463 fCBt CO FD5F ca II sndrmt ;send it to remote 4464 fCCl fD CB 00 7E bit s.lecho,(ly) 4465 fCCS C4 fD4C ca II nZ,sndloc ;if local echo enabled, display console input 4466 fCeB C9 ret 4467 fCe9 fE 81 pk i 1: cp kup lin 4468 fCeS 20 12 jr nZ,pki2 ;if not scro II up 4469 FCCD CD fE50 ca II gcp ;98t cursor position 4470 fCDO CD fC3D ca II pnext ;hom8 screen, then delete top line 4471 if options and o.esct 4472 FCD3 IE lB 52 04 deth homscr.esc, 'R' ,eat 4473 else 4474 defb homscr,dellln,eot 4475 endif 4476 fCD', CD fDB9 ca II I t I ; I Ink top I I ne 4477 FCDA CD fDEB ca II (lb I ;liisplay bottom line 4478 feDD HI 14 jr pki3 4479 FCDF FE 82 pki2: cp kdn I In 4400 FeEl LO 13 jr nZ,pki4 ;if not scro II down 4401 FCE] CD fE50 ca II gcP ;get CLIf'SOr pOSition 4482 fCEl; CD feW ca II pnext ittome screen. insert blank line 448:3 if options and o.esct 4404 FeE9 , E lB 45 04 defb homscr,esc, 'E' ,eat 44B5 else 4486 defb homscr-,del I in,eot 44B7 eodlf 448B feED CD FEUB ca II Ibl ; I Ink bottom , Ine 44B9 FCFO CD FDBI ca II dtl ;display top line 4490 FCF3 C3 FE6E pki3: jp rcp ;restore cursor position 4491 FCFb FE FF pki4: cp Typ to9 4492 FCfU :W 04 jr nz,pki5

m 4493 FCfA :iE 60 Id a, 1 shl s.lecho lD 4494 fCfC 10 "-J

16 jr pkiB

m Balcones Oper-a l i IICJ System for- the XEROX 820-11 MACRO-80 3.44 09-Dec-81 lO Ter-milla I / 00

Screen 11'lanager

4495 FCFE FE BI pki5: cp Rmttog 4496 FOfJfJ LO 04 jr nZ,pl<i6 4497 fDU2 JE 40 Id a, I shl s,recho 4498 f004 10 DE jr pki8 4499 fDDG fE OA pki6: cp Localf 4500 fDOU 20 04 jr nz,pki7 4501 FDOA 3E 20 Id a,l shl s.autol 4502 fOOe 18 06 jr pkl8 4503 fDOE fE B2 pkl7: cp Rmtalf 4504 fDID LO 09 jr flz,pkl9 4505 FOl2 jE 10 Id a, I shl s.autor 4506 FOl4 FD AE DO pkl8: xor ( I y ) 4507 fO I I FD 77 00 Id (Iy),a 4508 fOIA C9 ret 4509 fOIB FE AE pkl9: cp Brkkey 4510 fOlD CO ret nz 4511 FDIE 3A FCB2 Id a,(brkflg) 4512 fD21 EE ff clrbrk: xor -1 4513 fD23 32 fCB2 Id (brkflg),a 4514 F02() 16 10 Id d,10h ;set I I ne SPACING 4515 FD28 20 02 jr nZ,setbrk 4516 FD2A 16 00 Id d,O ;set line MARKING 4517 fD2e ED 4B fE78 sett)rk: Id bc, (ports) 451U fD3U 3E D5 Id a,5 ;set up WR5 4519. FD32 f3 d i. 4520 FD33 ED 79 out (c) ,a 4521 fD35 3E AA Id a,10101010b ;assert OTR, 7 bpc, RTS, Tx Enb 4522 FD37 B2 or d 4523 fD38 ED 79 out (c) ,a 4524 fD'3A fB el 4525 FD3tl 3E FF Id a,Offh 4526 fD30 C3 fE9D jp sloot isend RUBOUT to allow MARKING 4527 4520 , , prc - Process Remote Character. 4529 4530 f040 CD FED6 flrc: ca II sloinc ; r-ead remote character 4531 fD43 FO CB 00 76 bit s.recho,(ly) 4532 f047 C4 fD5f ca II nZ,sndrlllt ;echo it back 4533 F04A 10 26 jr doc ;display It I oca Ily 4534 4535 .. sndloc - send character to screen. 4536 4537 F04C CO f0072 sndloc: ca II doc 4530 f04f FE 00 cp cr 4539 fD51 CO ret nz 4540 f05L fD CB 00 6E bit s.autol,(ly) 4541 fD5b CO ,-et z 4542 f057 jE OA Id a, If 4543 F059 CO f072 ca 11 doc

» 4544 f05C :jE 00 Id a,cr 4545 FD5E t:9 ret

"D 4546 "D It> 4547 , . sndrmt - send cl)ar-acter to remote. :J 4548 a.. 4549 fD5f CD FE90 sndrmt: ca II sioot

>< 4550 fDb2 fE 00 cp cr

m

» Baleulles Ope,-at ill\) System fur the XEROX 820-11 MACRO-80 3.44 09-0ec-81 "0 lUI mliia I I SCI-eell Manone,-"0 ,/1) 4551 fDb4 LtJ ret nz '::1 4552 f065 fP CB 00 66 bit s.auto'-,(iy) 'a"

455~ fD69 l:tl ret z :X 4554 f[)bA :1E UA Id a, If m 4555 F06C CO FE90 ca II sioot

4556 I' DbI' iE lID Id a,cr 4557 f071 Ul ret 4558 4559 , , duc - Display One CI'oracte,- . 4560 4561 F07L FE 7f doc: cp 7fh 4562 1'074 L8 ret z ;don't display RUBOUT 4563 F075 4F Id c,a ;send it to screen 4564 F076 (5 push bc 4565 f077 CO Ff:9B ca II outcrt ;display character 4566 F07A l I pop be 4567 f078 47 Id b,a 4568 F07C 79 Id a,c 4569 FOU) fE OA cp If 4570 FO-/f CO ret nz 4571 F08ll (J4 inc b 4572 F081 115 dec b 4573 FOIlL CO ret nz ; if line feed did not sera II 4574 f083 CD F089 ca II I t I ; link top line 4575 FO!.lI1 JE OA Id a, If 4576 F081l 1:9 ret 4577 4578 ; ; I t I - link top line. 4579 45110 FDIl9 21 FF5C I t I : Ip hi, I inbuf 4!,8 I FD8e ED 5B FEE8 Id de,(topptr) ;set address of line above screen 4582 F090 III 0050 Id bC,80 4583 fD9~ ED BO Idir ;move line 4584 F095 CD FE34 ca II wup ;wrap upper pointer 4585 F091l ED 53 FEE8 Id (topptr),de ;set r.ew top line address 4586 F09C 2A FEE6 Id hi, (botptr) 45117 FD9F EB ex de,hl 4581l FOAO 87 ur a 45119 fOAl ED 52 suc h I ,de 4590 fOA3 CU ret nz 4591 FDA4 II 0050 Id de,80 4592 FOAl 19 ael(l t. I ,de ;advance tJuttom pointer 4593 FOAIl EB ex de , I) I 4594 FOA9 CD fE34 ca II wup ;wrap upper pointer 4595 FOAL ED 53 FEE6 Id (botptr),de 459b FDBO C9 ret 4597 4598 , , (( t I - Display Top Line_ 4599 4600 FDBI ED 58 FEE8 dtl: Id de,(topptr) ;get line above screen 4601 FD85 21 FFBO Id hI, -BO 4602 FDBIl 19 add hi, (Ie 4603 F089 CD FE41 ca II wlp ;wrap lower pointer 4604 FD8C 22 FEE8 ld (topptr),hl

m 4605 FDBF 01 0050 Id bC,80 lD 4606 lD

m Balcolles Operi.1tillu System for- the XEROX B20-II MACRO-BO 3.44 09-Dec-'BI .... Terlllinal / Scceell Manager 0 0

4G07 dIn - display line. ; ; 4600 4609 fDCL 1::5 dIn: push hI 4610 fDCJ 09 add hl,bc 4611 fDC4 26 dec hI 4612 fDC5 3E 20 Id a, 4613 fDC7 ED A9 dIn 1: cpd 4614 fDC9 20 03 jr nZ,dln2 ;if not trail ing blank 4615 fDCS EA fDC7 jp pe,dlnl 4616 fDCE El dln2: pop hI 4617 fDCf EO ret po ;if entire line blank 461B fDDO 41 Id b,c 4619 fDDI U4 inc b 4620 fCJD:! C5 dln3: push bc 4621 fDD] 7E Id a, (h I) 4622 fDD4 4f Id c,a 4623 fDD5 fE 20 cp 4624 fD07 :HI OB jr nC,dln4 4625 fDD9 E5 push hI 4626 fDOA OE If Id c,force ;force next character out 4627 fDDC CD fE96 ca II out crt 4620 fDDF 101 pop hi 4629 fDElI ·1E Id c, (h I) 4b30 fDEI d dln4: inc hi ;advance addr·ess 4631 fDE2 E5 push hI 4632 fDE3 CD fE9B ca II outcrt ;display character 4033 fDE6 E I pop hI 4634 fDE7 C 1 pop bc 4635 fDEO III EO djnz dln3 ;if not entire line 4636 fOEA C9 ret 4637 4630 , , dbl - Display bqttolll line. 4639 4640 fDE:O CD fC3D dbl: ca II pnext ;plant cursor on bottom line 4641 fDEE 16 3D 37 20 db esc, • +23, • ,eDt 4642 fDf2 U4 4643 fDF3 2A fEE6 Id hl.(botptr) 4044, fDfG E5 push hi 4645 fDf7 01 004f I (j tJc,80-1 4646 FDfA CD fDC2 ca II dIll ;display bottom line 4647 fDHl E I pop hI 4648 fDft:: CJ I 0050 Id bC,80 4649 fEOI 09 add hl,l.lc 4650 fElL! E6 ex de ,11 I 4051 fE(jJ CD fE34 ca II wup 4652 fEllb ED 53 fEE6 Id (botptr),de. 4653 fEOA [9 ret 4654 4655 .. Ibl - link bottom line.

}:> 4656

"0 4657 fE06 II I 0050 Ibl: Id bC,80 "0 4658 FEOE '2A FEE6 Id hi, (botptr) I'D 4659 fE II 67 or a ::J 4660 fEI2 ED 42 sbe hi ,bc 0.. 4661 FEI4 CD fE41 ca II wlp X 4662 fEI7 '22 fEE6 Id (botptr) ,Ill m

» B"lcolle$ Ope I-a till" System fof' the XEROX 020-11 MACRO-OO 3.44 09-0ec-Ol "0 Telminal / SCI-t.h~11 MdflGlSlel "0 CD 41>6:J fEIA [:6 ex de,hl ::l 4664 FEltl '2A fEEU Id hl,(topptr) Q.. 4665 FEIE 57 Of' a >< 4666 fElf EO 52 sue hI ,de m 4667 fE 2 I 20 DB jr nZ,lbll

4libl:l fE23 2A fEEO Id hl,(topptr) 4lib9 fE2li EO 42 sbe hI ,be 4670 fE21:1 CO fE41 ea II wlp 4671 fUB 22 fEES Id (topptr),hl 4672 fELE 21 ff5C IIJ II : Id hl,linbuf 4673 FE31 EO 60 I d i r' ;move gold mine to buffer 4674 fE33 C9 ret 4675 4676 \ , , wup - Wrap upper" painter. 4677 4671:1 fE34 E5 Wllp: pusl. hi 4679 fE3!; 21 EEOO Id hl,buftop :set end of buffer address 4680 fE30 :17 set 468 I fE3~1 EO 52 sbe hi ,de 4£>1:12 fE.3B tI pop hi 41>1:13 fE:3C DO ret fie : if not past end of buffer 4684 fE3[) II 0100 III de,TrllIbuf :start over at beggining of buffer 41>05 FE4i! l.Y ret 4686 46137 , , wlp - Wrap lower pointer. 461:113 4689 f£41 l:5 wlp: push hi 4l:iYO fE4/ D5 pU$h de 4b9 I fE4] II lJ 100 Id de, TI'mbuf :set 5 t al-t of buffer address 4b92 f(41) 87 or a 469:l 1'£47 ED 52 $be tll,de 4£>94 fE49 IJI pop de 4695 fE4A E I pop hi 4696 fE4B (10 ret ne ; if not below start of buffer 4697 fE4C '2 I EE30 Id hl,tJUftop-OO ;start over at end of buffer 4698 fE4f C9 ret 46~19

4.,OU , , gcp - get c.:ur!iu,-- position. 4701 '1702 fE50 EO 4B ffBI gep: Id be, (base) 4703 fE5·1 2A FfAC III hl,(cursor) 4704 fE57 45 Id II , I ;get eolumn to B 4705 fE5fJ CB B8 ('es. 7,b 4706 fE5A ~9 add hl,l.1 ;set $ereen row to H 4707 fE5t:l 7C III a ,11 4700 fE5C D6 60 sub cr-tbas*2 4709 fE5E 91 $ub e trow 23-(base-curh) 4710 fE5F 1:6 17 add a,23 4711 fE61 D(} 18 gcpl: $ub 24 4712 fE63 ;jlJ FC jr nC,gcpl 4713 fE65 4f III e,a ;set row 4714 fE6G :!1 If38 Id hi, ' '+24-10m. ;offset for <ese>= 4715 fE69 09 allli hi ,be 4716 fE6A 22 fE73 Id (repa),hl

m 4717 FE6D C9 I-e t ~

0 4718 ~

m Bdlc{)IH;!~ Ope,"ct t i IIU System fo," t I,e XEROX 820-11 MACRO-80 3.44 09-0ec-81

a TeFII,illd I / SCI eell (via 11 a. ~ e r

IV 4719 - Restore pos"ition. , . ,'cp cursor 4720 4721 FE6E CO FUD rep: ca II pnext 4722 FE71 lB 3D dll esc, -4723 FE73 21l 20 ,"cpa: dtJ 4724 FE75 04 db eot 4725 FE76 C9 ret 4726 4727 i; sio drivers. 4728 4729 FE77 (j 1 FE78 sioins: Id bc,ports ;set status port to c 4730 FEUl ports equ $-2 4731 FE7A to 7B in a, (c) 4732 FE7C CB 47 bit O,a ;test' rca 4733 FE7E C9 ret 4734 4735 FE7F CD FE77 sioinp: ca II sioins ;get status 4736 FEB2 28 FB jr z,sioinp ;if not ready 4737 FE84 4U Id c,b ;set data port address 4738 FEB~l ED 78 in a, (c 1 4739 FEB7 CB BF res 7,a ;pitch parity bi t 4740 FE09 C9 ret 4741 4742 FE8A CO FE77 siordt: ca II sioins ;get sio status 4743 FEBD CB 57 bit 2,a ;test TX empty 4744 FEOF C9 ret 4745 4746 FE90 DO sioot: ex af,af' isave char to send 4747 FE91 CD FE8A siootl: ca I I siordt ;test t ransmi t ready status 4748 FE94 28 FB j " z,sioot1 ;if not ready 4749 FE9l:i 48 Id c,b 4750 FE97 no ex af,af' 4751 FE9U ED 79 out (c) ,a 4752 FE9A C9 ret 4753 4754 FE9U CO FEA7 outer"t: ca II :;iopl ;po II for" input before & after 4755 FE9E CD F2FE ca I I fastcrt 4756 FEAI F5 pus\) af ;save balcones gold 4757 FEA2 CD FEA7 ca II siopl 4758 FEA5 F I pop af 4759 FEA6 C9 ret 4760 4761 , , Siopl - Sio Po II Input Cl1aracters. 4762 4763 FEA7 C5 S i op I : pUSl1 be 4764 FEAU CD FE77 ca II sioins ;input Sio status 4765 FEAB 28 19 jr z,siopl3 ; if input not ready 4766 FEAD 48 Id c,b ;set data port address 4767 FEAE ED 78 in a, (c)

}> 476fl FEBD CB BF res 7,a ;pitch parity bit -0 4769 FEB2 E5 push I hi -0 4770 FEB3 2A FEEA Id hl,(ipoint) ;set in pointer /1) 4771 FEBfi 77 Id (h1),a ;store character in fifo ::J 4772 fEB7 2C inc I 0... 4773 fEDU 2D 02 jr nZ,siopll X 4774 fEBA 2E 00 Id I, low siobuf m

» aolcont!s Ope,'a I ill!) '>yst;;111 f 0,' tile XEROX 8:10-11 MACRO-80 3.44 09-Dec-81 "0 lenni Old I I Scr t:H::I, ',Ionoue f' "0 I'D 4775 fEBt: JA fEEC s i op II: Id a, (opo i nt) ::J 4776 f EEIf- 95 sub I a..

4777 fECD L8 03 jr z,siopl2 ;if buffer full >< 4778 fEe:l 22 fEEA Id (ipointl,hl m 4779 fEC5 E I siopl2: pop hi

4780 fECb C I siopl3: pop bc 4781 fEC7 C9 ret 4782 4783 , , Sioist - Sio Input Status. 4704 4785 fEC8 CD fEA7 Sioist: ca II Siopl ; po II for input 4786 fECB 2A FEEC Id hi, (opoint 1 ;set out pointer 4787 fECE 3A fEEA Id a,(ipoint) 4780 FEDI 95 sub I 4789 fED2 C8 ret Z ;if data not ready 4790 F E[l:l fb fF or - 1 4791 fED5 C9 ret 4792 4793 , , Sioin - Sio Input Character. 4794 , 4795 FEDb CD fEC8 Sioinc: ca II Sioist ;set input ready status 4796 FED9 28 FB jr z,Sioinc 4797 fEDB 7E Id a,(hl) 4798 FEDC 2C inc I ;advance out 4799 FEDD 20 02 jr nZ,Sioil 4000 FEDF 2E 00 Id I, low siobuf 4801 FEEl 22 fEEC Sioi I: Id (opointl,hl 4802 fEE4 (:9 ret 4003 '1004 fEE5 OU status: db 0 4005 4006 fEEG I) 100 llotptr: dw Trmbuf 4007 fEEO UIOO topptr: dw Trmbuf 4000 4809 fEEA EFOO ipoint: dw slobuf 4810 FEEC EfOO opol"t: dw siobuf 4011 else 4812 term equ what 4813 endlf 4814 4815 1 f opt i OilS and 0.1,;; I p 4016 4017 , , Help Key COlllmand. 4018 4819 overlay help 4820 070B' + c8.seg 4021 4822 FC5~) CD fC3D ca II pnext 4023 fC5B 42 61 75 64 LIe t II 'Baud <rate> [BIAl',cr,If 4824 FC5C 09 09 3C 72 4825 fC6(J (l I 74 65 3E 4826 FC64 2'0 5B 42 2f 4827 fC6U 4'1 5D OD OA 4828 fC(lC 44 75 6D 70 d;;tb 'Dump (start] [;;nd] , ,cr,lf m 4829 FC7D (J9 09 58 73

~

0 4830 FC74 74 61 72 74 W

m .... a ~

» -0 -C (I) :::I a. X m

aalcunes Te,'minal

4831 4032 4tl33 4034 4035 4836 4837 4038 4839 4040 4841 4842 4843 4844 4845 4046 4841 4048 4049 4850 4051 4052 4853 4854 4055 4056

Ope'iit in,) System / Sc, een Manage/-

fC70 Sf) 20 5B fC7t: liE 64 50 fCO(} lJA FCOI 47 6f 74 fC85 D9 09 3C fC89 64 64 72 fC80 00 OA fCOf tiD 6f 64 fC93 66 79 09 fC97 3C 61 64 fC9B 72 3E 00 FC9f 50 72 6f fCA3 6F 63 6f FCA7 09 3C 78 FCAB 6E 3E 20 fCAF (iD 73 6B fCB3 76 61 6C fCB7 00 OA fCB9 04 fCBA C9

to ,- ti,e XEROX 020-11 MACRO-80 3.44 09-0ec-81

65 00

6f defb 'Goto <addr>' ,cr,lf 61 3E

69 defb 'Modify <addr> ' ,c r, If 09 64 OA 74 defb 'Protocol <xon> (msk valj',cr,lf 6C 6f 5B 2D 50

defb eot ret else

help equ "hat endif

subttl Segment Size Information page

m -' a 1TI

Bdlcufles OpefaliliU ,>ystefjl for- tile XEROX 820-11 ~egment Size i.ltO.1I1dtion

4857 4858 4859 4860 4861 4862 4803 4864 4865 4806 4867 4868 4809 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 '1802 4803 48B4 4805 4006 4887 4800 4889 4890 4tH) I 4092

0771 . 0299

OOOO! 041B

U518! FC55 UC55

Ill: 1

OC55"

0771 •

+

+

+

· .

tpamax

· . rbase

· . r-estop reslen

romtop

MACRO-8U 3.44 09-Dec-Bl

Top of Overlay Area.

overlay stop c&seg equ tpal ;set length of transient move

Top of Resident Monitor.

below defs comres equ $

Top of Non Resident Monitor.

$ ; n~sident top

allove d&seg equ equ $-mon it r- ;Iength of resident monitor

update ;clear active segment

Top of Burned Rom Set.

equ bloc+dloc+tloc-monitr

Fil lOut Unused Rom Space.

cseg

if defs endif

(rom+romsiz-romtop) gt 0 (roU\-t-roms i z -romt,op) .-1

subttl Resident Monitor- System Ram page

m -> a 0'1

}> U U I'D :l a.. >< m

tialcolles OperatilJU ~ystem fOJ- tile XEROX 820-11 Resident ManitoI' ~ystem Ram

MACRO-80 3.44 09-0ec-81

4893 4894 4895 . 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 49~0

49~1

49~2

4923 4924 4925 4926 4921 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947

FFOU FFOO FFIO FFI8 FFIC

FF20 FF30 FF31 FF32

FF33

FF34

Ff3C Ff3E

ff40 ·FF50

ff5U fF52 fF54 fl'55

FF56 fF51 ff50 fF59 ff5A FF5B

ff5C fFAC

.pllase ram

;; Start of Documented Storage Locations .

veutab: siovec: ctcvec: sysvec: genvec:

fifo: flfcnt: fifin: fifout:

.. expvec:

i i

; interrupt vector table defs 16 ;space for 8 vectors for -defs a ;space for 4 vectors for defs 4 ;space for 2 vectors for defs 4 ;space for 2 vectors for

keyboard data input fifo variables

defs 16 defs I defs I defs I

defs

More interrupt vectors

;console input flto ;fifo data counter ;fifi Input pointer ;fifo output pointer

;round address

starts here sio ctc system pia general pia

defs 8 ;space for 4 vectors for expansion slot

Available memory pointers.

availb: defs availt: defs

2 2

;bottom of available memory ;top of available memory

End of documented storage locations.

defs 16 ; local stack for interrupts intstk:

;; clock-timer interrupt variables

Milsec: tikcnt: steprt: t i mou t :

defs defs defs defs

2 2

;One Millisecond timer. Enable int on ; 16 bit seconds counter (18 hr. 12 min. ;WD 1797 step rate ;time-out. decrements once per second

Getime entry returns tile address of DAY

day: defs ;calendar day (01-3\) montl1: defs month (01-12) year: defs year-1970 (1970-2225) hrs: defs ;clock hours (00-23) mins: defs minutes (00-59) secs: defs seconds (00-59)

crt output driver variables

linbuf: defs cursor: cJefs

ao 2

;llne buffer & Bcc gold mine ;cursor pointer

ctcl 16 sec)

» Bdleulles Open,lillU System fur tile XEROX 820-11 MACRO-80 3.44 "'0 Resident Monitl"" System Ram

09-Dec-81

"'0 /1)

:J 0.. X· m

m -" o -..J

4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4905 4986 4987

ffAE CSrCIH" : ffAf dircur: fFBI base: FfB2 leadin: ffB3 attl"ib: FFB4 chrsav:

. ; ffB5 paraml: FFB7 pacam2: FfB9 param3: FFBB param4: FFBD last:

i;

ffBf contbl:

FfCB spal"e 1: ffCC spare2:

ffCD spare:

ffDO spar"nd:

fFDO ffEO crtstk:

FFEO rstsp: fFE2 cst 111 : ffE4 rstpc:

FfEb 0000 stack:

defs 1 ,cllarae t e r used for a cursor defs 2 icursor pointer for direct crt display defs ;current contents of scrol t· register defs ,state of lead-in sequence handler defs ;attribute enable defs ,character under cusror

console monitor program variables

defs 2 ;storage for numbers read defs 2 from line input buffer defs 2 ; by 'PARAMS' subroutine defs 2 , for command processors defs 2 ; last address used by 'MEMDMP'

Configurable parameter address table

defs 2*numcon

defs ,spare configuration byte clefs ;another spare byte

clefs (ram+l00h-48)-$ ;spare ram space

,end of spare ram

dets 16 ;crt stack

defs 2 ;sp register on reset defs 2 ;hl register on reset defs 2 ,possible pc from top of stack

defs 26 ,monitor stack

. depl1ase

subttl Console Messages page

m -" a 00

Bdlcones 0f-Jer·dtiI10 Console Messaues

4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5000 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025

System for tile XEROX B20-11 MACRO-BO 3.44 09-Dec-81

Console Message Macros.:

message macro ifl .radix printx .radix endif endm

text,hl,I12

16 <text>,%(hl),%(h2-1),%«h2)-(hl» 10

printx macro text,hl,I12,h3 .printx + text hI - h2 endm

h3 +

If romtop ge (rom+romsiz) message <* The ROM set is Too big *>,rom+romsiz,romtop endif

if cloc+tpal gt ram message <* The TPA set is Too big *>,ram,cloc+tpal endif

message <Non-resident executes >,rom,bloc message <Rom is burned up from >,rom,romtop message <Unused Rom Space from >,romtop,rom+romsiz-l message <Resident Monitor neec,ls>,monltr,rqtop message <Space Wasted to Driver>,Wasted,Seltab message <Physical Disk Drivers >,Seltab,Dvrlmt message <Driver Offset for lSID>,200h+bloc+Seltab-Monitr,O message <1/0 Byte Drivers from >,iobloc,iobloc+iobdvs message <Command Processor Area>,rqtop,restop message <Transient Overlay ROM >,start,stop message <Transient Command Area>,cloc,cloc+tpal message <Spare Locations in Ram>,spare,sparnd

subttl end

The"'Emj entry

" Balcones Oper'at ill" :-'ystem tor tile XEROX 1l20-II MACRO-80 3.44 09-0ec-lll N frle" Elld

ffBf CONTBl 0230 CONTRl f723 CPB f7JI CPBI f736 CPB2 f759 CPB3 0000 CR fC36 CRLf 0030 CRTBAS 0182 CRTOI 0196 CRT02 0199 CRT03 0lB2 CRT04 0169 CRTDVR f2A3 CRTLOIR 3COO CRTMAX 3000 CRTMEM f2E7 CRTMV f2E9 CRTMVO f296 CRTOfl f293 CRTOff . f29C CRTON f299 CRTONI f2fl CRTOUT ffEO CRTSTK 003C CRTTOP 0000 CSPACE ffAE CSRCHR 0018 CTC 0018 CTCO 0019 CTCI OOIA CTC2 0016 CTC3 fflO CTCVEC 0036 CTLSIZ 0254 CTLTAB ffAC CURSOR f607 CWP ff56 DAY f039 DAYTI f086 DAYTIM fOEB DBl f6F5 DCTRl 0000 DEBUG 02C5 DEFCUR F6EA DEFlPY F6EB DEFlUN 0017 DELLIN FC80 DIRBUF FFAF DIRCUR 0lF3 DISI 0lF2 DISATR FDC2 DlN FDC7 DLNI FDCE DLN2 FDD2 OLN3 FDEI DLN4 FC55 DlOC FC23 DMPFMT 02E7 ONCSR fD72 DOC F490 OPB5D F470 DPB5S F450 OPBIlO f430 DPB8S F390 DPBASE (jOllA DPBOFS F470 DPBRG4 F480 DPBRG5 F490 ()PBRG6 f4AO OPBRG7 F1Fl DPM f31l0 ORvTAB FC76 ()SKO FC7B DSKI FCAO ()SK3 1367 OSKCMD F4BO OSKOVR FCAC ()SKERR 03Ef DSM4 01EF DSM5 DOEF DSM6 OOEF DSM7 0000 DSPACE fbJ2 DSW FDBI DTL F6D5 DTYPE fBllf DUMP FB98 DUMP2 FBB4 DUMP3 f8DI DUMP4 fA08 OVRLMT f005 EAT KEY fC27 ECHO fb9B ECR FOA2 EIRET OIEf ENATR OOOO! ENTRY 0004 EOT OOC4 . ERR OOBC ERRI OOCI ERR2 oncc ERR3 0004 ERRMI 0000 ERRM2 OOU9 ERr~ML 001B ESC 029B ESCADR 02BO ESCAPE 028A ESCTAB 0011 ESCTBL ff:34 EXPVEC 0000 fALSE 0000 FALUN F2fE FASTCR! 0001 fBLUN 0000 FCLUN (J002 FOLUN ff30 FIFCNT fF31 FIFIN Ff2U fIFO Ff32 flFOUT 1428 FILL fC59 FILLI f6f6 FIRST f708 FIRSTI F721 FIflST2 F4BO FLOPI f40E FLOP2 F4F2 FlOP3 f4FC fLOP4 f506 FLOP5 F6EF FLPfRM 0005 FM.OO 0007 FM.OODS OOAO FM.DOSS 0004 FM.OS 0006 FM.FV 0000 FM.HARO 0001 fM.SDOS 0000 FM.SDSS 0002 FM.SZ 0007 fM.lJN 0003 FM.WR 0001 fMDD 0006 FMDOSS 0000 FMDS

}> OOIF FORCE 0204 fORSPC F61A GCA U F626 GCAO F634 GCAI F63F GCA2 U F6L7 GCAA FE50 GCP FE61 GC!';I t1) FF IC GENVEC fBOA GETHEX FB2C GETHlP :::::J FB37 GETLlN F097 GETSEL fB38 GLINI a.. FB50 GLIN4 FBOf GNlJMI fBE4 GNlJM3 X F319 GOLD 120B GOTO 0009 GPIOCA

"

):> Ba I COli"''' Op e,.· ali II ,j 'Jysttllll fo,- t I\e XEROX 02U-Il MACRO-OO 3.44 o9-Dec-Ol U TIl,,*End U ('[) DO DB GPIOeB oono GPIODA OOOA GPIODB :J 177B HELP ODIE HELPKEY FBF3 HEXBIN a. fA3C HOME D2C9 HOMEUP DOlE HOMSCR )< FF59 t-lRS F649 ICC F643 ICCS -n F64D ICCSI F066 IDLE FC5A I N I

FC61 IN2 FC77 IN3 FC79 IN4 13CA INCMD FI37 INDEX 0016 INSLIN 00E6 HHAB ff50 INTSTK 112B IOBDVR DOIlD IOBDVS F770 IOBLOC 0003 IOBYTE F7AF IOCONI F796 IOCONO F7A3 IOCONS F7BB IDLI ST F7CC IOLSTS FEEA IPOINT F643 I SC FAD6 JPIX 001F KBOCTL ODIE KBDDAT FOD8 KBDIN F005 KBDINI FOCD KBDST FOE2 KBMASK 0002 KONLIN FI62 KEYI Fl67 KEY2 F 17F KEY3 FI04 KEY4 FIOF KEY5 FI40 KEYSRV 0081 KUPLIN FFBD LAST F5FO LASTFM FEOB LBL fE2E LBLI FOO5 LCP FOlD LCPI FD30 LCP2 FD52 LCP3 FD49 LCPA FD4B LCPB F2B3 LOIRI F2B5 LDIR2 f2C4 LOIR3 0410 LDIRX FF62 LEADIN OOOA LF 02F7 LFEED FF5C LI N6UF 0300 LINDI 039E L1ND2 039F L1N03 037C L1NDEL 0367 LINll O3CO L1NI2 03CO LINI3 03A4 LININS OOOA LOCALF 0036 LOWLITE F333 LSTATT FD09 LTL F6FI LUN DODO LXI904 021C M3TST 0226 M4TST 0232 M5TST FOE3 MASK F622 MDATA FC56 MOMPI FC5E MDMP2 FC63 MDMP3 FC69 MOMP3A Fe71 MDMP3B 12F2 MEMDMP F236 MILO F246 MILOI F250 MIL02 F250 MILLI F265 MILL2 F270 MILL3 F27C MILL4 F27E MILL5 F201 MILL6 FIFO MILLI FF50 MILSEC FF5A MINS F5AF MLU OIOF MODE o IE I MODEl FOOD MONITR FF57 MONTH 00E5 MOVLN F5C2 MPA f5D7 MPAI F5DA MPA2 F5E6 MPA21 F5E9 MPA22 F606 MPA3 F610 MPA4 F613 MPA5 F559 MTRADR 0164 MUL TI F6F4 N6LK 0066 NMI 02CO NONO 0040 NT4 OUZO tH5 !J010 NT6 (J010 NT7 0028 NTRK5 0040 NTRKO FI3F NUll Nl 0006 NUMCON F502 NUMUNT 4000 O.AUTO 0400 O.BAUD 0000 O.ODVR 0020 O.DISK 0010 O.ESCT 0004 O. FILL 2000 O.t-IELP 0200 O. I NPC 0002 O.MOVE 0100 O.OUTe 1000 O. PR·OT 0040 O.RAMT 0000 O.RESV 0001 O.TERM 0000 O.TYPE 0080 O.VERF F6FO OPCODE FEEC OPOINT 6FFF OPTIONS 13F I OUTCMD FE9B OUT CRT F2UO OUT CUR FC20 OUTPUT 0007 P.ACKN DOOO P.AUTO 0006 P.ONLN 0005 P.RDYI nOO4 P.RDYO 0002 P.STRB F59F P2L FB5D PARAO F66C PARAI FB71 PARA2

-n F676 PARA4 FF65 PARAMI ff67 PARAM2 W

"1l 6alcolles Oper-a t j "e! ':)ystem for tile XEfWX 82D-II MACRO-80 3.44 09-Dec-UI ~ 111l:"Elld

ff69 PARAMJ ff66 PARAM4 fB5f PARAMS OUOf PASSU fADE PliVCMD fA15 PHVDMA fAIO PtiVORV fAI:i PHVSEC fAil PHVTRK fAOf PliVUNT F7fO PIOI 0010 PIOAD DO I I PIOAS 0012 PIOBO 00'13 PIOBS F70C PIOOUT f7f4 PIOSTO FeBI PKI FCC9 PK 1 I FCDf PK12 FCf3 PKI3 FCf6 PKI4 fCFE PI05 F006 PKI6 FDOE PIU 7 FDI4 PKIB fDIB PKI9 FC3D PNEXT fE7B PORTS fD40 PRC fAAC PRMTI FA62 PROMPT fC6B PROTI fCof PROT2 1459 PROTO DODO PRS OU02 PRSI 003B PRS2 0061 PRS3 0070 PRS4 OOAC PRS5 f339 PRVATT FCIB PUT2HS fC03 PUT2HX fB29 PUT2J fCI6 PUT4HS FCOC PUTNIB FfOO RAM 041B RBASE FE6E RCP FE73 RCPA F647 ROC F605 ROlD F61B ROlDI F6DC RDONLV F4E7 RDOP fA4A ROWR f4fE RDWRA F4F6 RDWRS fA48 READ f641 RECAL F6E9 RECLUN fl30 REMOVE FoAO RESET OC55 RESLEN F07C RESTART fC55 RESTOP fIEf RETINS 02F2 RETURN fOAl RETVI F09A RETVAL f5f6 RETlR lJI91 REV FIE9 RFI EEOO RGDBUF 0003 RGLUN F6E8 RGRECAl f708 RIGOPB UOB2 RMTALF OOBI RMTTOG DODO ROM 1800 ROMSIl 17EI ROMTOP FA08 ROTOP F5F8 RSE F603 RSEI f332 RSTATT ffE2 RSHll FFE4 RSTPC FfEO RSTSP 0001 RTK4 0041 RTK5 0061 RTK6 0071 RHO 1800 RXI984 0005 S.AUTOl 00U4 S.AUTOR 0007 S.LECHO 0006 S.RECHO F4BO SAI403 F4CO SASO F4B2 SASOA f4f3 SASI F4F6 SAS2 001·2 SASIC 0010 \SA SID 0300 SASlDL 0012 SASIS f470 SASSTR FIEC SAVSTK 0014 SCROLL 009E SCRPln 0lC3 SEARCH f4E6 SEClEN ff5B SECS FA3E SEEK f50E SEEKO f5EB SEEKI F5EO SEEK2 F5EF SEEK3 f5A3 SEEKX 0518! SEGA f5B9 SEKO F5C4 SEKI FA39 SELl F578 SELIW F585 SEL2 f591 SEL3 f598 SELDEN f596 SELONS F510 SELEE FAI7 SELECT f50B SELERI f42A SELERR f360 SELTAB FA5A SELTBL F544 SElUNT 0104 SETBL! fD2C SETBRK 021F SETCOL FOA4 SET CON F284 SET CUR 0100 SETGRA 0109 SETINV OICf SETlOW 0lF7 SETMSK F337 SETPRV

» 0210 SETROvl 0205 SETXY 0209 SETXYI

-0 fC73 SIGNI FC81 SIGN2 FC88 SIGN3 -0 FC9E SIGN3A FCA6 SIGN4 fC55 SIGNON ID f6CE SIM EFOO SIOBUF 0006 SIOCPA :J U007 SIOCPB 0004 SIODPA 0005 SIODPB a.. fEU SIDI I FOFO SIOIN FOEO SIOINI >< FED6 SIOINC FE7F SIOINP FE77 SIOINS "1l

» Ba 1 cones Ope"a t i IIU Systelll for tile XEROX 820-11 MACRO-80 3.44 09-0ec-OI U Tlw"End n I CD FECU SIDI ST FlOC SIOMSI\ FE90 SIOOT ::J a.. FE91 S lOOT I FOFO SIOOUT FEA7 SIOPL

>< fEBC SIOPLI FEC5 SIOPL2 FEC6 SIOPL3 F 113 S IORD I FI29 SlORD2 FI2C SIORD3

"T1 FEOA SIORDT Fl05 SIORDY FOE5 S10ST flOE SIOVAL FFOO SIOVEC FOF9 SIOXI [1031 SLDDEN FAOe SLERR 0030 SLSOEN F65A SMF F660 SMFO F675 SMFOA F693 SMFI F6A3 SMFIA F6BC SMFIB F6BE SMF2 F604 SMF4 F601 SMFA F50E SMFS F530 SMFSI f548 SMFSIA F550 SMFS2 F559 SMFS3 "f573 SMFS4 F!:;30 SMFSA 0301 SMP F04C SNOLOC F05f SNORMT FOO2 SOFT F069 SOFTV F602 SOM F604 SOMI FC IE SPACE F20E SPACT F220 SPAOOR FfCO SPARE FFCB SPAREI FFCC SPARE2 fFOO SPARNO F224 SPCNT F500 SSELEC FOBf SSP 0000 STACI\ 1070 START FEE5 STATUS F610 STC F644 STEPR FF54 STEPRT 17E 1 STOP F66E STPADR 02Cl STUFF FCEE SWAP fCFB SWAPI 0069 SYNC 0010 SYSCTL 001C SYSPIO FF18 SYSVEC 031F TAB F65F TOI F656 TOO 14E2 TERM FC5E TERMI FC68 TERM2 FCA3 TERM3 13FB TEST FC5E TEST! FU::i I TEST2 FC60 TEST3 Ff52 TlKCNT F192 TIMER FIBI TIMER I F1B9 TIMER2 FIE8 TIMER3 0006 TIMOLJ ff55 TlMOLJT 0771 TLOC J FEE8 TOPPTR 0299 TPAL 0299 TPAMAX F6Ff TRKTBL 0100 TRMBUf EFOO TRMSTK f6EO TRN5 F410 TRN6 FFFF· TRUE f639 TTC F63A TTCA fC5E TYPO fC90 TYPI FCA4 TYP2 1477 TYPE OOfF TYPTOG 020C UPCSR F040 USRSEC f31B USRSTK FFOO VECTAB 1443 VERCMO fC5E VERFI fC66 VERf2 1315 VI EVJ fC55 VIEWO FC6f VIEWI FC09 VIEW2 fCOA VIEW3 fCBE VIEW4 FC90 VIEW5 F003 WARM F35F WASTED F669 WCC 0010 WDI797 0010 WDCR 0031 WODD 0013 WDDT 0030 WOSO ODIC WDSL 0012 WDSN 0010 WDSR 0011 WDTR F6B7 WFR F69A WFRI f696 WfRA FAC9 WtiAT FE41 WLP f64B WOC f64D \'IOC I f650 WOC2 fA44 WRITE fE34 WLJP OOOO! XCKS 0008! XCKSI 0013 XOFF F12D XOFfLG 00 II XON F 115 XONENB F344 XQDVR FA51 XQPliYS F50B XSELERR FF5B YEAR EE7D Z.BAUA EE7E Z.BAUB EE7F Z.IOBT EE62 Z.KEYM EE5F Z.SCRA EE63 Z.SIOA EE6D Z.SIOB EE77 Z.SIOM EE79 Z. SIOV EE60 Z.STPR EE7B Z.XONP

"T1 U1

No Fatal e,'"o,"(" J

! "T1 (J)

» "U "U ([) J a.. X II

.A

.6

.C

.0

.E · F .G .H · I · J .K .L .M .N .0 .P ABORT ABOvE ADDRH ADDRL ALLOO ALLOI ALL02 ALLU3 ALL04 ALL05 ALL06 ALL07 ASVNC ATlRIB AUTOBl AVAILB AVAILT B.US,V B.CD B.IO B.MSG B.PAR B.REQ B.RST B.SEL BAKSPC BASE BAUD BAUDI BAUD;!

2433# ~4S0#

2470 :>470 1756# 1757# 1758# 1759# 1761# 1762# 1763# 1764# 1766# 1767# 1768# 1769# 1771# 1772# 1773# 1774#

96# U15 177# 562

2852 :J035# 3036# 1803# lU20 1804# IU25 1805# 1830 1806# 18:35 1807# 1840 1808# 1845 1003# lU50 1010# 1055

73# 526 1179 1266 3251#

446 4\:)19# 4920# 2514# 2516# 2943 2518# 2515# 29:<2 2520# 2940 2517# 2930 2521# 2978 2519# 2U71 1345 1445# 1132 14,)6 3303 4(}47d 4053 41155# 4057 4059#

2450 2450 2450# 2450 2460# 2460 2460 2460# 2460 2470# 2470# 2470 24UO# 2480 2480 2480# 2480

681 1701 1737 7415 3126 3142 3237 4872

4952#

1500 1564 1 b'f 1 1592 1623 4702 4950#

» SAUDA 4tl" ~i ~:l 3941 4056 "'0 BAUDB 54" ~)07 3943 4058 4335 "'0 BBASE ~43 :!6311 266 /1) BBG 1503 15B8 1616 169211 :J 0... BELL 1344 15:!~LIjt

BELLI 153001' 1537 X BELLOf 6611 15:13 -n BELLON 6711 1530

BELOW 17111 269 1162 4866 BLOC 22711 271 56311 1164 170211 3572 3663 3787 3958 3977 4003 4047

4073 4135 4170 4190 4233 4254 4273 4299 4327 4387 4820 4861 4868 487311 4881

BLllCAO 355411 4~59 4278 BLOCK 3304 425411 IBLOFC 10211 15:34 BLONC 10111 1531 BL TIM 10011 15.29 BNORY 174211 1743 1744 1744 BOOT 3302 3313 378711 BOOTI 379001' 3"195 BOOT2 3793 3801# BOOT3 3B25 383411 BOOTBF 31)01' 132 3150 3834 383B 3902 3907 :3910 BOOTO 3803 :Jfl6311 BOOTER 3B08 3861# BOOTLD 3411 3837 3B53 BOOTS 3823 385511 3899 BOTPTR 45B6 4595 4643 4652 4658 4662 4806# BRKFLG 445711 4511 4513 BRKKEY 440~II 4509 B::'EG 19111 239 270 l163 4867 BSPACE 23111 270 270 270# 563 563 56311 682 682 1163 1163 1163#

1702 1702 170211 1738 1738 2416 2416 3127 3127 3143 3143 3238 3238 3572 3572 3663 3663 3787 3787 3958 3958 3977 3977 4003 4003 4(J47 4047 4073 4073 4135 4135 4170 4170 4190 4190 4233 4233 4254 4254 4273 4273 4299 4299 4327 4327 4387 4387 4820 4820 4861 4861 4867 4867 4867# 4873 4873 4873# 4878 4878

BUFTOP 441011 4679 4697 C.BIN 2008# 2147 21B7 2327 C.FIvE BOq 3593 3596 C.FLAW 2547# C.fLPY 2556# 3028 C.FMAT 254411 ~887

C.FTRK 254611 C.INIT 255211 C.KEYM 7B1I C.REAO 254B# L()1l5 2747 3015 C.RECAL 254111 :!8b2 3025 C.ROSN 254311

-n 00

» "'0 "'0 (I)

:J 0-X -n

C.RSVN C.SASI C.SEEK C.TRAM C. TRDV C.TWO C.VTRK C.WRIT C.Wf<Pf< CCA CCAI CCA2 CCS CCSI COD CDDO COOl CDD2 Cf I N IT CfT efTA UIECK CHKOO CriKO I U1K02 CHK03 CIIK04 CHK05 CtlK()6 CHK07 CHf<DEL CHRINI Ctif<IN2 CHRINS CI-IHOM I CHIWM2 CHRSAV CLoe

CLRI CLRBRK CLRCHf< CLREOL CLREOS

2542u 79u .j[)U 1

2551u 2573u 2540u 200911 2545u 2550u 2blJ:3 254911 957 1131u

1134u 1646 113511 1136 328 J59 371U 378

2691 2740# 2743 2745# 2750u 2753 2751 '1.754#

437# 443 2876 2935 2959# 2960 3330u 4035 1794# 1820 1795u IfJ25 179611 1830 1797u 1835 1798# 1040 1799# 1845 1800u 1850 1801u 1855 1398 1672# 1661# 1665 1600 1006# 1400 1652#

70# U49 7IU 1242

1168 1194 366 3268

3707 3707 3978 4003 4074 4135 4191 4233 4274 4299 4308 4U20 1554u 1 ~)56 4459 4512# 4392# 1361 1 ;j~17 1354 1396

2633

1298 1615

1643 370#

2957# 3054 4214 4282

1246 4953# 3570# 3572 3572 3573 3663 3663 3663 3663 3664 3778 3787 3788· 3958 3958 3958 3958 3959 3977 3977 3977 4003 4003 4004 4047 4047 4047 4048 4073 4073 4073 4135 4135 4136 4170 4170 4170 4171 4190 4190 4190 4233 4233 4234 4254 4254 4254 4255 4273 4273 4273 4299 4299 4300 4327 4327 4327 4328 4387 4387 4387 4820 4820 482() 4821 4861 4061 4861 4862 4867 5007

1540# 1569 1569#

» CUll I N 1504 I t:i4:!., 1580 lbD7 "0 CLRS 9011 :ib 1 H 4337 4427 "0 CLRSI 1571., 1581 t1) CLRS2 1578 1582., :J 0- CLRSCN 1363 1410 156211

CMDSll 3328., >< CMDTAB 364 j260 330111 332B

" CNFDPB 3057 3062 3075 311611 COLD 56411 COMINP 595 367711 3679 3725 COMINS 594 ::11)70# 3717 COMOTS 597 3f-l85 3693# 3744 COMOUT 596 36B5., 3686 3708 3734 COMRES 234., 240 267# 270 563# 1163 170211 4867 4873# COMROM 240., 27011 1163# 4867# CONFG 623# 3580 CONFIG 584 620., CONIN 56711 3437 3440 3525 3656 4013 4·147 4366 4460 CONIOB 370\.1' 3707 3716 3724 CONOUT 568., . 3430 3433 3511 3528 3548 4014 4360 4363 4368 4373 CONST 566., 3435 3654 4364 444B CONT6L 436 655 4965# CONTRL 1191 1325., CPB 3060 3074# CPBl 3077 30B \.I' CPB2 3083., 3093

tPB3 3102# 3113

'R 8611 995 3244 3252 3353 3361 3386 3388 3438 3441 3537 3629 3635 :3643 3650 3792 3794 3796 4007 4026 4028 4150 4354 4361 4369 4443 4538 4544 4550 4556 4827 4832 4836 4841 4847

CRLF 3282 :3341 3443 3536# 4090 4142 CRTBAS 40., 11 :37 1465 1477 4708 CRTOI 1179., I:j 15 CRTD2 1173 1176 I 191., CRTD3 1186 1190 1192# CRTD4 1203 1206., CRTDVR 1117 I 16711 CRTLDIR 581 104111 3852 4089 CRTMAX 39., 41 308 CRTMEM 3811 39 40 305 307 308 385 426 428 1562 CRTMV 1045 lU77., CRTMVO 1071 1073 1078# CRTOFI 1020., CRTOFF 832 1018# 1078 1119 3278 3576 CRTOtI 940 1010 1027# 1044 1115 3275 CRTONI 1022., I U:Jll CRT OUT 568 1091., CRTSTK 1042 1 i 10 4975# CRTTOP 41., 1467 1475

-n C~PACE 232# ::7U 563 563 602 682 1163 1 163 1702 1702 1738 -4 1738 2416 2416 3127 3127 3143 3143 3238 3238 3572 3572 3572# 0 3663 J(j63 3663# 3663# 3787 3787 3787# 3787# 3958 3958 3958# 3958#

3977 ]977 3977# 3977# 4003 4003 4003# 4003# 4047 4047 4047# 4047# 4073 4073 4073# 4073# 4135 4135 4135# 4135# 4170 4170 4170# 4170# 4190 4190 4190# 4190# 4233 4233 4233# 4233# 4254 4254 4254# 4254# 427:3 'I:! l:j 4273# 4273# 4299 4299 4299# 4299# 4327 4327 4327# 4327# 4387 4]117 4387# 4387# 4820 4820 4820# 4820# 4861 4861 4861# 4861# 4067 4867 4867# 4873 4873 4878 4878

CSRniR 1195 IJ 17 1320 4948# CTC 57# CTCU 58# 4/6 CTCl 59# 480' 675 991 CTC2 60# 404· CTC3 61# 488 CTCVEC 409 478 4900# CTLSIZ 1370# CTLTAB 1330 I :j42# 1370 CURSOR 425 1167 1192 4703 4947# CWP 2617 3UU4# DAY 615 49:37# OAYTI 583# 2089 3052 DAYTIM 583 615" DBL ·4477 4640# DCTRL 2683 2735 3038# DEBUG 25# 29 30 123 128 DEFCUR 1342 1434# DEFLPY 2837 :J028# OEfLLJN 2785 2828 3029" OHLIN 439t.v DIRBUF 1793# 1819 1824 1829 1834 1839 1844 1849 1854 DIReUR 1005 1011 1014 4949# 0151 1266# Dl5ATR 1265# 1412 DLN 4609# 4646 DU~1 4613# 4615 DLN2 4614 4616# Dun 4620# 46:35 OLN4 4624 46:JO# DLOC 220# 564 682# 683 1163# 1703 1738# 1739 241611 2417 3123# 3123

3124 ::11:,'1" 3128 3143# 3144 3238# 3239 3572# 4874 4878# 4881 DMPFMT 3417 3419 3421 3515# DNCSR 1472# 1495 1579 DOC 4533 45:j 7 4543 4561# [)PB5D 1943# DPB55 1923# :; blU DPB!W 1901# DPB8S 1882# ~JIHI 2727 Df'BA S E 1.817# 21UO 2677 3099

);> "0 "0 11> :l 0.. >< -n

l> DPtlOFS 2011# ::109 'U DP8RG4 1839 2450# 3095 3100 'U DP8RG5 1844 2460# I'D DPBRG6 1849 2470# :J Q. DPBRG7 1854 241lll#

>< DPM 874 ~)O5#

DRVTAB 1720 1782# "Tl DSKO 4080 4092#

DSKI 4078 '11195# USKJ 4113 4115# DSKCMD 3319 :3:324 4073# DSKDVR 1783 2()I8# 3048 DSKERR 4109 4120# DSM4 2450# 2452 2453 DSM5 2460# 2462 2463 DSM6 2470# 2472 2473 DSM7 2480# 2482 2483 DSPACE 233# no 563 563# 682 682# 682# 1163 1163# 1702 170U 1738

1738# 1738# 2416 2416# 2416# 3127 3127# 3127# 3143 3143# 3143# 3238 3238# 3238# 3572 3572# 3663 3787 3958 3977 4003 4047 4073 4135 4170 4190 4233 4254 4273 4299 4327 4387 4820 4861 4867 4873 4873# 4878 4878#

DSW 2169 2270# DTL 4489 ,1600# DTVPE 2324 2384# DUMP 3412# 3447 3996 4118 DUMP2 3416# 3425 DUMP3 3429# 3434 DUMP4 3436 3443# DVRLMT 3129# EATKEV 3654# 3657 ECHO 3357 3525# 4006 4025 ECR 2915 2920 2923 2925 2949# EIRET 641# ENATR 1263# 1411 ENTRV 241# 264 5025 EOT 84# 3246 3296 3337 3376 3537 3546 3652 3867 3930 4123 4354

4444 4472 4484 4641 4724 4849 ERR 383 385# ~RRI 318 320 382#

RR2 329 384# ERR3 388# :391 ERRMI :382 394# 400 ERRM2 384 397# ERRML 385 :JB6 400# ESC 89# :1619 3926 3928 4339 4429 4472 4484 4641 . 4722 ESCADR 1391')# ESCAPE 1364 1422# ESCTAB 1222 1377# 1394

11 ESCTBL 12L] I ~l~411 -' EXPvEC 491511 tv

FALSE 2311 :!5 FALUN 2525# Llf,! 2764 fASTCRT 569 1!J~b 1109# .] 7 10 37~lH 40B2 4755 FBLlJN 2526# 2763 FCLlJN 252711 FOLUN 252BII 2"165 FIFCNT 417 bU9 769 B14 490711 flFIN B23 4~nUI1

FIFO 774 4911611 FIFOlJT 771 4909# FILL 3307 423311 FILLI 423BII 4244 FIRST 2669 :J04511 3050 FIRSTI 305711 H1b6 FIRST2 3061 J()b911 FLOPI 202511 20BO FLOP2 2042 2046 204BII FLOP] 2060 2Ub311 FLOP4 206911 21172 FLOP5 2029 2035 207511 FLPFRM 2B36 303111 FM.DD 200111 2003 2370 2391 FM.DDDS 25bUII n02 2765 FM.DDSS 2003# 2325 FM.DS 200011 2:319 FM. FV 200211 2329 2394 FM.HARD 256911 n66 2767 276B 2769 2B05 3005 FM.SDDS 256611 2763 FM.SDSS 256511 27b2 FM. SZ· 256211 2705 FM.UN 1999# 2003 2366 2367 2371 FM.WR 2563# FMDD 2561# 271.13 2709 FMDDSS 256711 L7l:i4 2B07 FMDS 2560# 2(-)B6 2BI7 fORCE 4394# 4b2b FORSPC 1349 1453# GCA 2B60# 2UB!) GCAO 2B64 2UbGII GCAI 287311 2B77 GCA2 2B75 2U1UII GCAA 2B66 2Bb7# 3055 GCP 4469 ·14U 1 4702# GCPI 471111 4712 GENVEC 4902# GETHEX :D95 :145b# GETHLP 3351# :i:J59

}> "0 "0 II> :J 0-X

"

» "0 "0 It) ::s a.. ><

"

" ...... w

CETLlN GETSEL GLlNI GLIN4 GNlJMI GNlJM3 GOLD GOTO GPIOCA GP IOCB GPIODA GPIODB HELP tiELPKEV tiEXB I N liOME HOMElJP liOMSCH I-ms ICC lCCS IceSI IDLE I N I IN2 I N:3 Hl4 INCMO INDEX INSLlN INTAB INTSTK IOBDVH IOBOVS IOBLOC I08VTE 10CONI IOCONO IoeOHS IOLIST IOLSTS IPOINT ISC JPIX KBDCTL K8DDAT KBDIN KBDINI K8DST

3249 5132

3357# 3364 3459# 34649 1122# 3308

51# 53# 50# 52#

3301 94#

3467 574

1367 4393# 4940# 2293 2622 28919

598# 4142# 4145# 4151 4153 3310

772# 4390#

330 796

3663# 447 447

339 590 591 589 592 593

4770 2218 32119

65# 6'1#

567 702# 566

J356# G30#

:n69 3380 :U7:3# .1469

1170 1276 1318 1498 1666 1682 3958#

531 5:Hj

3755 541 3756 3758 3760 3768

413209 :3358 3526 :i4 76# 4016 4029 3186# 3820 )4,10# 4472 4484

:!29H# 2748 2838 28B6# 2986 2894

702 722 732 2305 2957 4159 4149 4156# 4158# 4135#

824

404# B41 922 4926#

J848 :37759 3778 3850 2413# 3666 3775 3849 3701 3732 3742 3B98 3949 3724# 3707# 3716# :3732# J742# 4778 4787 4B09# 2 :!~ll # 2344 2363 3299# 3970

469 349 8UO 7()3# 3727 7(14 bU9# 703 3719

" KBMASK 708u ,lb81 -" KONLIN 4397u 4'179 .r:. I<EY 1 806 tJ12#

KEY2 803 BI4u KEY:1 816 tl27# I<EY4 829u ll31 KEY5 8 II 813 821 026 834u KEYSRV 406 794# KLJPLIN 4396u 4467 LAST 3983 :.1997 4961# LASTFM 2684 2831u 2832 2952 LOL 4400 4657# LOll 4667 4672# LCP 3847 Jll97# LCPl 3903 3908# LCP2 3915 3918# LCP3 3933# 39:19 LCPA 3922 3927# LCPO 3924 J92909' LOIRI 104709' 1075 LDIH2 1046 104809' LOIH3 1053 ID55# LOIRX 1684 1695# LEADIN 1171 1::S 25 4951# LF 8509' 993 3244 3537 3629 3630 3635 3643 3650 4354 4362 4371

4400 4443 4542 4554 4569 4575 4827 4832 4837 4841 4848 LFEED 1189 1:147 1489# LINOLJF 1057 1065 1693 3247 3251 3283 3352 3354 3789 4076 4111 4580

4672 494609' L1tlDl 159309' 1603 1605 LIN02 1595 160609' LI N[J3 160709' 1638 LI NOEL 1399 15t37# LINII 162409' 1635 LlNI2 1627 1629# Ll NI3 1625 1636# LlNINS 1401 1613# LOCALF 4400# 4499 LOWLI TE 7209' 1239 LSTATT 1147# 1154 LTL 4476 4574 458009' llJN 2784 :j03409' LX1984 32u 358 361 M3TST 1288 13UO# M4TST 1301 1312# M515T 1313 1317# MASK 620 7D9# 1174 1274 MDATA 3333 33'11# 4005 MDMPI 398309'

:t> MDMP2 3980 ::198411 -0 MDMP3 398", :198711 -0 MDMP:iA - 399111 _ll)93 I'D MDMP3B 3985 399611 J MEMDMP 3305 397711 0- MESSAGE 499111 501 I 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 >< 5022 "T1 MILO 944 95JII

MILOI 96411 969 MIL02 968 97011 MILLI 952 97511 MILL2 937 98211 MILL3 989 99311 MILL4 984 99511 MILL5 994 99611 MILL6 932 935 981 99811 MI LLI 410 92011 MILSEC 925 927 493011 MINS 494111 MLU 2609 1670 277811 MODE 1247 115011 MODEl \ 1244 125111 MDNITR '.3711 228 310 354 355 3572 3663 3787 3845 3958 3977 4003

4047 4073 4135 4170 4190 4233 4254 4273 4299 4327 4387 4411 482Q 4861 4875 4881

MONTH 493811 MDVLN 243 10611 MPA 2620 1745 280111 MPAI 280!l 281411 MPA2 2812 281611 MPA21 2821 282311 MPA22 2818 282611 MPA3 2!l35 284011 MPA4 284711 284!l MPA5 2806 284911 MTRAOR 2091 21"32 213311 2152 MULTI 121111 1326 NBLK 303711 NMI 198311 "!261 2264 2280 NOND 135-1 1352 1353 1355 1356 1357 1358 1359 1360 1362 1365 1366

142411 NT4 242811 2450 2450 IH5- 242911 2'160 2460 tH6 243011 :2470 2470 tH7 243111 2-180 2480 NTHK5 200611 1190 NTHK8 200511 218B tHJLl NT 588 598 771311 NUMCON 435 443# 648 4965

"T1 --Ul

11 .... 0\

» lJ lJ /1)

::J 0.. X 11

NUMUNT O.AUTO O.BAUD O.DDVR O.DISK O. E SCT O.F I LL O. rlELP O. I NPC O.MOVE O.OuTC O.PROT O.RAMT O.RESV O.TERM O.TYPE O.VERf OPCODE OPOINl OPT! OtiS

OUTCMD OUT CRT OUT CUR OUTPUT OVERLAY

P.ACKN P.AUTO P.ONLN P.RDY! P.RDYO P.STRB P2L PARAO PARAI PARA2 PARA4 PARAMI PARAM2 PARAM3 PARAM4 PARAMS PASS8 Pt-IEX PHYCMD PHYDMA PtWDRV

2bb:.l# 107# UU 111 # 41141 110# 123 1168 124 117# 123 119# 125 108# "iU 1 5 112# 4129 120# 3551 113# 4164 109# 4295 115# 126 1068 124 121# .3b37 118~ J645 114# 125

2606 2()21 4775 4/flb

123# ;24# 3645 J783 4338 4379 3316 4170# 4565 4627

580 IUIO# 3:;00 3511#

183# 3571 4232 4253

146# 151# 542 147# 148# 149# 'J770 150# 542

2762# 2778 3383# 3389 3390# J4D3 3394# 3397# 3206 3:j97 3287 49588 3288 4959# 3969 4116 3284 JJU4# 4:389# 2583# ]046 3145# J223 3150# :i215 3147# jl61

3783 4066

128 1218 1341 4338 4428 4471 4483 4229

4250

4184

4379 4323 3551 4269 2632 2746 3014 3033# 4801 4810#

124 125# 125 126# 126 128# 1218 1341 3551 3637 4041 4066 4129 4164 4184 4229 4250 4269 4295 4323 4428 4471 4483 4815

4632 4754#

4222 3662 3786 3957 3976 4002 4046 4072 4134 4169 4189 4272 4298 4326 4386 4819 4860

3757 3759

J405

4099 4957#

4960#

3856

4100

» FiHY SEC 3149., :j~ 14 "0 PHYTRK 3148., j 1 ~J:j 3UJ2 "0 PtiYUNT 3146., t1) PIOI 3762.9- :J1li3 :::l PIOAD 2502., ~5!)6 0.. PlOAS 2501., :!~) n L 2503 2504 2999 X PIOBD 250'1" 2SD7 2508 11 PlO8S 2503., '!~j 75 2977

PIOOUT 3735 3752., 3753 PIOSTO 3745 3752 3768., PKI 4449 4456., PK I 1 4462· 44li7., PKI2 4468 4479., PKI3 447& 4490., PKI4 4480 4491., PKI5 4492 4-'195., PKI6 4496 4499., PI\l7 4500 4503# PKI8 4494 4498 4502 4506# PKI9 4504 45D9# PMSG 2577., ]048 PNEXT 3243 3292 3334 3374 3536 3542# 3549 3617 3861 3925 4120 4336

4426 -'l47!) 4482 4640 4721 4822 PORTS 4424 4517 4729 4730# PRe 4451 4530., PRINTX 4999., PRMTI 3267 JlU1., PROMPT 565 3241., 3253 3290 3297 PROTI 4302 4]12., PROT2 4315 4317# PROTO 3317 4299# PRS 276# 326 392 611 PRSI 278# :09 PR52 311# 324 PRS3 331.# 340 PRS4 342# 348 PRS5 360 368., PRVATT 1153# 1155 PIn 2115 3344 :J424 350511 3971 4144 4146 PUT2HX 340011 3503 3505 PUT2J 3339 334411 PUT 41iS 3342 3413 350211 3972 PuTNI8 3493 3495# RAM 36# 355 440 4894 4970 5007 RBASE 353 4068# RCP 4490 472111 RCPA 4716 472311 ROC 2018 2149 2225 229411 2354 RDID 2234 224311 2375

" -" 00

» "0 "0 /1) :J a.. >< "

IWID I fWDNL Y RDOP RDWR ROWRA RDviHS READ RECAL RECLUN REMOVE RESET RESLEN RESTART. RESTOP RETINS RETURN RETVI RETVAL RETZR REV RfI RG(lE!lJf RGLLJN RGRECAL RIGDPB RMTALF RMTTOG ROM ROMSIZ RflMTOP RQTOP RSE RSEI RSTATT RSTHL RSTPC RSTSP RTK4 RTK5 RTK6 RTK7 RXI984 S.AUTOL S.AUTOR\ S.LECHO S. RECHO SAI403 SASO SASOA

2;151 3008# 2021 3200 2063 2065#

576 2236 3026#

706 2860 4875#

564 4874#

827 1350 636 616

2228# 16#

835 2497# 2529# 2985 2412# 4399# 4398#

29# 3011

4081# 313111 2213 2235 114611

281 283 2BO

245011 2460# 2470# 24BO,v

31# 4·10611 4407# 4404# 4405# 2595# 2604 2596#

L L~)5# j068 2056# ::1213# 21171# 2199 3204# 3835 3908 2286# 2334

769# 2950 2972# 2983

607#

9f11# 1482# 1542 1692 b40# 626 634#

2323 2337 625 3623 3623 3623 096# 998

Hl74 3\19 2766 2767 2768 2769 :lO25# 3602 4503 4495

2;17 563 1702 4873 4887 4888 5003 244 327 4887 4888 5003

4H07 4888 5003

:n:l311 2138# 1343 4978# 4979# 4977# 245B 246B 2478 2408

357 361 367 4501 4540 4505 4552 4464 4493 4497 4531 .:lU5O 2ti06# lh4J

» SASI 2634 2bJ711 -0 SAS2 2618 2W:lb 2638# -0 SASIC 250711 2U72 2879 2979 2981 (1) SASID 250611 2U70 2890 ::J SASIDI. 312111 :3 I 23 3604 0.. SASIS 2508# 2d73 2921 2937 >< SASSTH 2420# :1121 "T1 SAvSTK 795 040 899# 921

SCHOLL 56# 304 1509 1565 SCHPRT 95# BIl2 SEAHCH 1224# SEC lEN 2631# 2nOI SECS 857 494211 SEEK 575 3192# SEEKO 2215# 2"'27 SEEKI 2214 '222211 SEEK2 2221 222311 SEEK3 2211 2225# SEEKX 2033 217811 SEGA 241# 27111 1164# 4868# SEGMENT 199# 270 563 682 1163 1702 1738 2416 3127 3143 3238 3572

3663 :3787 3958 3977 4003 4047 4073 4135 4170 4190 4233 4254 4273 4299 4327 4387 4820 4861 4867 4873

SEKO 2189 2191# SEKI 2185 2194 2199# SELl 3160 3177 3181# SELIW 2151# 2159 2163 SEl2 2159# 2160 2162 SEl3 ·2144 2148 2164# SELDEN 2130 2169# SELDNS 2168# 2180 SELEC 2023 2085# SELECT 573 3158# 3811 SELEHI 2661# SElEHH 1782 187311 2087 2105 SELTAB 365 630 1713 1754# 3608 3878 SElTBL 3162 ::l2J I # SElLJNT 2028/ 2120# 2322 SEHVICE 78511 794 839 920 SETBlI 1242# 1405 1407 SETBRK 4515 4517# SETCOl 1302# SETCON 5U6 b4b# SETCuH 579 I fJl)5# SETGHA 1249# 1406 SETINV 124611 1404 SETLOW 1152 1239# 1403 SETMSK 1271# 140B 1409 SETPRV 115111 1240 1251

"T1 .... 1.0

II SETRO\~ 129211 1441 N SETXV 120311 1402 a

SETXVI 1215 12117# SIGNI 359111 3591 SIGN2 3595 :1590# SIGN3 3582 J60111 SIGN3A 3610u 3615 SIGN4 3578 3600 3607 361711 SIGNON 368 :JS7511 SIM 2749 2906 2913 2993# SIOBUF 441 111 4412 4774 4800 4809 !l810 SIOCPA 4811 513 3670 3677 3693 4420 SIOCPB 4911 495 714 741 742 4423 S IODPA 4611 :1<;00 3600 4420 S IODPI:l 4711 725 735 949 996 4423 S I 011 4799 400111 SIOIN 571 723# 754 3728 4358 SIOINl 722# 724 SIOINC 4530 4795# 4796 SIOINP 473511 4736 SIOINS 472911 4735 4742 4764 SIOIST 4450 478511 4795 SIOMSK 437 744# 3945 4300 SIOOT 4526 4549 4555 4746# 5100Tl 474711 4740 SIOOlJT 572 73011 3712 3737 4367 4372 SIOPL 4754 4757 4763# 4785 SIOPLI 4773 ,177511 SIOPL2 4777 4779# S IOPL3 4765 4700# S lORD 1 747 75011 SIORD2 757 761# SIOHD3 753 759 76211 S IORDT 474211 4747 SIORDY 505 731 74011 934 3746 S10ST 570 714# 723 752 3720 4356 SIOVAL 4311 746# 3947 4311 SIOVEC 499 4899# SIOXl 73111 733 SLDDEN 69u 5LERR 313311 SLSDEN 6811 SMF 2103 2::12211 SMFll 2328 2330# , SMFOA 2334u 2360 SMFI 2340u 2353 SMFIA 2351 2356# SMt'18 2365 237011 SMF2 2360 237111

» "0 "0 It) ::J Q. x II

};> "'0 "'0 tD :l 0-)(

"Tl

"Tl N .....

SMF4 SMFA SMFS SMFSI SMFS1A SMF:S2 SMFS3 SMFS4 SMFSA SMP SNOLOC SNDRMT SOFT SOFTV SOM SOMI SPACE SPACT SPAODR SPARE SPAREI SPARE2 SPARND SPCNT SSELEC SSP STACK START STATUS STC stEPR STEPRT STOP STPAOR STUFF SI-JAP SWAPI SYNC SVSCTL SVSPIO

SVSVEC TAB TOI TOO TERM TERMI TERM2 TERM3

2376 2126 2655 2689# 2701 2695 2710 2699 2689 1593 4465 4463

599 599#

28611 2994 3414

671 94709'

4970# 441 442

4972# 673

2599 587 325

3572# 4446 2068 2292#

440 41161# 2093 1368 38D7 3885#

74# 6309' 62#

1061 405

1346 2635 2637 3309 4418 4422 4448#

L,J7B 23B3# 2:380 238 \# 2b69# :!lO4 2706 n03# 2707# 271'2# 27 :j3# 2697# 1629 1642# 4537# '1532 4549#

695# 2079 2642 :!998# 2999# 3426 3509# 3517

804 808 929# 976 983 975

4967# 4968#

810 94209' 945 971 2651#

670# 812 :J242 49.82'#

4t:104# L244 2260# L:J33 3599 3920 4932#

233D 2331R' 142809' 3876# 3892

458 464 3585 3587 461 608 610 851 U53 938 980 1019 1022 1028 1048

1063 1074 1 112 1254 1258 2510# 3272 3588 3592 471 4901#

1515# 2906# 2899# ,n87# 4420# 4424# 4452

-n TEST 3325 4190# IV TESTI 4199# 4123 IV TEST2 4201# 4LllU

TEST3 4211 # ·4219 TIKCNT 044 846 4931# TIMER 412 BJ9# TI MER 1 050 B54# TIMERL 050# U63 11 MER3 060 067 OOL UU8 U92# TIMOU 2010# L 131 2155 TIMOUT 04U 4933# TLOC 229# :1572# 3572 3572 3663# 3663 3663 3787# 3787 3787 3958# 3958

3950 ".3~)77# 3977 3977 4003# 4003 4003 4047# 4047 4047 4073# 4073 4073 4135# 4135 4135 4170# 4170 4170 4190# 4190 4190 4233# 4233 4233 4254# 4254 425A 4273# 4273 4273 4299# 4299 4299 4327# 4327 4327 4307# 4307 4387 4020# 4820 4820 4861# 4061 4061 4881

TOPPTR 4501 4585 4600 4604 4664 4668 4671 4807#. fPAL 2311# ".3663 3663# 3707 3958 3~58# 3977 4003 4047 4073 4135 4170

4190 4233 4254 4273 4299 4327 4387 4020 4820# 4861 4062 4867 5007

TPAMAX 3270 4U62# TRKTBL 2122 24()8# TRMBUF 4409# 4410 4684 4691 4006 4807 TRMSTK 4412# 4425 TRN5 2393 24()2# TRN6 1865# 2396 271 I TRUE 22# 23 TTC 2073 2249 2278# TTCA 2262 2279# ~TVPO 4330 4336# TVPl 4356# 4365 4370 4374 TVP2 4357 4364# TVPE 3321 4327# TVPTOG 4401# 4491 UPCSR 1348 1462# UPDATE 200# 270 563 682 1163 1702 1730 2416 3127 3143 3238 3572

3663 ]707 3958 3971 4003 4047 4073 4135 4170 4190 4233 4254 4273 4299 4327 4387 4820 4061 4867 4873 4071

USRSEC 508# 847 USRSTK 1041 i079 1109 1123 1 124# 1501 VECTAB 351 4098n VERCMD 3323 4273# VERFI 4201# 4209 VERF2 4279 42U7# VIEw 3306 J:l 14 4003# VIEWO 4005# 41)39 VIEWI 4012 4016# VIEW2 4027 '1033# VIEW3 4015 ·H134#

l> "0 "0 m ::l a. >< "

" tv W

vIEW4 VIEw5 wAfiM WASTED wec W017~7

woeR WOOD WOOT WOSO WOSL WOSN WDSR wOTR WFR WFRI WFRA WHAT WLP wOC WOCI WOC2 WRITE WUP XCKS XCKSI XOfF xOFFLG XON XONENB XQDVf{ XQPHYS XSELERR YEAR Z.BAUA Z.BAUB l.IOBT Z.KEYM l.SCRA Z. 5 I DA Z.510B l.SIOM Z.SIOV l.STPR Z. XOtlP

400tj 4010

565# 1741# 2754

55# 1~88#

1994# 1991# 199311 199211 199011 198711 1989# 2750 2936 2942# 3250 4603 22B2 2301# 2305#

577 4584

243a 24611

BBII 761

B7# 439 578

3173 266011 493911

14011 14111 14211 13411 13211 13511 13611 13711 13811 133a 139a

4U:J(j# ·i0.HI#

iJ:J3 3655 3846

l839 2900 2902 2908 2913# 2987 35~0 359B '2.2 ()7 2298 2346 ::' 171 2338 2216 2266 2342 2173 2361 2136 2141 2186 2203 2207 2326 2372 2374 2n48 2157 ·2164 2306 2349 22D9 2253 2091 2B~9 290.7 2914 2919 2935# 2939 ~~41 294511

:1::'56 329211 3311 3312 3315 3318 3320 3322 3326 3327 4661 4670 46B911 ~]ll2a

2]04 FH.lO 319911 4594 4651 4678#

::'53 756 75B 7b311 758 751# 391B 4317

170911 3225 3223# 4106 4115

141 3940 142 3942

:J94B 135 3923 133 3921 136 3~31 1::17 1 :30 3944 1::19 3946 134 3919 14 () 3913

Notes

F24 Appendix f

» u U Ib :J a. X G)

G) ......

Quick, Fd»t Cold Star-t LOader

I 2 3 4 5 6 7 o 9

10 II 12 13 14 15 16 17 16 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 36 39 40 41 42 43 44 45 46 47 46 49 50 51 52 53 54 55 56

\

F02A 0004

0000' DODO'

0060 0001 0062 0003 0005 0067

0060 0081 0064 0006 0069 006B 006C 0000 006F 0090 0091 0092 0093 0095 0096 0097 0096 0099 009A 009B 009C 009D 009E OOAI 00A2 00A5 00A6 00A7

EB 01 0005 ED 80 21 0005 DE 05 09 BE 30 FC CO 23 4E 23 ED AO AF 12 7E 23 6E 23 29 29 EB 2A 0003 09 22 0063 47 7A 21 FF60'

MACRO-OO 3.44 09--Dec-6 I

Tit 1 e Quick, Fast Cold Start Loader

QuiCk, Fast Cold Start Loader.

Copyright (C) 1902, Balcones Computer- Corporation.

.zOO

Xqdvr equ cdisk equ

cseg bios equ

. pl1ase

pl1ycmd equ phyunt equ phydrv equ phytrk equ physec equ phydma equ

Of02ah 0000411

60h

$ $"- I $"-2 $+3 $+5 $..-7

; i quick, fast loader.

;Physical Driver Executioner ;current user/disk

;origin of bios above ccp & bdos

Entry: A = Sector» per Track

qfs:

qf51 :

DE = Address of Physical Co~nand Block that loaded QFD

ex de,hl ,transfer command block Id bc ,pl1ysec-phycmd Idir Id Id add cp jr ret inc Id inc I d i xor Id Id inc III inc add arid ex Id add Id Id ld Id

hl,ldrtbl-5 c,5 hI ,bc (h I) c,qfsl nz hI c, lh I) hI

a (de),a a, (h I) hi I , (h I ) hI hl,hl hl,hl de,hl hl,(phytrk) hl,bc (phytrk),rd b,a a,d hl,bios-BOh

,woe be unto he who changes qfs ;set loader control table address ,set table entry size :advance table address ;match with loader control table entry ;if match not found yet ;if entry not in table

;set track offset+1

;move starting sector, adjust track offset

;clear upper sector :set number of sectors

:set (sector size)/4-1 ;sector size I 4

;set sector size in DE ;ado track offset

;set number of sectors ;check sector size ,set starting address

G) Lhlicl-., Fast CO,I <l ~.~ l d,- t Loader- MACRO-BO 3.44 09-Dec-BI N I

57 OOAA 61 or a 58 OOAB 1IJ U 1 j r' nZ,4 fs3 :if big sectors 59 OOAD 19 qfs2: add hi ,de iadvance transfer address 60 OOAE :;1 OOB7 qfs3: Id (phydllla) ,111 61 OOUI LJ~I exx :switch register sets 62 0062 11 0080 ld hl,pllycmLi or- qfs:set physical command address 63 00B5 CD F02A ca 11 Xqdvr :execute driver read 64 UOB8 -' 1 0085 ld hi, pllysec :advance sector 65 006B :i4 inc (h 1 ) 66 OOBC [)~l exx :switch back 67 (J06D 67 or a 68 OOBE CO ret nz ;·i f boot error 69 OUBF III EC djnz qfs2 ; if cold start not complete 70 OOCI 3:! 0004 ld (cdisk),a ;start out in A: user 0 71 00C4 ~ 1 0003' ld hl,bios+3 ;warm start after signon 72 00C7 E5 push hi 73 00C8 21 00F6 Id hi, sernum 74 OO(B 11 OODA Id de,ldrtbl 75 OOCE lIE OA ld c,sernml 76 U1HlO ED BO Idir 77 0002 12 Id (del,a 78 00D3 13 inc de 79 OOD4 3E C9 Id a,Oc911 80 00D6 12 Id (rJel,a 8 I 00D7 CO 0000' ca II bios ;execute cold start loader 82 83 , , Loader- Control Table. 84 85 Entries Must be in sort order 86 87 db sectors per track 88 offset+1 from boot track 09 starting bios sector 90 number of bios sectors 91 sector s i ze/·4-1 92 93 OODA 34 02 16 04 Idrtbl: db 52,1+1,22,4,256/4-1 ;8" Double Density 94 OODE Jf 95 OODF 2L 03 05 04 db 34,2+1,05,4,256/4-1 ;5" Double Density 96 00E3 3F 97 00E4 lA '02 14 07 db 26,1+1,20,7,12814-1 :8" Single Density 98 00E8 1 F 99 00E9 I:; U3 OA 07 db 18,2+1,10,7,128/-4-1 :5" Si"ngle Density

100 OllED IF 101 OOEE lJO U 1 16 04 db 00,0+1,22,4,256/4-1 :Any SASI Rigid Disk 102 OOF2 :IF If!:l (}(JF:J no db 00 End of table 104 105 it $ 9t 10011-10

» 106 .pl illtx • Tuu Big + 'U 107 else "0 108 if $ eq 1001,-10 tTl 109 .printx + Perfect Fit + ::I 1 10 else 0...

1 1 I 00 f II ds 10011-10-$,-1 )( 112 endif G)

C\ w

o u i c k. Fa s t Col d S t ell- t Loa (j e r

II] 114 115 116 1 17 118 119 I;!O 121 122 123 124 125 126 In

OOF6 OOfA OOfE OODA

:20 44 43 2A '2A 2A ~A 2A 2A 2A

MACRO-HO 3.44

sernml

09-Dec-81

enLlif

Se ria liz at; Oil .

;Manufacturing serial

equ $-sernum

if $ ne 100h .prilltx * Serial NUlllber Out of Place * endif .dephase

end

number here

» "0 "0 /l) :J 0.. )(

G)

Symbols: 0000' BIOS 0060 PHYCMD 0065 PHYSEC nouo QFS OOAE QFS3 FULA XQDVR

No Fatal error(sl

0004 00B7 0063 OOBB OOOA

MA'cnO-BO 3.44

CDISK PHYDMA PHYTRK QFSI SERNML

09-Dec-Bl

OODA 0062 0061 OOAD 00F6

LDRTBL PHYDRV PHYUNT QFS2 SERNUM

}> U U It) :::l 0.. X

G\

G\ U1

BIOS CDISK LDRTBL PHYCMD PliYDMA PHYDRV PliY SEC PIWTRK PliYUtH QfS QfSI QfS2 QfS3 SERNML SEfWUM X()DVR

13# 56 71 81 10# 70 32 74 93# 17# 30 62 22# 60 19# 21# 30 64 20# 51 53 18# 29# 6:i 34# 36 59# 69 58 60# 75 120# 73 117# 120

9# 63

Notes

G6 Appendix G

» XEROX 820-11 BIOS MACRO-80 3.44 09-Dec-81 "0 Biu:; "0

Jump Tabl,"

It) subttl Bios Jump Table :J 'L tit I e XEROX 820-11 BIOS a.. 3

)( 4 XEROX 820+ Rom Resident Bio:; Jump Table. i i I 5

6 Copyrigllt 1981. Balcones Computer Corporation. 7 8 .z80 9

10 0000' C:j OOF I' bios: jp cboot ;cold start 11 0003' C3 0069 ' bwboot: jp wboot .warm start l'L 13 OOU6' Ci F04B bconst: jp const ;con50le status 14 0009' C3 F04E bconin: jp conin ;.conso 1 e character in 15 OOOC' e3 F051 bcunot: jp callout lconsole character out 16 OOOF' C3 F054 bprint: jp lis t l list character on printer 17 0012' C3 F060 bpunch: jp, punch lPunch 18, 0015' C3 F05D breadr: jp' reader lreader 19 / 20 0018' C3 01B6' bhome: jp horne ;move head to home pOSition 21 001B' C3 0154' bseld: jp seldsk ;select disk 22 001E' C3 01B9' bsett: jp settrk iset track number 23 0021 ' C3 01BE' bsets: jp setsec lset sector number 24 0024' C:j 0lC3' bsetd: jp setdma ;set dma address 25 0027' el 01EB' bread: jp reau ;reacJ a record 26 002A' C3 01F3' bwrit: jp wr it e ;write a record 27 28 00:.10' C3 F057 bprnts: jp listst lprinter ready status 29 0030' C3 01C8' bsctrn: jp sectrn ;sector translate 30 31 0033' 81 in it i 0: db 10000001b ;initial 110 Byte 32 33 Subttl Cold and Warm Start MOdule 34 page

I

I XEROX 820-11 BI()~ MACRO-BO 3.44 09-0ec-Bl tv Cold arllj Wann S, t a. MOdule

35 36 37 OEOO bdosln equ OeOOh ;Length of CP/M v 2.2 aDOS 3B 0800 ccplen equ OBOOIl ;Length of CP/M v 2.2 CCP 39 0004 c(lisk equ 4 ;Current user/disk 40 002C nsects equ (ccplen+bdosln)/128 ; numbe ,- of sectors for ccp + bdos 41 0062 rev equ 'b' 42 43 , , Wboot - Warm Start CP/M. 44 45 00::l4' JE Cj wlJt5 : Id a,Oc3h ;plant jUlllps 46 0036' 21 f206' . Id hl,bios-bdosln+6 47 0039' BE cp (h I) 48 003A' 20 1 C jr nz, wbterr. ;if no jump to bdos 49 003C' 32 0000 Id (0) ,a 50 003f' 32 0005 ld (5) ,a 51 0042' 22 0006 Id (6) ,h I iset address of jump to bdos 52 0045' 21 0003' Id 111 ,I;lwboo t ;set warm boot address 53 0048' 22 0001 Id (1) ,h I 54 004B' ED 4B 0004 Id bc,(cdisk) ;set current disk / user 55 004f' 21 EAOO' Id hi ,bios-bdosln-ccplen ;Enter CCP 56 0050' wbtcom equ $-2 ;patch to "03" to disable warm boot command 57 0052' JE 03 Id a,3 58 0054' 32 0050' Id (wbtcom) .a 59 0057' E9 jp (h 1 ) 60 61 0058' CO 0115 ' wbterr: call pmsg ;display error message 62 005B' 00 OA 42 6f db 13.10,'Boot Err' ,0 63 005f' 6f 74 20 45 64 0063' 72 72 00 65 0066' CD 0009' ca II bconin ;wait for key 66 0069' 31 0100 wboot: ld sp,I0011 .use external stack 67 006C' CD 013f' ca II dboot ;inform deblocker 68 006f' 4f Id c,a ,(zero) select A: 69 0070' 3E 2C Id a,nsects ;set number of sectors to read 70 0072' 32 DODO' Id ("5eccnt).a ;set sector counter 71 0075' 21 E9BO' Id hl,bios-bdosln-ccplen-12B 72 ll078' 22 013B' Id (dlllabas).111 , ; set base track dma address 73 007B' CD 001B' ca II bseld ' ,select boot drive (A: ) 74 007E' 7C Id a,h 75 007f' B5 or I 76 OOBO' 28 06 j r' z,wbterr 77 0082' ,23 inc hI ;point to high translate address 78 00H3' 7E Id a, (h I) 79 00B4' :j2 0122 ' Id (xlate),a 80 0087' E5 pU5h hI 81 OOBB' OE 00 Id c,O ;translate sector zero 82 OOOA' CD 0121' ca II 11115 83 0000' 79 Id a,c » B4 008E' 32 0133' Id (tran5z),a ;set sector zero translate value

"0 B5 0091 ' E 1 pop hi "0 86 0092' 11 0009 Id de,10-1 ;offset to dpb (1)

:J 87 0095' 19 add hi ,de Q. BB 0096' 4E Id c,(I1I) ;get dpb addres5

X B9 0097' 23 inc hi

I

}:> XEROX O:W-II BID'; MACRO-OO 3,44 09-0ec-Ol "0 Cold and Warm S t ,;1 f t Module "0 to \:)0 00\:)8' "Ill Id 13,(111) ::l

~) 1 0099' OA Id a, (bc) ;get low sectors per track 0.. 92 009A' 3:! OODC' Id (spt) ,a

>< 93 0090' L 1 DODD ld hl,13 I '94 nOAO' O\:) add hl,bc

95 OOA 1 ' 4E Id c, (h I) ;get reserved tracks 96 DOA2' L] inc hI \:)7 00A3' 46 Id b, (h I) 98 00A4' OB dec bc 99 OOA5' 1 E 01 Id e,l ;set sector 1

100 00A7' 87 or a ;test low sectors per track 1111 OOAO' :2B 06 jr z,wbtl ; if ri.gid disk 102 OOAA' 4A Id c,d ;set track 0 103 OOAB' FE lB cp 26+1 104 OOAD' 38 01 jr c,wbtl ; if single density 6" or 5" 105 OOAF' 48 ld c,e ;double density starts on track 1 , sector 1 106 OOBO' C5 wbtl: push bc ;save track 107 OOBI 05 push de ;save starting sector 108 00B2' CD ODIE' ca II bsett ;position disk 109 00B5' C 1 pop bc 110 00B6' C5 wbt2: push bc ,save sector 111 OOB7' CD 0121 ' ca 11 IIlls ;map logical sector 112 OOBA' E5 push hI ;save add('ess 113 OOBB' CD 0021 ' ca II bsets i set sector 114 OOBE' r: 1 pop bc 115 OOBF' 21 FFFE' Id hl,bios-2 116 00C2' ED 42 sbc III ,bc 117 00C4' 38 12 jr c,wbt3 ; if within bios 118 OOC6' CD 0024' ca II bsetd iset dma address 119 00C9' CD 01EB' ca II read ;read next sector 120 OOCC' B7 0(' a 121 OOCD' 20 69 jc nZ,wbterT ;if load error 122 OOCF' 3E 00 ld a,O ;update sectors read counter 123 0000' seccnt equ $-1 124 0001 ' 3D dec a 125 0002' 32 DODO' Id (seccnt),a 126 0005' CA 0034' jp z,wbt5 ;if end of load 127 0006' CI wbt3: pop bc ;advance sector 128 0009' DC inc c 129 OODA' 79 Id a,c 130 OODB' FE FF cp - 1 131 OODC' spt equ $-\ 132 DODD' 20 D7 jr nZ,wbt2 ;if not end of track 13:3 OODF' 41 Id b,c 134 OOEO' :!A 013B' Id hI, (drnaba s ) . ;advance base drna address 135 OOU' 11 0060 Id de,126 136 00E6' 19 wbt4 :' adll h I ,de ;by spt'" 126 137 00E7' 10 FD lljnz wbt4 1 ~~B 00E9' 22 0136' Id (dmabas),hl 139 OOEC' C 1 pop bc ;advance track 140 ODED' lIC inc c 141 OOEE' 58 I (j e,l.l ;and restart on sector 0 142 OOEF' 18 BF j r' vlbt 1 143 144 ; i Cold Start CPIM,

I 145 OJ

I XEROX !UU- I I fjlU~ MACRO-UO 3,44 09-0ec-81 .f::- Co I (j and War-III S t lif" Module

146 OOF I' CD 0115 ' cboot: ca i I prnsg ;Announce CP/M size and version 147 00F4' IA 58 65 72 db 26, 'Xerox 60k CP/M vel's 2.2' ,f"ev 148 OOFU' 6F 78 20 36 149 OOFC' :30 66 20 43 150 DIDO' 50 2f 40 20 151 0lU4' 76 65 72 73 152 0108' 20 32 2E 32 153 OIOC' 62 154 0100' 20 23 32 20 db #2-294' 155 o I ~ I ' 32 39 34 156 0114 ' UO db 0 157 158 , , pmsg - print message at f"etur'l\ address, 159 160 0115 ' E I 1'''"5g: pop hi ;print lIIessa~e after call 161 () I 16' 7E Id a, (h I) 162 0117 ' 23 inc hi 163 0118 ' 67 or a 164 0119 ' E5 pUS~1 hi 165 o IIA' CU f"et z ;if end of message 166 0116 ' 4F Id c,a 167 o IIC' CO OOOC' ca II bconot ;display message at current console 16B o Ilf' 10 f4 jr Plllsg 169 170 , , 11115 - map logical sector, 171 172 0121' 3E 00 IIIls: Id a,O ;set translate address 173 0122' xlate equ $-1 174 0123' 67 or a 175 0124' 79 Id a,c 176 0125' 20 OB jr z ,ml s2 ;if not single density 177 0127' 07 add a,a ;read by hOI If tracks 178 0128' 2A OODC' Id hl,(spt) ;g",t sectors per track 179 012B' BO cp I IBO 012C' 30 02 jr c ,1111 s 1 ;if not past end of track 18 I 012E' 95 sub I ;offset back to beginning of track 102 o 12f" 3C inc a IU3 0130' 3C mls I: inc a ; map sector 0->1 184 0131 ' 4f Id c,a 185 0132' D6 00 mls2 : sub 0 ;offset by translate of sector zero 186 0133' transz equ $-1 187 0134' If rra 188 0135' 67 Id h,a IU9 0136' 2E DO Id 1,0 190 0138' CB 10 rr I 191 Ol3A' II DODO Id de,O ;set base dina for this track 192 0136' dmabas equ $-2 193 013(l' 19 add h,I,de ;compute address for this sector 194 013E' C~) ret

» 195 "0 196 Subttl CHARlO - Char'acter I/O Module "0 197 page (\) ::J a.. >< I

:l> u u CI) :l a. )(

:c

:c U1

XEROX B20-II 81()~ MACRO-BO 3.44 CtIARIO - CI1a,·act"," [/0 Module

19B 199 200 FOOD 201 202 F048 203 F04E 204 F051 205 F054 206 F057 207 F05D 20U F060 209 210 211

09-Dee-BI

monit,. equ OfOOOh ;B20+ Resident Monitor Address

canst equ monitr+4bl1 conin equ lIlonitr+4eh conout equ man i t r+5111 list equ lOonitr+5411 I i5tst equ monitr+5711 ,"eader equ lIlonitr+5dl1 punch equ lIlonitr+60h

Subttl CPIM Deblocking Driver page

I XEROX ,B20-II UIOS MACRO-BO 3.44 0\ CP/M Dt!blocking D, iver-

212 213 214 215 216 ll7 21B 219 220 221 222 223 224 "225 226 227 22B 229 230 231 232 233 234 235 236 237 23B 239 240 241 242 243 244 245 246 247 24B 249 250 251 252 253 254 255 256 257 25B 259 260

» 261 "0 262 "0 263 to 264 ::l 265 0.

266 >< :r:

013f'

DODA 0008 0000 001B

451B 5218

F02A 0004

0000 0001 OOOl

013F' 014l' 0145' 0148' 014B' 014C' 0140'

Ol4F'

21 0000" '21. 021A" 21 021C" 01 2000 7 I 23 10 FC

Af

Og'-Dec-B 1

; t

If up cr esc

ins lin de 11 in

xqdvr cdisk

wra 11 w ,-d i r wrual

Skip

CP/M Deblocking Driver.

cseg

Asc i i .

equ 10 equ I 1 equ 13 equ 21

equ ( 'E' shl B) + esc equ ( • R' shl 8) + esc

Absolute Machine Addresses.

equ equ

Of02ah 4

;Resident Monitor Driver Executioner ;CCP acti~e user/disk

CP/M Wr-i t e Types.

equ equ

0 1

;normal write to allocated sector ;write to directory sector

equ 2 ;first write to unallocated block

Skip - skip next instruction.

Uses HL to perform very short jumps

macro n if «n)-$) eq 2 db 26h ; i • set PC $+2 ( Id h .... ) endif if «n)-$) eq 3 db 21h ; ; ; set PC $+3 ( Id hi •... ) endif endm

Dboot - Deblocking Bootstrap.

Entry: Cal led prior to Warm Start reload.

dboot: Id hl.hstpuf (hstdma) ,hi 111,dptltab bC,16*2*256 (h I) ,c

;initialize host buffer address Id Id Id

dbt2: Id inc djnz

hI dbt2

;clear internal DPH table of addresses ;set table length, zero ;clear next byte

;if table not clear

clract - Clear host buffer active.

clract: xor a

l> XEHOX O£O-ll Bill::> MACRO-OO 3.44 09-Dec-Ol U CPIM U

Del) lock i n~ Dr lver

It) £67 0150' 32 0£6E' ld (Ilstact),a iclear 1'05 t lJuffe,- active :J 0- £68 0153' C9 f'e t

>< 269 270 ; i select - select CPIM disk. :r: 271 27£ Entry: C CPIM Logical Drive, 0-15. 273 E 2*n+0 if media identification required 274 E 2*n+l if media previously identified 275 276 0154' 79 seldsk: Id a,c ; remember disk to seek 277 0155' ~j 2 0205" Id (sekdsk),a 270 0150' D6 00 Id b,O 279 015A' 21 021C" se 11: Id hi ,dphtab ;set table of remembered dph's 200 015D' 09 add hi ,be ; i!1dex by words 281 015E' 09 add hi ,bc £82 015f' CB 43 bit O,e 283 0161 ' £8 OA jr z,sel2 :if drive not previously selected 284 0163' 7E Id a,(hl) ;set disk parameter header address in hi 285 0164' 23 inc hi 286 0165' 66 Id h, (hi) 207 0166' 6F Id I, a 288 0167' B4 or h 289 0168' 2D 19 jr nZ,sel3 ; if pr-evious select succesful 290 016A' 5f Id e,a ;fcirce media identification 291 016B' 10 ED jr se 11 292 016D' E5 sel2: push hi ;save dph table address 293 016E' 2 I 0202" Id hl,selcmd+2 294 0171 ' 71 Id (td),c ;set CP/M Logical drive 295 0172 ' 2B dec hi 296 0173' 2B dec hi ;point to select command 297 0174' 36 FF Id (h I) ,- 1 iset driver select operation 298 0176' CO 02Df' ca II xdr ;execute driver request 299 0179' EO ex de ,Ill 300 017A' E I pop hi 3D1 0170' 73 Id (h I) ,e : remember disk parameter header address 302 o 17C' 23 inc hi 303 OIW' 72 Id (h I) ,d 304 017E' lOB ex de,hl 305 017f' 7D Id a, I 306 0100' B4 or h 307 0181 ' 211 22 j r' z,sel4 ;if drive not succesfully selected ::!GO 01 O:j' E5 sel::!: push hi ;save dph address 309 0184' [) I OOOA Id bC,10 ;set dpb offset in dph 310 0107' ll9 add hl,bc 311 0188' 5E Id e, (h I) ;set disk parameter block address 312 018!:)' 23 inc hi 313 018A' 56 Id d, (h I) 314 018B' EB ex de, III 315 o 18C' 22 0241 ' Id (dpbadr) ,Ill 316 010f' DE 03 Id c,3 317 0191 ' U9 add hi ,be 310 0192' 7E Id a, (h I) ;set block shift factor 319 0193' ::Ie inc a ; form 128 byte records per block 320 0194' ,j2 021B' Id (rpb) ,a 321 0197' DE DC Id c,15-3 ;point to end of dpb

I ::J22 0199' 09 add hl,IJC '-J

::r: XEROX 020-\\ B((l', MACRO-tlO 3.44 09-Dec-81 00 CP/M Deblocki ... u Ol- iver

323 019A' 7E Id a, ( ... 1 ) .set internal parameter 324 0198' 32 0208' Id (trkzfl),a ;set track zero single density flag 325 019E' E6 07 and 7 326 OIAO' 32 029B' Id (secmsk),a ;set sector mask 327 0lA3' EI pop ... 1 328 OIM' C9 ret 329 0lA5' sel4: ; fa I I into clear active disk 330 331 , , cad - Clear Active DiSk. 332

~au: 333 0lA5' 21 0004 Id hl,cdisk ;get disk that CCP will log in 334 0lA8' 3A 0205" Id a,(sekdsk) :get disk that fail ed :135 OIAB' AE ~or (h I) 336 OIAC' Hi Of and not 1III0000b ;clear active user 337 OIAE' 20 04 jr nz.cadl ;if selected disk is not default disk 338 OIBO' 7E Id a, (h I) ;cause CCP to log in A: 339 OIBI' E6 fO and not III I b ;retain active user area 340 0lB3' 77 Id (hl),a 341 0lB4' 6C cadI: Id I .... ; indicate select failure 342 0lB5' C9 ret 343 :144 . , Home - Set Track Zero. 345 346 0lB6' 01 0000 home: Id bc,O ;seek track zero 347 348 ; ; Settrk - Set Track. 349 350 Entry: BC :: Track number 351 352 0lB9' ED 43 0206" settrk: Id (sektrk).bc ;set track to seek 353 OIBD' (9 ret 354 355 , , Setsec - Set Sector. 356 357 Entl-Y: BC :: Sector number 358 359 OIBE' ED 43 020C" setsec: Id (seksec) ,bc ;set sector to seek 360 0lC2' C9 ret 361 362 , , Setdma - Set Di r"ect Memory Address. 363 364 Entry: Be :: DMA address 365 366 0lC3' ED 43 020A" setuma: Id (sehdma) .bc 367 DIU' e9 ret 360 369 ; i Sectran - Sector Translate. 370 371 Entry: Be Sector number~ , 0 <:: BC < Sectors per Track

p 372 DE Single byte shew taLJle address "'0 373 "'0 374 Ex it: HL Be if DE 0 (1) 375 L (DE+BC) if DE <> 0 ::J 376 H B wlli cll bet tel- be zero a.

377 X 378 OIC13' 69 sectrn: III I,c ;set untranslated sector ::r:

}> XEROX 820-11 8IOS MACRO-80 3,44 09-0ec-tll -0 CPIM Det} lock inu [J /' i ver' -0 /'I) 379 01C9' 6(J Id h,b :J 380 OleA' 7A Id a,d 0-

381 0lC8' B3 or e >< 382 01CC' C8 ret z ; if no translate table I 383 OICO' EB ex de,hl

384 DICE' 09 add hl,bc 385 01Cf' 6E Id I, (h 1) ;single byte translate 386 OIDO' 60 Id h,b 387 OIDI ' C9 ret 388 389 , . Rdwrs - Read or Write Single Density. 390 391 0102' JA 02AE' rdwrs: Id a,(readop) ;set read/write operation 392 0105' 21 0203" Id hl,sekcmd ;set seek request 393 0100' IU 07 jr rdwrhs ienter rllad/write dispatcher 394 395 , , Readhs - Read Host Sector. 396 397 OIDA' 3E 01 readlls: Id a, I ;set read operation 398 skip $+2 ; jump over wri te entry point 399 OIOC' 26 + db 26h 400 401 , , Wr i ths - Write Host Sector. 402 403 DIDO' AF wri tllS: xor a ;set write operation 404 OIOE' 21 0213" Id hl,llstcmd 405 406 , , Rdwrhs - Read or Wr it e Hos't Sector, 407 408 Entry: HL Physical command I'eques t address 409 A 0 to wr i te 410 A I to read 411 412 Exit: A 0, if no errors 413 A - 1 • if errors 414 Z condition of A reg 415 '116 OlE I' 77 rdwrhs: id (h I) ,a ;set driver operation 417 0lE2' CD 020f' ca II xdr ;execute drive.- read or write 410 0lE5' 21 02BE' Id hl,erflag ;mer'ge error flag for directory protection 419 0lE8' B6 or (h I ) 420 DIE9' 77 Id (h I) ,a 421 OlEA' C9 ret ~22 423 . , Read - Read CP/M Sector. 424 425 Entry: Seldsk, Settrk, Setsec, Setdma previously ca I led 426 427 Exit: A 0 if no e,','ors 420 A -I if e,'r'or's 429 430 OIEB' AI' read; xor a ;clear una II oc processing 431 OIEC' 3') 0226' Id (unacnt),a 432 OIEf' UE 00 Id c,wrall ; i nh i bit buffer flush after read 433 o If I' :JC inc a ;set ,'ead operation

I 434 skip $+2 lD

I XEROX 820-11 BIO'> MACRO-IlO 3.44 -" CPIM Deblockinv 0, ive, a

» -0 -0 m ::J a.. >< I

435 436 437 438 4:39 <140 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 46:l 404 465 466 467 408 469 470 471 472 473 474 475 476 477 478 479 480 481 48;: 483 484 485 486 487 488 489 490

0lF2'

0lF3'

0lF4' 0lF7' 0lF8' OIFB' OIFE ' 0201 ' 0204' 0205' 0207' 020S' 0209' 020C' 020F' 0210' 0212' 0213' 0216' 021B' 021A' 0216' D21C' 021F' 0222 ' 0225' 0226' 0227' 022B' 022A' 0226 ' 022E' 0231 ' 0234' 0237' 0239 ' 023C' 023D' 0240' 0241 ' 024::1'

AF

32 02AE' AF 32 02BE' 2A 020C" 22 0208" :3A 029B' 67 28 CB F6 00

F2 0212' 3A 0206" B7 28 CO 79 ~j2 02BA' FE 02 20 OB ::IE 00

32 0226' 11 020E" CO 0206' ,iE 00

67 28 2E .HJ 32 0226' 'LI 0205" II 020E" CD 02CC' :W 16 'LA 0211" 2 :1 22 0211" II 0000

EO 52

+

09-Dec-81

dLJ 261,

; ; Write - Write CP/~ Sector.

Entry: Seldsk, Settrk, Setsec, Setdma previously called

Ex it: A 0 if no errors A -I if errors C Write type

write: xo,' a ;set write operation

Rdwr - Read or Write.

rdwr:

trkzfl

rpb

writl: unacnt

Entry:

Id xor Id Id Id Id or jr or equ jp Id or jr Id Id cp jr Id equ Id Id ca II Id equ or jr dec Id, Id Id ca I I jr Id inc Id Id

dpUdd'" equ sbc

A A

o to write to read

(readop),a a (erflag),a hl,(seksec) (sekhst),hl a,(secmsk) a z,rdwrs o $-1 p,rdwrl a,(sektrk) a z, ,'dwrs a,c (wrtype),a wrual nZ,writl a,O $-1 (unacnt),a de, unarJsk. cpb a,O $-1 a z,writ4 a (unacnt),a hl,sekdsk de,unadsk CIllP

nZ,writ3 hi, (unasec) hI (unasec).hl de,O $-2 hI, de

iset read/write switch ireset error flag

iset seek host sector

iset sector size

iif deblocking not required icheck track zero single density flag

iif track zero not single density iset seek track

iif track 0, read or write without deblocking isave write type

;if not write to unallocated group iset records per block

istart counting unallocated writes iset unal located parameter block address iCOPY parameter block iset remaining unallocated sectors

iif not processing unallocated group

iupdate unallocated sectors remaining ;set seek parameters iset unal located parameters icompa,'o parameter blocks iif not seek to unallocated sector ;advance unal located sector

;set sectors per track

):> "0 "0 ttl ::l a. x I

I ..... .....

XEROX 020-11 BIO~ MACRO-80 3,44 CPIM Deblocking [Jr-ive,'

491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 ti07 500 509 510 511 512 513 514 515 516 517 510 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 5:lti 536 537 538 539 540 541 542 543 544 545 546

0245' 0247' 024A' 024[J' 024E' 0251 ' 0252' 0254' 0255' 0250'

0259' 025C' 025f' 0262' 0264' 026b' 0260' 02GA' 026D' 026E' 026f' 0271 ' 0274 ' 0276' 0279' 027e' 027f' 0281 ' 0284' 028 '/' 02BA' 020t:!' 020e' 0280' 0290' 0291 ' 0294' 0291' 029A' 029U' 029C' ()29() , 029E' 02AO' 02A l' 02A:.? ' 02A5' O"Ao' 02AA' 02AD' 02AE' 02AF' 020lJ'

20 OA 22 0211" 2A 020F" 23 22 020F" AF HI 05 Af 32 0226' 3C

J2 028B' 3A 0290' 2A 020C" CO 3C CO 10 CO 3f 20 f8 22 0208" f6 00

JE 01 32 026E' 28 OE 21 0215" 1 I 0205" CD 02CC' 28 16 CD 02C2' 1 I 0215" CD 0206' JE 00

87 C4 OIDA' 87 <:4 014F' :32 02C3' ClA 020C" E6 00

1 f 5"1 JE 00 1 f 5f 2A 021A" 19 ED 50 020A" 01 0080 :lE 00

H7 20 05

09-0ec-UI

j " Id 1d inc Id

jr writ3: xor

Id w,'it4: inc

nZ,w"it2 (unasec),hl hl,(unatrk) hi (una t rk) ,11 I a rwop'er a (unacnt),a a

if not end of track reset to sector zero advance unal located track

,mark pre-read not required

,clear unallocated processing

imark pre-read required

Rwoper - Read or Write Operati6n Proper,

rwoper: Id Id Id

rwopl: 51'1

rl' sri jr Id or

hstact equ Id Id jl' Id Id ca II jl' ca II

rwop2: Id ca II Id

I'stlag equ or ca II or ca II Id

rwop3: Id and

secmsk equ rra Id Id rra Id Id add Id ld Id

readop equ or'

j "

(I'sflag),a a,(secmsk) hi, (seksec) h I a nZ,rwopl (sekl1st),hl o $-1 a,l (hstact),a z,rwop2 hl,hstdsk de,sekdsk cmp z,rwop3 flush de,hstdsk cpb a,O $-1 a nZ,readhs a nZ,clract (hstwrt) ,a a, (se),sec) o $-1

d,a a,O

e,a hi ,(hstdma) 111,de de,(sekdma) bC. 128 a,D $-1 a nz, r'wop4

iset pl'e-read block flag iset shift countel'

;compute host sector

;if shift incomplete iset seek host sector icheck host active flag

cpmsec/(2**sekmsk)

;host buffer always becoms active ;if host buffel' was not active ;set active host buffer identification ;set seek identification ;compare seek request with active host sector ;if host buffer contains seek sector ;flush buffer if previously written ;set host request block address ;copy seek parameter block to host ,check pre-read required

;read host sector if preread required

;clear host buffer active if read errors ;mark buffer not written into ,set seek sector ;form host buffer index from sector mask

,multiply index by 128 bytes/sector

;set host buffer address ;form seek buffer address ;set user transfer address ;set CP/M sector length ;set transfer direction

;if read operation

I XEROX B20-11 BIO~ MACRO-BO 3.44 09-0ec-Ell ....... CP/M Oeulockino 01 lVt:'" N

547 02B2' EB ex de,hl ,switch directions 54B 02B3' :H: inc a 549 02B4' 32 02C3' Id (hstwrt),a ,mark buffer written into 550 02B7' EO BO rwop4: Idir ;move sector to/from user buffer 551 02B9' ::IE 00 Id a,O ,set ~Iri te type 552 02BA' "jrtype equ $-1 553 02BB' FE 01 cp wrdir 554 02B[l' 3E 00 Id a,O ,set error flag 555 02BE' erflag equ $-1 556 02BF' CO ret nz 557 02CO' B7 or a 55B 02( I' CO ret nz ,if errors, do not clobber directory 559 560 , , Flush - Flush buffer to diSk. 561 562 02(2 . 3E 00 flush: Id a,O ,check host written flag 563 02C3 . hstwrt equ $-1 564 02(4' B7 or a 565 02(5' (4 DIDO' ca II nZ,wriths , if buffer written into, write host sector 566 02(8' 32 02(3' ld (hstwrt),a ;clear host written flag if no errors 567 02(8' C9 ret 560 569 Cmp - Compare Paramater Blocks. 570 571 Entry: HL Parameter block 572 DL Parameter block 57;'1 574 Ex it: Z Set if parameters identical 575 Z Clear if parameters different 576 577 02C(' 06 05 cmp: Id b,5 ,set length of parameter block 578 02CE' lA cmpl: Id a, (de) ,compare next byte 579 02CF' AE )lor (h I ) 500 020U' CO ret nz ,if parameters different 501 0201 ' 13 inc de 582 0202' 23 inc hI 583 0203' 10 F9 djnz cmpl , if more bytes 504 0205' (:9 ret 585 586 i i Cpb - Copy Parameter Block, 587 588 Entry: DE Address of Unallocated or Host parameter block 509 590 Ex it: Seek parameter block copied into block at DE 591 592 0206' 21 0205" cpb: Id III ,sekdsk ;set .source parameters 593 0209' 01 0005 Id bC,5 ;set block length 594 020(' EO BO Idir ;copy parameter block 595 02DE' C9 ret

» 596 '0 597 ; ; Xdr - E)lecute Driver Reques t . '0 59B tt> 599 Entry: ttL = po,inter t) Physical Driver Request Block :l 600 a.. 601 Ex it: Physical Driver exit condition are maintained if X 602 no errors or user did not request warm start, I

» XEROX 820-11 BIOS MACRO-OO 3,44 09-Dec-!Jl -0 CPIM DetJlockinu 0, i ve r~ -0 t'D 603 :J 0.. 604 02DF' 22 D2EA' xdr: Id (xdra),hl ;save f'equest for retrys

605 02E2' 2A 02EA' xdr 1: Id hl,(xdra) ;restor~ request address X 606 02E5' CD F02A ca II Xqdvr :execute physical driver I 607 02EO' 47 Id b,a ;save read/write error status

600 02E9' 3A 02EA' Id a,(xdra) ;get driver operation 609 02EA' xd,-a equ $-2 610 02EC' 4F Id c,a ;set message index 611 02ED' 3C inc a 612 02EE' :w 05 jr nz, xd,-2 :if not select request 613 02FO' 65 or I 614 02F I' 64 or h 615 02F2' CO ret nz :if dpll address returned by driver 616 02F3' 1 U 03 jr "dr3 617 02F5' 78 xdr2: Id a ,l) :set recHI/wri te error status 610 02F6' B7 or a 619 C2F7' C8 ret z :if no read/write errors 620 02F8' 2A 02EA' xdr3: Id hi, (xdra) :put drive name in message 621 02F6' 23 inc hi 622 02FC' 2:3 inc hI 623 02FD' 7E Id a, (h I) 624 02FE' C6 41 add a, 'A' 625 0300' 32 0330' Id (xdrb),a 626 0303' DC inc c 627 0304' 2[] OC jr nZ,xdr4 ;if not select request 628 03U6' CD 0375' ca II pmsgi 629 0309' 5:3 65 6C 65 db 'Select',O 630 030D' 6:3 74 00 6:31 0310' 18 16 jr xd,-6 632 0312' 00 xdr4: dec c 633 0313' 2U 06 jr nZ,xdr5 : if not write request 634 0315' CD 0375' ca II pmsgi 635 0318' 57 72 69 74 db 'Write' ,0 636 031C' 65 00 637 031E' 18 08 jr xdr6 638 0320' CD 0375' xdr5: ca II pmsgi ;must be read request 6:39 0323' 52 65 61 64 db 'Read' ,0 640 0327' Ul)

641 0328 ' CD 0115 ' xdr6: ca II p rns 9 642 032B' 2(] 45 7L. 72 db Err 643 032F' 2U 644 033U' b4 3A 20 xdrb: db 'd: 645 0333' 41 20 63 63 db 'A(ccept), 646 0337' b5 70 74 29 647 033B' , 2C 20 648 033D' 49 28 67 6E db 'I(gnore). 649 0341 ' uF 72 65 29 650 0345' £C 20 651 0347' 52 28 65 74 db 'R(etry) 652 034B' 72 79 29 20 653 034F' ilO db 0 654 0350' CD 0009' ca II bconin ;read char'acter from console 655 0353' F5 push af 656 0354' CD 01 15' ca II pmsg

I ()57 0357' no db cr -" 658 0350' 5218 dw de II in W

I XEROX B20-11 BIOS MACRO-BO 3.44 CP/M OeblockillU 0, iver

» "'0 "'0 it) ::J 0.. >< I

659 660 661 662 663 664 665 666 667 66B t)09 670 t)71 672 673 674 675 676 677 678 679 680 t)1l1 682 683

035A' 035C' 0350' 035E' 035F' 0361 ' 036:j' 0365' 0367' 0360'

\ 036A' 0360' 036E'

036F' 0372 '

0375' 0378' 037A' 037C 037D'

OB 00 07 6F F I E6 5F FE 03 :!B OA 06 49 CB ot) FB C2 02E2' 2F (9

CD 01A5' C3 0003'

CD 0115' llO OA 4518 00 C3 0115'

09-D"c-BI

db Id Id pop and cp jr sub ret slIb jp cpl ret

xdr7: ca II jp

pmsgi: ca II db dw db jp

subttl paU e

up,O h,a ;zero dpll for' accepted or ignored select errors l,a af 5fh ; ignore parity, case 3 z,xdr7 ;if warm start requested ' I ' Z ;if user ignored error, don't te II BOOS 'A' - , I ' nZ,xdrl ;retry request

cad ;clear active disk bwboot

pmsg cr, If ins lin 0 pmsg

Deblocker Storage Area

I ..... Ul

XEROX HZO-II BIOS Deblocker Storaue Ar·ea

684 685 686 687 688 689 0000 690 0380' 691 692 693 694 695 696 697 698 699 700 701 702 703 7U4 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 0000" 730 731

MACRO-80 3.44 09-Dec-81

reser've rnacro s,n s equ $+.

aset .-tn endm aset 0 dseg

; ; Host Sector Deblocking Buffer.

rese.rve hstbuf,512

Physical Driver Select Command.

reserve selcmd,3

; ; Seek Sector

reserve sekcmd,l reserve sekunt,l reserve sekdsk, I reserve sektrk,2 reserve sekhst,2 reserve sekdma,2 reserve seksec,2

, . Unal located

reserve unadsk,l reserve unatrk,2 reserve unasec,2

iselect command, unit, drive

Parameter Block.

;kindly leave these bytes

alone

Sector Parameter Block.

;kindly leave these

Host Sector Parameter Block.

reserve hstcmd, I reserve hstunt, I reserve hstdsk, I reserve hsttrk,2 reserve hstsec,2 reserve hstdma,2

;kindly leave these bytes alone

Disk Parameter Header Addresses.

reserve dphtab,('P'-'A'+I)*2

cseg

end

I XEROX B20-11 fllOo, MACRO-BO :1.44 09-0ec-BI -" Del)locker Sto"clue AI"ea 0\

Macr'os: RESERVE SKIP

Symllols: 02:3C 0009' BCONIN OOOC' BCONOT 0006' BCONST OEOO BOOSLN 001S' BHOME 0000' BIOS OOOF' BPRINT 0020' BPRNTS 0012' BPUNCH 0027' BREAO 0015' BREAOR 0030' BSCTRN 001B' BSELO 0024' • BSETO 0021 ' BSETS DOlE' BSETT 0003' BWBOOT 002A' BWRIT 01A5' CAD 01B4' CADI OOF 1 ' CBOOT OSOO CCPLEN 0004 CDISK 014F' CLRACT 02CC' CMP. 02CE' CMPI F04E CONIN F051 CONOUT F04B CONST 02D6' CPB 0000 CR 013F' OBOOT 014B' DBT2 521B DELLI 1'1 0138' DMABAS 0241 ' DPBAOR 021C" OPHTAB 02BE' ERFLAG 001B ESC 02C2' FLUSH 01B6' HOME U2fiE' HSTACT 0000" HSTBUF 0213" HSTCMO 021A" HSTOMA 0215" HSTOSK 021S" HSTSEC 0216" HSTTRK 0214" HSTUNT 02C3' HSTWRT 0033' INITIO 451B INSLIN OOOA LF F054 LI ST F057 LI STST 0121 ' MLS 0130' MLSI 0132' MLS2 FOOD MONITR 002C NSECTS 0115 ' PMSG 0375' PMSGI F060 PUNCH 01F4' RDWR 0212' RDWRI OlE 1 ' ROWRH5 D1D2' ROWRS 01EB' READ F05D READER 0IDA' REAOHS 02AE' READOP 0062 REV 021B' RPB 028B' RSFLAG 0262' RWOPI 02S4' RWOP2 0297' RWOP3 02B7' RI'IOP4 0259' RWOPER OODO' SECCNT 029B' SECMSK 01CS' SECTRN 0203" . SEKCMO 020A" SEKDMA 0205" SEKDSK 020S" SEKHST 020C" SEKSEC 0206" SEKTRK 0204" SEKUNT 015A' SELl 0160' SEL2 01S3' SEL3 01A5' SEL4 0200" SELCMD 0154' SELDSK 011:3' SETDMA 01BE' SETSEC 01B9' SETTRK OUOC' SPT 0133' TRANSZ 0208' TRKZFL 0226' UNACNT 020E" UNADSK D211" UNA SEC 020F" UNATRI\ OOOB UP 0069' WBOOT OOBO' WBT1 00B6' WBT2 OOOS' WBT3 00E6' WBT4 0034' WBT5 0050' WBTCOM 0058' WBTERR oono WRALL 0001 WRDIR 0225' WRITI 0251 ' WRIT2 0254' WRIT3 0258' WRIT4 01F3' WRITE OIDD' WRITHS 02BA' WRTYPE 0002 WRUAL 020F' XDR 02E2' XDRI 02F5' XDR2 02FS' XDR3 0312' XDR4 0320' XDR5 0328' XDR6 036F' XDR7 02EA' XORA 0330' XDRB » 0122' XLATE F02A XQDVR

-0 -0 it) ::J a.. No Fatal e rr'o I" (s ) )(

I

);. 689# b95 b95# 695 699 699# 699 703 703# 703 704 704# U 704 705 705# 705 706 706# 706 707 707# 707 708 708# U 708 709 709# 709 713 713# 713 714 714# 714 715 715# (I) 715 719 719# 719 720 720# 720 721 721# 721 722 722# :J a. 722 723 723# 723 724 724# 724 728 728# 728

>< 8CONIN 14# 65 654 BCONOT 15# 167

I BCONST 13# BDOSLN 37# 40 46 55 71 BliOME 20# BIOS 10# 46 55 7 I 115 BPRINT 16# BPRNTS 28# BPUNCi-\ 17# BREAD 25# BREADR lB# BSCTRN 29# BSELD 21# 73 BSETD 24# 118 BSETS 23# 113 BSETT 22# lOB BWBOOT 11# 52 674 BWRIT 26# CAD 333# b73 CADI ::137 341# CBOOT 10 146# CCPLEN 38# 40 55 71 CDISK 39# 54 231# 333 CLRACT 266u 529 CMP 483 519 577# CMPI 578# 503 CONIN 14 2ll3u CONOUT 15 204# CONST 13 202# CPS 474 523 592# CR 222u b57 677 DBOOT 67 256# (JBT2 260u 262 DELLlN 226# b58 DMABAS 72 134 138 192# DPBADR 315 489# DPI-HAB 250 279 728# ERFLAG 410 454 555# ESC 223u 225 226 FLUSli 521 562u HOME 20 346# HS1ACT '167 51::1u 515 I-ISTBUF 256 ()95#

I

I HSTCMD 404 719,(t -A ~ISTDMA 257 539 724,(t 00 ~jSTDSK 517 522 72 \,(t

HSTSEC 723,(t HSTTRK 722,(t HSTUNT 720,(t ~ISTWRT 530 549 563,(t 566 INITIO 3\,(t INSLlN 225,(t 678 LF 22(),(t 677 Ll ST 16 205# LI STST 28 206# MLS 82 111 172# MLSI 180 183# MLS2 176 185# MONITR 200,(t 202 203 2D4 205 206 207 208 NSECTS 40# 69 PMSG 61 146 160# 168 641 656 676 680 PMSGI 628 6:.J4 638 676# PUNCH 17 ~[J8#

HOWR 452# ROWRI 462 4b6,(t ROwRIiS 393 416,(t ROWRS 391,(t 459 465 READ 25 119 430# READER 18 207,(t REAOHS 397# 527 READOP 391 452 544# RESERVE 685,(t 694 698 702 703 704 705 706 707 708 712 713

714 718 719 720 721 722 723 727 REV 4\,(t 152 RPB 320 471# RSFLAG 504 525# RWOPI 507,(t 510 RWOP2 516 522# RWOP:.J 520 5:31 # RwOP4 546 550# RWOPER 497 504,(t 5ECCNT 70 123# 12~ SECMSK 326 457 505 533,(t SECTRN 29 378# SEKCMD 392 70:JoIt SEKDMA 366 541 708# SEKOSK 277 334 481 518 592 705# SEKHST 456 511 707# SEKSEC 359 455 506 531 709# SEKTRK 352 463 706# SEKUNT 704,(t SEll 279# 191

» "'0 "'0 It> ::J a. X I

» SEL2 283 :<92 ... "U SEL3 289 308 ... "U SEL4 307 329 ... I'D SELCMD 293 b99# ::J SELDSK 21 276# Q. SETDMA 24 36G# )( SETSEC 23 359# I SETTRK 22 352#

SKIP 243# :398 434 SPT 92 131 # 178 TRANSZ 84 186# TRKZFL 324 461# UNACIH 431 472 476# 480 499 UNADSK 473 402 713# lJNASEC 485 487 492 7Hi# UNATRK 493 495 714# UP 221# 659 wBaaT II 66# WBTI 101 104 106# 142 WBT2 110# 132 WBT3 117 127 ... wBT4 136 ... 137 WBT5 45# 126 WBTCOM 56 ... 50 WBTERR 48 ()\# 76 121 wRALL 235 ... 432 WRDIR 236# 553 WRITI 469 475# WRIT2 491 496 ... WRIT3 484 498# WRIT4 478 500# WRITE 26 445# WRITHS 403 ... 5G5 WIHVPE 467 552# WRLJAL 237# 460 XDR 298 417 604# XDRI 605# 669 XDR2 612 617# XDR3 616 620# XDR4 627 6J2# XDR5 633 638 ... XDR6 631 (-i:j 7 641# XllR7 665 673 ... XDRA 604 605 6DB 609# 620 XDRB 625 644 ... XLATE 79 173 ... XQDVR 2JO ... "U6

Notes

H20 Appendix H

» "0 "0 ttl :::J a.. ><

Banked Phy!;Ical 0, ive,-

I 2 3 4 5 6 7 8 9

10 11 12 13 14 15 16 17 lB 19 20 21 22 23 24 25 26 27 20 29 30 31 32 33 34 35 36 37 3B 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

i j

MACRO-BO 3.44 09-Dec-81

Title Banked Physical Driver

Banked Physical Driver

Copyright (C) 19B2, Balcones -Computer Corporation

Transferred to Public Domain - (PO) 19B3

After executing this program by entering BANK x:(where x is any valid CPIM (Jisk drive A-P). The BANK program wi II load a physical disk driver into memory. This phy!;ical driver is executed when drive x: is accessed by CP/M. This particular disk driver will map normal CP/M files onto the address space of the alternate memory bank (bank 0) in the 820-11.

This utility demonstrates the flexibility of the logical to physical diSk mapping in the B20-11. The BANK program moves the physical disk driver up to high memory. It then updates the entry for drive x: in the logical to physical disk drive mapping table telling the system to use physical disk driver #3 when CPIM requests service from drive x:.

The execution address of the BANK driver is then placed in entry #3 of the physical disk driver address table.

If BANK is executed by entering: A>BANK P:

Then doing a A>DIR P: would display tile following directory:

BOOT .ROM OPTION .ROM SCREEN .MEM

Entering: A>STAT P:*.* will display the following:

Recs 64

256 16 24

Bytes 12k 32k

2k 4k

Ext Acc 1 RIO 1 R/W

R/W R/W

Bytes Remaining On P:

P:BOOT.ROM P;EXPAND.RAM P: OPTION. ROM P:SCREEN.MEM Ok

EXPAND .RAM

The files map to the fol lowing memory addresses in bank 0:

BOOT.ROM EXPAND. RAM OPTION.ROM SCREEN.MEM

0000h-2fffh 400otl-bfffh 17ffh-1 fffh 3000h-3bffh

The BANK program can also be a very useful tool in that after it has been executed a high level language program can access it-ems in ttle alternato memory bank as disk files on drive Xl

Of particular interest is the file SCREEN.MEM, notice that it is 24 records long. Each record (12B bytes) corresponds to a line Oil the CRT (only the first BO bytes of each record are in the display window). The first record of the file corresponds to the first I ine of the CRT on I y if tt,e CRT has not been

Banhed Pllysical [Jr iver-

57 58 59 60 61

MACRO-80 3.44 09-Dec-Bl

per-mitted to scroll since the last clear screen command was sent to it.

Subttl page

Constants & Program Mover

» BallktHJ Physical Driver MACRO-80 3.44 09-0ec-81 "tl Constants 8- P,-oUfalll Movtlr -0 t1) 62 :J 63 • Q.. 64 fOOO Monitr equ OfOOOh ;Base address of resident monitor )( 65 F033 Xcrtlllv equ lIIonit,-+33h ;Crt <-> Ram Move LDIR Simulator

66 f036 Xgetsl equ lIIonitr+36h ;Get c1rlver select table address to hI 67 68 ff3C Bava I I equ Off3ch ;Pointer to beginning of available memory 69 ff3E Eava i I equ Off3eh ;Pointer to end of available memory 70 7 I 0005 bdos equ 5 72 005C dfcb equ 5'ch 73 74 fA80 drvadr equ Ofa80h ; add,-ess for Bank driver 75 0000 stack equ 0 76 77 .<:UO 78 79 0000' Aseg 80 Org 100h 81 0100 18 5A jr loadit 82 83 0102 43 6f 70 79 db 'Copyright (Cl 1982 Batcones Computer Corporation' 84 0106 72 69 67 68 85 OIOA 74 20 28 43 86 OIDE 29 20 31 39 87 0112 38 32 20 42 88 0116 61 6C 63 6f 89 OIIA 6E 65 73 20 90 011 E 43 6f 60 70 91 0122 75 74 65 72 92 0126 20 43 6f 72 93 012A 70 6f 72 61 94 012E 74 69 6f 6E 95 0132 2U 54 72 61 db Transferred to Public Domain - (PO) 1983' ,26 96 0136 6E 73 66 65 97 013A 72 72 65 64 98 013E 20 74 6f 20 99 0142 50 75 62 6C

100 0146 69 63 20 44 101 014A 6f 60 61 69 102 Ol4E 6E 20 20 20 103 0152 28 50 44 29 104 0156 2f1 31 39 38 105 015A 33 IA \06 107 108 015C CD 0308 ioadit; ca II req822 ;see if machine is 820-11 109 015F 3A 005C Id a, (dfcb) 1 I 0 0162 87 or a III 0163 20 30 jr <:,bnk us 9 112 0165 f5 push af 113 0166 CD U3f8 ca II ckspac :see if room for driver 114 0169 f I pop af 115 Ol6A 3D dec a 116 OlbB 4f Id c,a

W

~ Bdllkt".! PI.ysical 0/" i v t! f" MACRO-BO 3.44 09-Dee-B1 COllstallts & Pf'U~1 dill Mover

117 016e 21 0259 Id hl,driver lIB 016F 11 FABO Id de,banked 119 0172 05 push de 120 0173 C5 pusl. bc 121 0174 01 017F Id bC,drvlen 122 0177 ED BO Idir 123 0179 26 00 ld h,O ; i nd i ca t e re9ister return 124 0176 CD F036 ea II XGetsl ;get select table address 125 O17E C 1 pop bc 126 o 17F E5 push hi 127 01BO 09 add hl,bc 128 0181 09 add hi ,bc 129 0182 36 03 Id (h I) ,3· 130 0184 23 inc hi 131 0185 36 00 Id (h I) ,0 132 0187 El pop hi 133 0188 11 0026 Id de,2*16+3*2 134 018B 19 add hi ,de 135 018C 01 pop de 136 018D 7J Id (h I) ,e 137 o JOE 23 inc hi 13B 01BF 72 Id (h I) ,d 139 0190 OE OD Id c,13 140 0192 C3 0005 jp bdos 141 142 0195 11 0190 bnkusg: Id de , bnklllsg 143 (J198 DE 09 Id c,9 144 019A C3 0005 jp bdos 145 146 OHlD 55 73 61 67 tll.klllSg: db 'Usage: BANK x:$' 147 DIAl 65 3A 20 42 148 OlA5 41 4E 4B 20 149 0lA9 7B 3A 24 150 151 01AC ds 200h-103h-($-loadit),-1 152 0259 driver": 153 .phase Drvadr 154 155 Subttl Bank Driver 156 page

)::. Banked Physical Dr; Vel" MACRO-80 3.44 09-Dec-81 0 Bank Driver 0 ttl 157 :J 158 0-

159 FA80 7E bankeej: Id a, (I) I) ;get driver op >< 160 FA81 4F Id c,a 161 FA82 L3 inc hI 162 FA83 3C inc a 163 FA84 28 51 jr z.,selbnk ;if select op 164 FA86 L3 inc III 165 FA87 L3 inc hi 166 FA88 56 Id d, (I) I) ;set track 167 FA89 23 inc hI 168 FA8A L3 inc hi 169 FA8B 7E ld a, (I) I) ;set sector 170 FAilC OF I-rca 171 FA8D ~)F Id e,a 172 FA8E 23 inc hi 173 FA8F 23 inc hi 174 FA90 7E Id a, (h I) ;set transfer address 175 FA91 23 inc hi 176 FA92 66 Id I), (h I) 177 FA93 bF Id 1,5 178 FA94 06 00 Id b,O ;preset crtldir op 179 FA96 7C Id a,h 180 FA97 FE CO cp OcOh 181 FA99 30 01 jr nC,bankl ; if transfel- outside banked area 182 FA9B (J5 dec b i set ram->crt 183 FA9C 79 bankl: Id a,c ;set read/write op 184 FA9D 67 or a 185 FA9E La 02 jr z.,bank2 ; if write 186 FAAO 06 01 ld b,l ;set crt.->ram 187 FAA2 C5 bank2: pllsh bc ;save direction op 188 FAA3 B2 or d ;check directory track 189 FAA4 FA FAC8 jp m,bank6 ; if di r"ectory operation 190 FAA7 FE 30 cp 030h 191 FAA9 79 Id a.c ;set read/write switch 192 FAAA 01 0080 Id bC. 128 193 FAAO 3B 05 jr c,bank3 ; if not within screen memory 194 FAAF B7 or a 195 FABO 20 05 jr nz.bank4 ;if read 196 FAB2 DE 50 Id c,80 ;only write one line 197 FAB4 " B7 banl<3 : or a ;test read/write 198 FAB5 28 01 jr z,bank5 ; i f write 199 FAB7 EB bank4: ex de,hl ;set read 200 FAB8 F 1 bank5: pop af ;get mover op to A 201 FAB9 EP 73 FAC4 Id (stksav) ,sp ;use high stack 202 FABP :n 0000 Id sp.stack 203 FACO CO F033 ca II Xcrtmv ;move it to/from crt bank 204 FAe3 :n 0000 Id sp.O 205 FAC4 stksav equ $-2 206 FAC6 AF xor a ;always succeeds 207 fAC7 C9 ret 20B FAC8 11 FAPB bank6: Id de,Dil-ect ;set directory address 209 FACB OD dec c 210 FACC 20 01 jr nZ,bank7 ;if directory write L 11 FACE EB ex de,lll

U1

(To

}> "0 "0 ttl :J a.. ><

Banl<Eolcj Ptlysical 0,' Banl< 0,' iver

212 FACF 213 FAD2 214 FAD4 215 FAD5 216 FA06 217 218 FA07 219 FAOA no 221 222

iver

() 1 0080 ED BO F 1 AF (9

11 FB5B C9

MACRO-80 3.44

bank7: ld ldir pop

be,801l

af xor a ret

selbnk: ld ret

hl,dph

09-Dec-81

;read or re-write directory

Subttl Directory Sector, Opb & Oph page

l:> Balik ",(I PllYS i ca I 0, i v,,..' MACRO-80 3,44 09-0ec-81 J Oi r'ectory Secto, , Opt) & Oph J 1> 22::1 :J 224 :l.. 225 FADn u'O Direct; db 0 K 226 FADC 42 4F 4F 54 de 'BOOT R'

227 FAEO 20 20 20 20 228 FAE4 02 229 FAE5 'IF 40 db 'OM' 230 FAE7 00 00 00 40 db 00,00,00,64 2::11 FAEB 01 02 03 04 db 01,02,03,04 ;Bank 0 Memory locations OOOOh-l fffh 232 FAEF 05 06 00 00 db 05,06,00,00 2000h-2fffh 233 FAF3 00 00 00 00 db 00,00,00,00 234 FAF7 00 00 00 00 db 00,00,00,00 235 236 FAFB 00 db 0 237 FAFC 4F 50 54 49 db 'OPTION ROM' 238 FBOO 'IF 4E 20 20 239 FB04 52 4F 40 240 FB07 00 00 00 10 db 00,00,00,16 ;Bank o ,lAemory locations 17ffh-lfffh 241 \ FBOB 04 00 00 00 db 04,00,00,00 242 FBOF 00 00 00 00 db 00,00,00,00 243 FB13 00 00 00 00 db 00,00,00,00 244 FBI7 00 00 00 00 db 00,00,00,00 245 246 FBIB 00 db 0 247 FBIC 53 43 52 45 db ' SCREEN MEM' 248 FB20 45 'IE 20 20 249 FB24 4D 45 40 250 FB27 00 00 00 18 db 0,0,0,24 251 FB2B 07 08 00 00 db 07,08,00,00 ;Bank 0, Memory locations 3000h-3bffh 252 FB2F 00 00 00 00 db 00,00,00,00 253 FB3::1 00 00 00 00 db 00,00,00,00 254 FB37 00 00 00 00 db 00,00,00,00 255 256 FB3B 00 dl) 0 257 FB3C 45 58 50 41 db 'EXPAND RAM' 258 FB40 4E 44 20 20 259 FB44 52 41 40 260 FB47 01 00 00 80 db 01,OO,OO,80h 261 FB4B 09 OA DB DC (Ib 09,10,11,,12 ;Bank 0, Memory locations 4000h-5fffh 262 FB4F 00 DE OF 10 db 13,14,15,16 6000h-7fffh 263 F853 11 12 13 14 db 17,18,19,20 8000h-9fffh 264 FB57 15 16 17 18 db 21,22,23,24 aOOOh-bfffh 265 266 FB5B 0000 0000 dpl1: dw 0,0,0,0 267 FB5F onoo 0000 268 fB63 FB7F FB6B [iw dirbuf,dpb 269 FB67 0000 FB7B dw o ,a II DC

270 271 FB6B 0002 dpb: dw 2 ;spt 272 FB60 04 OF 01 db 4,15, I ;blkshf, blkmsk, nullmsk 27:3 FB70 0018 0003 dw 24,3,128,0,-8 ;dsw ,di rm, a I I ocOI ,Chksi z, trk off 274 FB74 n080 0000 275 fB78 fFF8 276 FB7A, on db 0 ; 128 byte sector's 277

-....J

00

» "U "U t1) ::J a.. X

Ballked PI~lysical [wiver Dir"ectur'y Secto,", Dpt) & Dpl\

nil F676 £19 f67F 200 201 2B2 017F 2B3 284 285

MACRO-BO 3.44

a I I oc: ds dirbut: ds

. deplldse

4 120

drvlen equ i-driver

09-Dec-Bl

;al location vector ;directory buffer

Sullttl page

System Identification

» Ballked Physical Olivel' MACRO-80 3.44 09-0ec-Bl "U System Identification "U lD 286 ::J 0... 2B7

2BB , , Verify The machine this program is being run by Murphy or >< 2B9 a Xerox B20-I1 290 291 0308 3A FOOO ReqB22: Id a,(monitr) ;make certain system is an B20-1I 292 030B FE C3 cp Oc3h ; stlOu I d be a jump instruction if B20 293 0300 20 00 jr nZ,notii ; i f not give error message 294 030F 2A FOOl Id hi, (monltr+l) ; fo II ow reload monitor jump 295 03E2 7E Id a, (h 1 ) 296 03E3 FE F3 cp Of3h 297 03E5 LO 05 jr nZ,notii ; if interrupts not disabled L9B 03E7 23 inc hI 299 03E8 7E Id a, (h I) 300 03E9 FE DB cp Odbh 301 03EB C8 ret Z 302 03EC E I Notii: pop hI ;pltct. return address 303 03EO II 0434 Id de,msg 304 03FO DE 09 pm5g: Id c,9 305 03F2 CO 0005 call bdos 306 03F5 C~ 0000 jp 0 307 30B ; ; The pointer at Bava i I pOints to the start of free memory, Eavai I 309 points to tl1e end of free memory. This test verifies that there 310 is enough space for this program to fit in this un-allocated memory 311 space. If 50 the Eava i I pointer is updated to the start of the driver -1. 312 If not an error message is sent to the console. 313 314 D3F8 ED 5B FF3C Ckspac: Id de,(bavail) ;get pointer to start of free address space 315 03FC L I FABO Id hl,drvadr ;start of driver 316 03FF B7 or a 317 0400 ED 52 sbc hl,de 31B 040L 38 11 jr c,nroom ;if drvadr < bava i 1 then no space 319 04D4 2A FF3E Id hl,(eavail) ;get pointer to end of available space 320 0407 II FBFF Id de,drvadrTdrvlen 321 040A ED 52 sbc hi ,de 322 040C 38 07 jr c,nroolll ;if driver end > end of eavall then no space 323 040E 21 FABO Id hi, drvadr ;else ,update end pointer 324 0411 22 FF3E Id (eavai I) ,hI 325 0414 C9 r'et 326 0415 II 041A nroom: Id de,nspace 327 041B I B 06 jr pmsg 328 329 041A 46 72 65 65 Nspace: db ' Free memory space in use.$' 330 041E 20 60 65 60 331 0422 6F 72 79 20 332 0426 73 70 61 63 333 042A 65 20 69 6E 334 042E 20 75 73 65 335 0432 2E 24 336 337 0434 54 6B 69 73 Msg: db 'This pr'ogram requires a Xerox B20-II Information Processor.$' 338 0438 20 70 72 6F 339 043C 67 72 61 60 340 0440 20 72 65 71

lO

-' a

» -0 -0 I'D ::l a. X

Bdllke(j Sy,;tem

j41 342 343 344 345 346 347 j48 349 350 351 352 353 354

PlIy,;ical [J, i Vel"

IU"lltiticdliufI

0444 75 69 0448 73 20 044C 58 65 0450 78 20 0454 jO 20 045U 20 49 045C 6f 72 04£0 74 69 0464 20 50 0468 63 65 046C 6f 72

MACRO-EiO 3.44 09-0ec-ElI

72 65 61 20 72 6f 38 32 49 49 6E 66 60 61 6f 6E 72 6f 73 73 2E 24

Subttl Symbol Table end

Banl\tHJ Physical (J,-iv8r­SYllllj() I Tab I e

Macros;

SYlllllols; FBlB ALLOC FAB4 BANK3 FACe BANK6 FF3C BAVAIL 0195 BNKUSG FB7F DIRBUF FI:l5B DPH 017F DRVLEN FOOD MONITR 0415 NROOM 03D8 REQ822 FAC4 STI(SAV

No Fatal error(s)

FA9C FAB7 FACF 0005 03F8 FADB 0259 FF3E 0434 041A FAD7 F033

BANKI BANK4 BANK7 BDOS CKSPAC DIRECT DRIVER EAVAIL MSG NSPACE SELBNK XCRTMV

MACRO-BO 3.44

FAA2 FAB8 FA80 019D 005C FB6B FA80 015C 03EC 03FO 0000 F036

BANK2 BANK5 BANKED BNKMSG DFCB DPB DRVADR LOADIT NOTll PMSG STACK XGETSL

09-Dec-Bl

..... N

l> "tJ "tJ I'D ::l a. X

ALlOC BANKI BANK2 BANK3 BANK4 BANK5 BANK6 BAtlK7 BANI(ED BAVAIL BDOS BNKMSG BNKUSG CKSPAC DFCB DIRBUF DIRECT OPB DPH DRIVER DRVADR DRVlEN EAVAIl LOADlT MONITR MSG NOT! I NROOM NSPACE PMSG REQ822 SELBNK STACK STKSAV XCRTMV XGETSL

26~

181 185 193 195 198 189 210 118 68# 71#

142 111 113

72# 268 20B 268 218 117

74# 121 69# B 1 64#

303 293 318 326 30411 108 163

7511 201

6511 66#

270# 103# 187# 1 ~17 # 199# 200# 208# 212# 159# 314 140 144 305 146# 142# 314# 109 279# 225# 271# 266# 152# 282 153 315 320 323 282# 320 319 324 108# 151

65 66 291 294 337# 297 302# 322 326# 32911 327 291# 218# 202 :W511 203 124

P05ition encoded I--eyboard handler MACRO-SO 3.44

1 2 3 4 5 6 7 8 9 • i

10 1 1 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 OOOU ver 29 30 31

09-Dec-81

Tit Ie Position encoded keyboard handler

Position encoded keyboard handler for the B20-11 & 16/B professional computer.

Copyright 1983 ,(Cl XEROX Corporation

. z80

defl

subttl page

,

This is the stand alone rom addition to the Xerox 820-11 monitor. It is called once during monitor restart and at that time patches the monitor in ram to call the modified k/b,crt,Screenprlnt and printer routines. It then moves in its own SIGNON overlay and jumps into it.

This SIGNON in addition to selecting the disk driver also moves into ram (in the spare driver area) trans laUon tables and code for k/b and printer routines (crt Is run out of rom).

Ther~ is also a RX BOOT overlay which is selected instead of the Xerox one. This loads the national translation ta~les from disk and then Calls the Xerox BOOT.

013

Xerox ROM dependant equates

~ Positioll ellCo{j~d "eytJoal'd I)amll er MACRO-80 3.44 09-0ec-81 tv Xel'ox ROM depel,dallt equates

3L 33 34 .. The following equates are dependant on the revision of the Xerox ROM 35 These are compatible with Ver. 4.02 36 ; 37 1800 rxl984 equ 1800h ;start of rxl984 38 0800 rOlllsiz equ 800h ;size of eprom 39 FOOD 1II0nitr equ OfOOOh ;start of monitor ad jump table 40 FIEC savstk equ x'flec' ;stack save address 41 FFIO ctcvec equ x'fflO' ;counter t I mer interrupt vector 42 FFI8 sysvec equ Offl8h ;vector page 43 FFIA kbvec equ sysvec+2 ;keyboard vector 44 FC5D tca equ Ofc5dh ;start of 4,02 transient command area 45 0002 boffl equ ('A'-'@')*2 ;A command vector in command table 46 0018 boff2 equ ('L'-'@')*2 ; I command vector In command table 47 0019 sioff equ 19h ;sioout vector in monitor table 48 OOOA kboff equ Oah ;offset in k/b int service for patch 49 0010 fcrtof I equ 10h ;fast crt out vector in monitor table 50 0012 crtcall equ 12h ;offset in crt driver for patch 51 F006 const equ monitr+6 52 F009 conin equ moni tr+'9 53 F003 warm equ moni tr+3 54 FOIB select equ monitr+lbh 55 FOIE home equ monitr+leh 56 F024 read equ mon it r+ 241) 57 F03C config equ lIlonitr+x'3c' ;monitor configure routine 58 F03F siordy equ lIIonitr+x'3f' ;sio channel b output ready status 59 f066 idle equ monitr+x'66' ; idl e whi Ie 1/0 pending 60 F06C mntrex equ monitr+x'6c' ;monitor jump table expansion area 61 f06C I<ybdlp equ llIonitr+x'6c' ; low profile keyboard entry address 62 F06F key2 equ mOllitr+x'6f' ;keyboard xlat char entry address 63 F072 key5 equ llIonitr+x'72' ;keyboard without xlat char entry address 64 f075 pllext equ llIonitr+x'75' ;print message after call 65 f078 prboff equ monitr+x'78' ; pl"omt boot entry 66· DI82 crtdl equ 0182h 67 0196 crtd2 equ 0196h 68 0100 grpad equ Idd~1 ;address of set graphics attribute 69 1078 xni ign equ 1078h ;adress of xr signon overlay 70 n060 s igoff eqll 60h :offset of ver value In slgnon 71 IICO xrboot equ IlcOh ;boot a/I address 72 fl67 ml<ey2 equ x'fl67' :keyboard handler entry address 73 FI8F mkey5 equ x' f 18f ' ;return from keyboard and timer Interrupt add 74 F22F Sp,'11 t I equ Of22fh ;patch address for screen print 75 f232 sprnt2 equ Of232h ;return address from RX screenprint code 76 F293 crtoff equ x'f293' ;switch to ram side 17 F339 pl"va t t eqll Of33'9h ; conta,ins address of current set attribute 78 FA62 prompt equ Ofa621) ;4.02 PROMPT 79 FA95 mprmtO equ x'fa95' :4.01 PRMTO 80 FC3D mpnext equ x'fc3d' ;4.01 PNEXT

» 8 I 82 Data Addreses

"0 83 "0 84 EDt:lO bootbf equ Oed80h tl)

::J 85 FOE3 mask equ OfOe311 a.. 86 F091 confg equ Of091h

>< '-

» Pusition encuded ".,ylloard handler MACRO-OO 3.44 09-Dec-81 "0 Xerux ROM tiepe,.ddll t equates "0 (I) 87 F20E spact equ x' f 20e' ::J 88 F319 gold equ Of319h a.. 89 F360 seltab equ Of360h >< 90 F470 fivdpll equ Of470h ~ 91 F700 rigdpb equ Of708h

92 F800 tabled equ 'Of800h: ;space for rx code 93 FAll phytrk equ Ofa llh, 94 FF3C ava i I b equ x'ff3c:' ;bottom available ram memory 95 FF50 intstk equ x'ff50! ;tempory stack address 96 FF54 steprt equ Off54h 97 Ff5C linbuf equ Ott5ch 98 FFAC cursor equ Otfach 99 FFB2 leadin equ Oftb2h

100 FFB3 attl-ill equ Offb3h ; addres's of attributes enabled flag 101 FFB4 chrsav equ Offb4h 102 103 Port addressess 104 . 105 OOlD sysctl equ ldh 106 001C syspio equ lch 107 0005 siodpb equ 05h 108 0010 wd1797 equ 10h 109 001E kbdat equ leh 110 0019 ctcl equ x' 19' ;ctcl port address 111 112 Other Equates 113 114 0081 encntr equ x' 81 ' ;enable ctc command 115 0001 stcntl- equ x' 01' ;stop ctc command 116 0000 revO equ x'OO' ;4.00 Revision Level 117 0001 revl equ x' 0 1 ' ; 4.01 Revision Level 118 0064 rev50 equ 5*100-400 ;5.00 Revision level 119 003C cnfgoff equ x'3c' ;monitor configuration offset 120 0006 cnfbyte equ x'06' ;configuration subroutine byte offset 121 0008 klllp equ x'08' ;configuration bit id for LPKYBD 122 0000 romofs equ x'08' ;PROMPT offset between 4.02 & 4.01 monitor 123 0001 Ipkofs equ x' 01' ;additonal sector required for table storage 124 007B upper equ . z' + 1 ;upper I imi t for alpha test 125 0061 lower equ . a' ; lower Ii mi t for alpha test 126 0020 upascii equ 'a' -' A' ;set to upper case ASCII mask 127 0000 zero equ 0 izera 128 OOFF setflg equ x' f t ' ;set flag 129 130 Equates 131 . 132 0004 c.tive equ 04 133 0006 c.sasi equ 06 134 0001 o. term equ 0001h 135 0300 sasidl equ 300h 136 137 Internal equates 130 139 OU lD rtalll equ 29 ;rigid disk tables sector 1 140 ODIE rtab2 equ 30 .. 2 141 0004 ftabl equ 04 ;floppy .. 1

'- 142 0005 ftab2 equ 05 2 W

'- f'os 1 t i UI' enc o (JtH.I I- eytJuanj lIalid I e I MACRO-!.lO ~ Xel"OX ROM dependant equates

143 0006 144 0000 145 0001 146 0002 147 0003 14B 0004 149 OOIA 150 0018 151 0004 152 0000 153 OOOA 154 155 156

3.44

ftab3 lang I<br"d font prnt I<brdtb c II's esc eat cr If

09-0ec-BI

equ 06 equ 00 equ 01 equ 02 equ 03 equ 04 equ lah equ Ibll equ 0411 equ Odh equ Oah

subttl RX"1984 page

Restart

; 3 ;offset of language no. in index table ;offset of k/b flag in index table ;offset of font flag in index table ;offset of printer flag in index table ;offset of k/b tables in first sector ;clear screen ;escape key ,end of text ;carriage return ;line feed

» Pusition enc orJell heyUua,'d "and I e,- MACRO-80 3,44 09-Dec-81 U RXI984 Resta,"t U ttl 157 ::l a. 158

>< 159 0000' start:

<- 160 .phase rx1984 161 162 ; i RX1984 163 En t roy here from Xerox moni tor- bfore entering SIGNON. 164 165 Input:-166 hi - cmdtab 167 de - se I tab 168 bc - cloc 169 170 171 1800 C5 push bc In 1!:l01 05 push de 173 1802 E5 push hi

/174 1803 21 0000 Id hl,O 175 1806 CO F03C ca II config ;oet monitor configuration 176 1809 7C Id a,h 177 180A FE 00 cp revO 178 180C CA 187E jp z,noload ;skip if below 4.01 179 180F FE 64 cp rev50 100 1811 02 187E jp nC,noload ;s~ip if 5.00 or above 181 1814 21 181A Id hl,rvltbl ;4.01 spring board table 182 1817 FE 01 cp revl 183 1819 28 03 jr z,tbxfer ;skip if 4.01 184 1818 21 1829 Id hl,rv2tbl ;4.02+ spring board table 1!:l5 181 E 11 F06C tbxfer: Id de,mntrex 106 1821 01 OOOF Id bC,jtblsz 187 1824 F5 push af ,save monitor level 10!:l 1825 EO 80 Idir ;append monitor table with Ipkybd jmp vectors 189 1827 00 2A F030 Id j x , (1110 nit r + c n f go f f + 1 ) ;set address at monitor config: 190 182B 00 7E 06 ld a,(ix+cnfbyte) 191 102E F6 00 or kblp ;set low profile bit flag 192 1830 00 77 06 Id (ix+cnfbyte),a 193 1833 F 1 pop af ;recover monitor level 194 195 , , Alter' BOOT commnd vectors 196 197 \ 1!:l34 00 El pop i x ;cmdtab address 190 1036 DO E5 push i x 199 ll130 DO 36 02 3~' Id (ix+boff!) ,low rxboot ;assume 4.01 monitor 200 103C DO 36 03 06' ILl (ix+boffl+l),high rxboot 201 1840 DO 36 18 30' ILl (ix+boff2), low rxboot 202 1844 DO 36 19 06' Id (ix+boff2+1),high rxboot 203 1048 FE 01 cp rev1 ;monitor check 204 184A 28 10 jr z,soout. ;skip if 4.01 monitor 205 184: OD 36 02 45' Id (ix+boffl), low (rxboot+romofs) ;4.02+ monitor boot over addr 206 1850 DO 36 03 06' Id (ix+boffl+1),high (rxboot+romofs) 207 1854 DO 36 10 45' ILl (ix+boff2), low (rxboot+romofs) 208 185!:l DO 36 19 06' Id (ix+boff2+1),high ( ,-xboot+romofs) 209 210 . , A Iter keyboard interrupt service 211

"-111

.n

» u U to :l 0... >< '-

Position t:Hlcodtd

RXI984 Resta,"t

2 I 2 185C 2 I :j 1860 214 1064 215 IU60 216 217 218 219 lOGe 220 1860 221 106E 222 186f 223 1870 224 1073 225 1876 226 1879 227 1876 228 187E 229 107F 230 1800 231 1801 232 1803 233 1804 234 235 236

IH-,ylloanJ 1"lan(11 tHO MACRO-80 3.44

O[) 2A fFIA Soou t : DD :16 OA CD [JD :36 DB 6C DO :36 OC fO

, ,

E 1 D I C 1 C I 21 0552' II fC5D l11 OOEB ED BO C3 FC50 E 1 noload: 01 C 1 ::iE FF A7 C9

09-Dec-OI

Id iX,(kbvec) ;k/b int vector Id (ix+kboff),Ocdh ;CALL operation Id (ix+kboff+I), low kybdlp Id (ix+kboff+2),high kybdlp

Move in RX SIGNON to 0/1 area and execute it

pop III pop de pop bc pop bc ,throw away return address Id hi "",,sign ;roln address Id de,tca ; 0/ I area Id bC,rxsigl ; length Idir jp tca ,GO SIGN ON pop hi pop de pop bc Id a, x 'f f ' ;wrong monitor and a ; load si9non from monitor ret

subt t I ROM resident CRT D,'iver page

Position encoded heylJOard IlaneJler ROM ,'esiLiellt ern 0, iver

237 230 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 250 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 n5 276 277 278 279 280 201 202 283 284 285 286 207 200 289 290 291

1885 1080 100B IBoe 100F 1092 1093 1096 1099 109A 109B 1090 10AO IOA3

10Ab IOA7 10AO 10AA 10AB 10AE lOAF lOBI IOB4 18B7 IOB9 10BB 10BC 10UE 10C I IOC4 IOC6 10C7 10CA 10CB 10CC lOCO 10CE

10CF 1000 1003

2A FFAC 3A FFB4 77 32 F319 3A FFB2 B7 C2 0196 ~jA FOE3 A I 4F FE 20 OA 0196 CO IOA6 C3 0102

E5 79 Eb 00 F5 21 FFB3 5b 20 OA II DIDO '2A F339 ED 52 :W OF 79 CB BF 21 F960 Lli LlOOO ED BI 4F CC 10CF f 1 BI 4F E I C9

2B 01 0000 09

MACkO-OLl 3.44 09-Dee-Ol

Crtdvr - Crt Driver RX Addition.

Rxer·t; Id Id Id ILl Id

hi, (cursor) a,(chrsav) (h I) ,a (gold),a a,(leadin)

or a jp Id

nZ,crtd2 a,(mask)

and c Id c ,a cp jp ca II jp

c,crtd2 fonchk crtdl

;set cursor address ;retrieve character under cursor ;replace character under cursor ;bury balcones gold ;set leadin state

;if processing escape sequence ;get keyboard mask

;if control code :do font translation :go to XR code

Subroutine fonchk does the font .translation for national character sets. entry: C contains the character exit: C contains the translation

Fonchl,: push Id and' pusb Id or jr Id Id sbc jr

fon I; Id

f01l2;

res Id Id cpir Id ca II pop or Id pop ret

hi a,c 10000000b af h'l,attrib (h I ) z,fonl de,grpad hi, (prvatt') hi ,de z,fon2 a,e 7,a hl,fontbl bC,fontsz

e,a z,fntran af c c,a hi

:save cursor posn. ;get char in a :preserve attribute bit

;point to attribute enabled flag ;test if set ;no attribute bit - go do translation ;check if graphics mode ;current attribute mode

:grahics mode - no translate ;here to do translate ;clear attribute bit ;address of exceptions table ;size of exceptions tabl~ :search for char. in exceptions ;restore char to c ; if found do translation ;retrieve attribute bit ;or it in

;retrieve cursor

sir fntran translates font characters entry: (HL) - address+1 of char to be translated in fontbl exit: (c) - translated character

Fntran: dec Id add

hI be,font z 1\ I ,bc

back to byte to be translated size of table add to address of char. to be translated

'--00

» u u it) ::l a... >< '-

Pus it i un enL:ud .... h',yllUar'lJ hand I er ROM ,'esident ern Driver

292 293 294 295 296 297 298 .299 300 301 302 303 304 305 306 307 300 309 310 311 312 313 314 315 :J16 317 318 319 320 321 322 323 324 ~j25

326 327 32B 329 3;W 331 332 333 334 335 336 337 338, 339 340 341 342 343 344 345 346 347

1804 1805

1806 IBD7 1000 1809

1006 lODE 18EI 18E3

IOE5 18E8 18E9 18E::6 18EC 18Ee 18EE 18FO 18F2 IOF5

lBF7 18F9 lBFB 10FC lBFE 1901 1902 1904 1907 1908 1909

19UC 1900 190E 1911 1912 1913

1914 1915

4E C9

E5 C5 7E CB BF

21 F960 111 0000 ED 61 20 07

01 0000 37 EO 42 7E

FE 20 ClO 02 :~E 20 CD 1966 20 00

CB 7F 20 09 4F ]E lB CD 1959 79 CB 6F CD 1959 l:1 EI C3 F232

(5 E5 CD 1914 E 1 C I C9

4F 3A F9A6

MACRO-BO 3.44 09-0ec-81

ld ret

c, (h I) ;get translated value

This routine is called from the Xerox screenprint handler. It picks up the character to be printed from the crt ram, does a reverse font tr3nslate,replaces any control codes with a space, does a printer translate and outputs the character to the printer. entry:- HL - ~ddress of byte to be printed

scrpr't: push push ld res

scrO 1:

Id Id cpir jr

Id scf sbc Id

cp jr Id

scr02: call jr

bit jr Id Id ca II ld res

scr03: call pop pop jp

hI bc a, (h I) 7,a

;byte for printing ;ignore attribute bit ;do reverse font translate

hl,fontbl+fontsz ;point to translates bC,fontsz

nZ,scrOl

bC,fontsz

hl,bc a, (h I)

20h nc, sc,'02 a,2011 potran nZ,scr03

7,a z,scr03 c,a a,esc posout a,c 7,a posout bc hI sprnt2

;search for char. ;not in table ;in table convert to media code ;uffset back to media code

;points to media code

;here with media code ;is it a control code ;no ;yes. substitute a space ;do printer translation ;no translation done. go output char. ;translation done.check escape bit ;escape bit ;not set go output char ;set. save char. ;outplJt an escape ;output routine ;restore char. ;clear escape bit ;print cllar

;return to Xerox code'

Exception print driver - ROM entry point

Rmposend:pllsh push ca II pop pop ret

be hI posend hI bc

Po send - dea I s with cila,-ac t er trans I at i on and escape sequences for the diablo 630

Posend: I d Id

input--- a contains char for output to channel b c,a a,(escsq) ;in an escape sequence?

POo>itioll e"cuLied keyboard handler ROM resident CRT Driver

348 349 350 351 352 :353 354 355 356 :l57 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 :375 376 377 37El 379 :380 381 382 383 384 385 386 387 38B 3B9 390 391 392 393 394 395 396 397 39B 399 400 401 402 403

191B 1919 191B 191C 191 E 192() 1923 1926 1927 1927 192A 192C 192E 1930 1931 1933 19:36 1937 1939 1939 1939 193C 193D 193D 193F 1941 1942 1945 1947 1948 1946 194E 1950 1952 1954 1955 195B 1959 195A 195D 1960 1962 1963 1965

1966 1969 196C 1911t:

B7 20 22 79 FE IB 20 07 CD 1959 32 F9A6 (9

CD 1966 20 00 CB 7F 28 09 4F 3E IB CD 1959 79 CB BF

CD 1959 L9

FE FF 20 06 19 CD 1959 lB 00 79 CD 1959 CD 19B6 2fl 04 :lE FF lB 01 AF 32 F9A6 C9 47 CD F03F CC F066 21l FB 7B OJ 05 C9

21 F97A III 0016 ED Bl CO

MACRO-BO 3.44

posOI ;

pos02; pos03;

pos04;

pos05;

pos06; pos07;

posout; sloxl:

Potran:

09-0ec-BI

or jr ld cp jr ca II Id ret

call jr bi t jr Id Id ca II Id res

a nz,pos04 a,c esc nz,posOl posout (escsq),a

potran nZ,pos03 7,a z,pos02 c,a a,esc posout a,c 7,a

ca I I posout ret

cp jr Id ca II jr Id ca II ca II jr Id jr xor Id ret Id ca II ca.!1 jr Id' out ret

Offh nz,pos05 ale posout pos06 a,c posout poesc nz,pos06 a,Offh pos07 a (escsq) ,a

b,a siordy z, id I e z,sioxl a,b (Siodpbl,a

:yes

;escape char? ;no ;output char ;set escape sequence flag

:not escape char ;dO translation if neccessary ;wasn't neccessary ;escape marker set? ;no

;output escape char

;clear escape marker ;escape marker not set ;no translation ;output char

;escape sequence : 3nj byte? ;no 2nd

:output char

:2nd byte of ~scape sequence :output byte :search escape table for char :not present---2 byte sequence :set sequence for 3rd byte

:end of 2 byte sequence :t0991e escape sequence flag

Potran - dues printer translation if neccessary and returns a flag to indicate if translation has been done. input- a char for translaatlon

Id Id cpir ret

Olltput- a (trans I ated) cl1ar

hi ,prntbl bc ,,Prntsz

nz

Z set if char is translated (otherwise reset)

':print exceptions table' :size of table

:no matcl. - don't translate

..... Positioll encotl"U i·,eylloar-u 11aflLII er' MACRO-OO 3.44 09-Dec-Ol .... ROM ."es l(Jellt CHr Or' i ver' 0

404 196f :W dec hi ;tl-anslate 405 197U () 1 0016 Itl oc,prntsz 406 1973 09 add til , bc ;offset to translation 407 1974 7E Id a, (h I) ;translation byte 400 1975 B7 or a ;if zel~o • requires overstriking sequence 409 1976 20 OB jr nz,ptrOI ;non-zero - go output char 410 ;zero - use next 2 bytes In table as sequence 411 1970 23 inc hi 412 1979 7E Id a, (h I) ;first byte 413 197A Cll 1959 ca II posout 414 1970 3E 00 Id a,OOl1 ;oackspace 415 197f CD 1959 ca II posout 416 1982 23 inc '" ;second byte 417 19U3, AF ptrOI: xor a i set z for return flag 418 1904 7E ld a, (h I) ;get translation 419 1905 C9 ret 420 421 , , Poesc - sear'ches the escape table for a match with the char 422 passed ill a. if found returns with z set otherwise 42:1 z is clear 424 425 1986 21 190f Poesc: Id til, pesctb ;table of escape sequences 426 1909 01 0007 Id bc,esctsz ii size of table 427 190C EO 81 cpir 420 19UE C9 ret 429 4:10 190f 119 OB OC IE pescttl: defb 09h,Obh,Och,1eh, Ith, 16n,Ilh ; 639 daisy printer 431 1993 If 16 11 432 0007 esctsz equ $-lJesctb 433 434 435 , , Function:- to deal with characters form a position 436 encoded keylloard. 437 input:- A cllcll-acter read from PIO 430 CMO/STATUS byte 439 bit 7 -eMD/STATUS byte if set 440 bi t 6 -upstroke flag 441 bit 5 -y axis negative (mouse) 442 bit 4 -x axis negative (mouse) 443 bit 3 -mouse active 444 bi t 2 -ctrl key station active 445 bit I -shift key station active 446 bi t 0 -lock key station active 447 First data byte 440 bit 7 -Always r'eset 449 blts(6-0} -key station or x mouse displacement 450 Second mouse data byte 451 bi t 7 -Always reset 452 oits(6-0) -y mouse displacement

}> 453 454 output:- 1 ) Carry set - - command byte or sequence error

"0 455 2) Carry clear -- translated character returned in A "0 456 (J)

457 1996 2F Pekl1d I: cpl ; cOlllpl ement keyboard byte ::J 0... 450 1997 D5 push de ;sav~ registers

X 459 1990 Hi 00 Id d,zero ;get flags

'-

Position eneodeH key~oard handler HOM resilient CRT D,-Iver

460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 470 479 400 401 482 403 484 485 4116 487 4118 409 490 491 492 493 494 495 496 497 490 499 500 501 502 503 504 505 506 507 500 509 510 511 512 513 514 515

\

199A 199C 199E 19AO 19AO 19AI 19A4 19A6 19AO 19AB 19AD 19BO 19BI 19B2 19B5 19B6 19B9 19BB 19BD 19BF 19C2 19C4 19C6 19C9 19[8 19CE 19DI 19D4 19D7 19D8 19£)9

19DB 190C 19DF 19E2 19E4 19E5

19E6 19E9 19EB 19ED

CB 7F 2!J 17 18 01

7A 32 F9A7 CB 5F 20 05 21 F95D CB OE CD IA66 37 Dl C3 F9B7 5F 21 F9A 7 CB 7E 20 FO CB 5E C2 IA7D CB 76 20 20 CD 19DB 20 D5 Cll 19FF CD IA23 CD IA3D 21 F9A 7 72 A7 10 D6

E5 2 I F953 UI U006 ED BI EI C9

LI F95D CB 5E 2!J B3 21 F959

MACRO-1I0 3.44 09-Dee-8J

bit jr jr

noellar equ peknoe2:ld el1ldb: Id

bit jr Id res

peknoc: ca I I peknocl:scf pekex: pop

jp kypos: Id

Id bi t jr bit jp bit jr ca II jr ca II call call

charout:ld Id and jr

cl1ld,a z,kypos cmdb $ <I,d (cllldstat) ,a mouse,a z,peknoc hi, mstb I xY,(hl} stpctcl

de Ipkext e,a Ill,cmdstat ClOd, (h I ) z,peknoc mouse, (hi)· nz,mice ustrk,(hl) nZ,upstrk ctntst z, peknoc'2 tblsel alphtst rptst hi ,cmdstat ( hi ) , ,J a pekex

;command byte? ;sklp to position byte handler ,skip to command byte handler

,clear command byte (non-valid position byte) ,save co~nand-status byte ,mouse cmd? ,skip If not mouse

,reset repeat flag ,this no the position byte ,recover registers ,jmp instead of ret - small interrupt stack ,save position code ,fetch command byte ,out of sync check ,quit if no command byte ;test for mouse movement ,skip if mouse moved ,test key posistion' ;j ump if spec i a I ups t rake ,test for control codes ,quit if non printable control character ,select translation table ,test for alpha lock char ,test for repeat keys ,fetch command byte ,clea,- command byte (valid position byte) ,clear carry

D; Character Is tested for the lock, shift, and ctrl key station,

input a - key ~tatlon code

output z - set if lock,shift, or ctrl key station . Ctrtst: push

Id Id cplr pop ret

hi hl,ctrltb bC,cntctr

hi

,save registers ,non printable char table ,byte count of table ,search table

The up-stroke is tested for special up-stroke key-stations.

input a - key station code strkup - user enable flag

output a - translated up-stroke key-station code

Upstrk: Id. bit jr Id

hi ,l1lstbl strkup,(hl) z,nochar hi, ups

:user enable up-stroke flag

:quit if user inhibited ,exception key-station table

» "0 "0 ([)

::l a.. X

Pl,sitio" encoded heylJOiinJ Ilandler­ROM resident CRT Driver

516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 5:j3 534 535 .536 537 530 539 540 541 542 543 544 545 546 547 540 549 550 551 552 553 554 555 556 557 550 559 560 561 562 563 564 565 566 567 568 569 570 571

19FO 19f3 19f5 19F7 19f8 f9f6 19FC 19fD

19fF IAUO IAOI IA04 IAOo IAOO IA06 IAOD IAOf IA 1L IAI4 IAI6 IAHJ IAIA lAIC I A If IA IF IA20 IA21 IA22

IA23 IA25 IA26 IA20 IA2A IA2C IA2E

01 0002 EO 61 20 A9 26 01 0002 09 7E 18 05

7E E5 21 F067 CB 4f 20 17 21 f8CE CO 57 :W 10 2 I F800 C8 47 28 09 3A F936 A7 28 03 21 F067

19 7E El C9

C6 46 C8 FE 76 30 06 fE 61 38 02 .. 06 20

MACRO-SO 3.44 09-0ec-81

Id cpir jr dec Id add Id jr

bc,upssZ

nZ,nochar hi bc,upssz hi ,bc a, (h I) charout

;byte count of table ;search table ;quit if no match ;get exception

;return translated character

lhe appropriate keyboard tr~nslation table Is selected

input

output

Tblsel: Id push Id bit jr Id bit jr Id bit jr Id and jr Id

crudlJ I : add ld pop ret

hI - command-status address de - key station code

a translated key station code

a, (h I) hi

.h I, shtab shift,a nZ,crudbl hl,cdtab ct r I, a nz ,crndb I hI, tabl lock,a z,crudbl a, (stlft Ick) a z,crudbl hl,shtab

III ,de a, (h 1 ) hi

;move cmd-status byte ;save command-status ptr ;preset to shift table ;shift bit set7 ;skip if set ;preset to control table ;control bit set? ;skip if set ;preset to un shifted table ;Iock key set ;skip if reset ;Iock key set ;test for shift lock (not alpha lock) ;skip if reset ;preset to shift table there with translation table address in hI ;index into table ;get translatea char ;recover command-status ptr

If tile lock key is depressed, the translated character is tested to see if it is an alphabet. If it is lower case, then it is forced upper case.

input hi - command-status address a - translated character

output a - translated character(upper chase if alpha+lock)

Alplltst:bit ret cp jr cp jr sub

lock,(hl) z upper nC,alpllexc lower c ,a I pllexc upascii

;test alpha lock flag ;quit if n~t alpha lock ;test for upper alpha range ;skip if non alpha range ;test for lower case alpha range ;skip if not lower alpha case ;set upper case ASCII alpha character

Three additional caracters are allowed for the alpha lock key

» u u It) :J 0-x

Po~ition elleo(j"c] keyboa,"d 1"landler ROM I e~idel\t ern DI iver

57'1. 573 574 575 576· 577 570 579 580 501 502 583 504 505 506 507 5UO 589 5\:)0 591 592 593 594 595 59b 597 598 599 GOO 601 602 G03 G04 b05 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627

IA:W IA3::J IA36 IA38 IA39 IA3A lA3B IA3C

IA3D IA40 IA43 IA45 IA46 IA49 IA4C IA4F IA50 IA51 IA52 IA54 lA57 IA5A IA50 IA60 IA62 IA64 lAG5

IA66 IAb9 IA6A IA6B lAce IA60 IA70 IA73 IA76 IA77 IA78 IA7A IA7C

'1.1 F935 01 0003 ED Bl CO 2::J 23 7E (9

21 F940 01 0013 ED BI CO LA F93C 22 F9AO 21 F9AA 77 F5 '1.3 36 FF 2A FFIZ 22 F9AC 21 F900 22 FF12 3E 01 D3 19 F I (9

21 F9AB 7E Al CO 72 2A F9AC 22 FF12 3A F20E A7 CO 3E 01 IJ3 19 CD

MACRO-OO 3.44 09-0ec-81

input hi - command-~tatus address a - translated character

output a - upper ca~e exception

A I plH; xc: I d J Id

cpir ret inc inc Id ret

hl,captan bC,cptbsz

nz hi hi a, (h I)

; lock exception table itable size isearch iquit if not found iget exception

Checks for repeat character. If repeat character, the millisec timer is vector address i~ modified and the timer is set up for 0.5 second. The timer is kicked off.

input a - translated character

Rptst: Id Id cpir ret Id ld Id Id push inc Id Id Id Id Id Id out pop ret·

hi ,rptbl bC,cntrp

nz hl,(tick) (lIIillcnt·),hl hl,rptchar (h I) ,a af hi (Ill) ,setfl9 hi, (ctcvec+2) (save},hl hl,r·ptclk Cctcvec+2),hl a,encntr (ctc I) ,a· af

;repeat char table ;number of repeat chars ;test for repeat cllars iquit if not repeat char :millisec count isave it in table :repeat Char save address. :save repeat char

;repeat flag address :set repeat flag ;get I lIIillisec interrupt :save it ;kybd repeat key timer ;substitute it :enable mil11sec timmer ;do it :recover Character

vector

This routine stops the lIIil lisecond timer and restores the original timer vector

StpctcI:ld Id and ret Id Id Id Id

1·11 • rpt f 19 CI,Ud) a z (h I) ,d hl,(save) (ctcvec.2) ,Ill a,(spaet)

and a ret Id out ret

nz a·,stcntr (ctcl),a

ifetch repeat char flag

;set flags ;quit if no repeat keys ;clear repeat char flag ;original I millisec interrupt address ;restore it ;fetch screen print flag

;don't ki II timer, if screen printing istop timer

Pus it i UII elicoLlet! heyUodI"CJ lianLlI e,­ROM r-esident crn [J, iver-

620 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 640 649 650 651 652 653 654 655 656

.657 650 6[,9 660 6bl 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 670 679 600 601 682 683

lA7D IA7E IA7F IABD IA03 IAo5 IA88 IABA

l.,F IE 47 21 F95D CO 7E CA 19AO D[J E5 DD 2A F95E

MACRO-SO 3.44

; ;

Mice:

09-Dec-BI

This is the optical mouse handler. The delta x and y mouse movement Is accumulate and stored In memory locations.

input a= xy=

mouse delta either x or y zero for x mouse delta x'ff' for y mouse delta

hl= cmdstat a(ldress cmdstat=blt 3 mouse moved

bit 4 x delta negative bit 5 y delta negative

mstbl =bit 7 mouse enabled user flag bit 6 intrp/npol bit I y/nx byte bit 0 mouse table Is updated

mbyte =interrupt return byte xmax ymax

=maximum horizontal display units =maxlmum vertical display units

output mstbl= xloc= y.loc= dxmv= dymv=

bit 0, mouse table updated x position of mouse y position of mouse prior x signed displacement prior y signed displacement

special requirements

Id Id Id Id bit jp push Id

The majority of the mouse-pointer table is require memory resident in the in the user address space above X'BFFF' since this handle is ROM resident. Variables MSTBL AND MSPTR reside in keyboarLl RAM space. Variable MSPTR pointers to where the user mouse table resides. These variable are update by both the handler and the user. The following data structure resiLles in the user's RAM space only if the two-button mouse pointer is required for the applicaton: (MSPTR+O) =MBVTE (MSPTR+I) =XMAX-LSB (MSPTR+2) -MSB (MSPTR+3) =VMAX-LSB (MSPTR+4) -MSB (MSPTR+5) =XLOC-LSB (MSPTR+6) -MSB (MSPTR+7) =VLOC-LSB (MSPTR+O) -MSB (MSPTR+9) =DXMV-LSB (MSPTR+A) -MSB (MSPTR+B) =DVMV-LSB (MSPTR+C) -MSB

e,a a,ltd) b,a hl,mstbl ms f J g, (h I ) z, nochar' ix ix, (msp t r)

;save mouse delta

;save cmd/status byte ;mouse table ;test for user enabled ;qult if mouse handler Is not enabled ;save register ;fetch user's table

'­..... VI

Position ellcou(,u l\"yllOar-cJ hanliler' ROM r'esillellt CRT Dr ive,'

604 685 606 687 600 6U9 690 691 692 693 694 695 696 697 690 699 700 701 702 703 704 705 706 707 70B 709 710 711 712 713 714 715 716 717 71B 719 720 721 722 723 724 725 726 727 72B 729 730 731 732 733 734 735 736 737 730 739

lAUE IA90 IA92 IA95 IA90 IA99 IA9B IA9E IAAI IAA4 IAA7 IAAA IAAO IABO IAB3 IAB5 IABO IABB IABE IABF IACI IAC4

·IAC7 IACA IACD IADO IAD3 IAD6 IAD9 IADC lADE IAEO IAE3 IAEo IAE8

IAEB IAEO IAEF IAFI IAF3 IAF4 IAF5 IAF7 IAFB IAF9 IAFA IAFB

CB 4E :,'0 26 00 6E 05 DO 66 06 7B CB 50 CO IAEB DD 73 09 DD 72 OA DO 5E 01 DO 56 02 CD IBOO OD 75 05 D[l 74 06 DD EI C::l 19BO DO 5E 07 DD 66 DB 7B CB 68 CD IAEB DD 73 DB O[l 72 DC DO 5E 03 DO 56 04 CD IBOO DO 75 07 DO 74 OB 21 F95D CB C6 CB 76 CA I AB3 DD 7E 00 DO EI Cl 19D4

:!Il D4 It) DD 10 07 Hi FF 7B 2F Cll DI ~) f 19 7C A7 FO

MACRO-UD 3.44 09-Dec-BI

lIIi cex I:

lIIicey:

bit jr Id Iu Id bit ca II Id Id Id Id ca II Id Id pop jp Id Id Id bit ca II Iu ld ld Id ca II Id Id Id set bi t jp Id pop jp

xy,(hl) nZ,micey 1,{ix+5) h,(ix+6) a,e xne9,b mlcel {lx+x'9'),e (ix+x'a'),d e,(i><+I.) u,(lx+2) mice2 (ix+5),1 (ix+6},h i x peknocl 1,(ix+7) h,(ix+8} a,e yneg,b micel (ix+x'b'),e (ix+x'c'),d e,(lx+3) d,(ix+4} mice2 (ix+7),1 (lx+B),11 h I ,illS tb I msmov, (hi) mintrp, (hi) z,micexl a, (i' x) i x

cl1arou t

test yin. mouse byte flag skip if y axis delta fetch current x position

;save unsigned mouse delta byte ;test polarity of x delta ;add delta & do min value check ;save signed mouse delta word

;fetch lIIax position value

;do max value check ;save position

;restore regiser ireturn to wait for y mouse byte ;fetch current y position

isave unsigned mouse delta byte ;test polarity of y delta ;add delta & do min value check ;save signed mouse delta word

;fetch max position value

;do max value check ;save position

;update mouse status ;set the mouse update flag :test for interrupt mode ;bye bye if polling mode ;user interrupt byte ;restore regiser :bye bye •

Tilis ,'outine adds the delta to either the x or y position and does minimum ~osltlon check input e= mouse delta (absolute)

output : Micel: j,'

Id jr

IIIlce11: Id Id cpl ade! Id

rrrlcel2: add Id and ret

zero set if positive mouse delta reset if negative mouse delta

IlI~ update position

IlZ ,lIIice II u,zero lIIicel2 d,-I a,e

a,l e,a 111 • de a,h d

p

;skip if delta negative :set msb positive

;set msb negative :recover delta ;2's complement

;put negative value back iadd delta to mouse position ;get msb

;skip if msb is positive

f>ositioll enco(Jcd I~ eytH)drd hanlll e ,- MAClW-UIJ 3.44 09--0",c--81 .... ROM resilient CR r lJ, i ver-en

740 IAFC 2 I 0000 III hl,zero ;s~t to minimum boundary 741 IAfF C9 ret 142 743 This routine does a maximum x or y position <;:heck 744 input hl= x or y position 745 de= x or y max value 146 747 output a = IIlstbl 748 749 IBOO 7A Mice2: IrJ a,d illl 5 b position test 750 IBOI BC cp h 751 IB02 38 04 j ,- c,mice21 ;skip if IIlsb too big 752 IB04 7B Id a,e ; Isb position test 753 1805 BO cp I 754 IB06 30 01 jr nC,mice22 ;skip if Isb is not too big 755 IB08 EB mice21: ex de,hl ;force maximulll I lmi t 756 IB09 3A F950 mice22: Id a, (ms tb I ) .mouse table 757 IBOC CB 4F bit xY,a ;complement xy flag 758 IBOE 2B 04 jr z,mice23 759 IBID CB 8F res xY,a 760 IBI2 18 02 jr mice24 761 IBI4 CB CF mice23: set xY,a 162 IBI6 32 F950 mice24: Id (illS tb I ) ,a ;update table 763 IBI9 C9 ret 764 165 , , Jump table for keyboard translator and interrupt handler. 766 Edt points anll monitor adjustment points for the SIGNON 767 overlay linll boot overlay 76U 769 IBIA C3 f9AF Rvltbl: jp Ipkybll ;4.01 monitor Ipkybd jump table 170 IBID C3 fl67 jp mkey2 771 IB20 C3 FIBf jp IlIkey5 -'-'2 IB23 C3 fC30 jp mpnext 773 IB26 [:.I fA95 jp mpnutO 714 UflOF jtblsz equ $-rvltbl 715 776 IB29 [3 F9Af rv2tbl: jp Ipkybd ;4.02 monitor Ipkybd jump table 777 IB2C C3 f16] jp IlIkey2 778 IB2f C3 FIBF jp mkey5 779 IB32 C:.I fC45 jp IIIpnext T rolllots lUn IB35 Ci fA!JO jp mprmtO+romots 7BI 782 .. The keyboar-ll tables ar-e restored to the original default values 78:.1 that a,-e sto,-ed in rom 7U4 705 1B::!fJ (,5 Movtbl: Pllsh bc 786 1839 D5 push rle 7B7 IB3A E5 push III 7BB IB3B 21 U34A' Id II I , t-ab I es

» 189 IBJE II FBOO Id lie, tabl.HJ 7!J0 1841 IJ I UI59 Id be, tab I ex

-0 791 1844 ED fJO Idir -0 ro 792 IB46 E 1 pop hi

::J 793 lB47 DI pop de a.. 194 IB4U C I pop be X 795 IB49 C9 ret '-

» u U tD ::l 0-x L-

L­..... -...J

Position enco(Ju(j l<-eylJOanj liarHller ROM ,-esidellt CRT DI ivel-

796 797 798 799

MACRO-SO 3.44 09-Dec-81

.dephase subttl RAM resident (Tables) page

...... Pus it i UII i:HlCtHJc(J h '" yllUd' U 11allU lee MACRO-'UO 3.44 09-0ec-81 ;):) RIll,1 cesiuent ('1,,1, I <',,)

8110 BOI O:j4A' tables; ;rom add cess 80;! .phase tabled iram addcess 803 804 un Il) . ,'ad; x 16 !:lO5 B06 ; ; kill unsl1ifted table 807 !:l0!:l FBnO ou 18 31 32 Tab I: defb 00h,lbh,31h,3211,33h,34h,35h.36h ;nul,ese.I.2.3.4.5,6 B09 \ F804 :3 :3 34 35 36 BIU FBDB 37 38 39 30 defb 3711, 3Bh, 3911,3011. 2dl1, 3d~I, 0811, 09h ;7.B,9,O,-,=,bs,tab 011 F80C 20 3D DB 09 BI2 fBln' 71 77 65 72 defll 7111,77h,6511,7211.7411,7911,75h,69h iq,w,e,r,t,y,u,i BI3 f814 74 79 75 69 BI4 F818 of 70 56 5D defb 6fl., 7011, 5ul1, 5dll, Odll, Dee, 6111,7311 ;o.p,l,J,er,letrl,a,s 815 FBIC OD EE 61 73 !:l16 FB20 04 66 67 68 defb 6411, 66h, 6711. 6UI1, 6all, 6bl1, 6eh, 3bh ;d,f,9,h,j,k.l,; BI7 F824 loA 68 6C 36 018 F828 27 OA EC 2E (jefl) 2711, Oal1, Dec, 2ell, 7all. 78h, 63h, 7611 ; ',If,lshift, .,z,x,c,v 019 F02C 7A 78 63 76 B20 f030 6;! 6E 60 2C deft] 6211, 6ell, 6dh, 2cll, 2ell, 2fh, Oed. 1 eh ;b,n,m, ••. ,I,rshift,help .021 F034 2E 2F ED IE Bn f03U Ef 20 E8 F 1 defb Oef,20h,Oeb,Ofl,Of2,Of3,Of4,Of5 ;retrl,sp,fl,f2,f3,f4,f5 823 F83C f2 F3 F4 F5 824 F840 F6 F7 f8 f9 defb Of6,Of7,OfB,Of9,Ofa,Ofb,Ofe,37h ;f6,f7.fB,f9,fIO,fll,fI2,7 U25 fB44 FA F8 FC 37 026 f840 38 39 2C 34 defll 3Uh,39h;2ch,34h,3511,36h,Oud,31h ;B,9" ,4,5,6.=enter, 1 B27 f84C 35 36 80 31 82B F850 :12 33· 30 E7 defu 32h, 33h, 3011, Oe7, 8211, 84h, 83h, BOIl ;2.3.0,next,darr,larr,rarr.h B29 F054 82 84 83 80 830 F858 8 I E6 FO 7f defu 81I1,Oe6,Ofd,7fh.2bh,2dh.2ah,2fl1 iuarr,prev,acc,del ,+,-,rnul ,d 831 F05C 2!:l 20 2A 2F 832 f860 FO 18 OE 8F defb Of 0, 18n,Beh,Bfh.OaO,Oa2.0a4 ;ins,ean,mswl,msw2,rxl,rx2,r U:B f864 AI) A2 A4 B34 035 , . kill sllifted B36 ; 8:17 fU!)7 1111 IB 21 40 Shtab: detll nOh,1bh,2111,40ll,23h,2411,25h,5eh ;nul,ese,! .@,#,$,%," 838 F8lS8 2:J ;!4 25 5E B39 FB6f :!l-l 2A 28 29 detu 26h,2al1,28h,29h,5fh,2bh,08h,09h ; &, * , ( , ) , .+,bs,tab B4D' f073 5F 28 08 09 841 fU77 51 57 45 52 defll 5111,5711,4511,521., 54h, 591.,5511,4911 ;Q,W,E,R,T,V,U,I 042 F07B !:i4 59 55 49 843 FIJ7F 41' 50 7B 70 defb 4th, 5011, 7bll, 7dl.,Ddh ,Dee ,41h ,53h ;O,P,{,l,er,lertl,A,S B44 fBO:3 tiD EE 41 53 045 F8B7 44 46 47 48 defb .44h, 461',4 7h, 4811, 4all ,4bh, 4Ch, 3ah ;D,F,G,H.J,K,L, : 846 FBBB .ciA 48 4C 3A 847 F8BF 22 OA EC 2E defu 221'1, Oall, Oec , 2et., 5ah, 5811,4311, 56h ; .. , If, I sh 1ft, . ,Z, X, C, V B4B FB9:l ~-)A 58 43 56

» 1:149 F!:l97 42 "IE 4D 3C defb 42h,4eh,4dh,3ch,3eh,3th,Oed,Ieh ;B,N,M,<,>,?,rshift.help

U 850 F898 :lE 3F ED IE

U 851 F89F EF 20 EB F I defb Det,20h,Oeb,Dfl,Of2,Ut3,Of4,Of5 ;retrl ,sp, loek,fl,f2,f3,f4,f It) 852 F8AJ F:! F3 F4 F5 :J 053 FOA7 F6 f7 fB 1'9 defb Df6,Of7,OfB,Of9,Ofa,Ofb,Ofc,37h ;f6.f7,fB,f9,fIO,fll,fI2,7 a.. 854 F8AB FA F8 Fe 37 x L-

~ u u ro j

a.. )( L-

Po~itio'l ellLuded h..,yIJOar·LI IlanLlI". RAM cesident (ldtdes)

855 056 057 050 059 060 061 062 Ob3 064 065 866 067 060 B69 fl70 071 072 073 074 fl75 076 077 070 079 000 BOI 002 003. 004 OU5 006 007 000 009 090 091 092 093 094 fl95 fl96 fl97 fl90 fl99 900 901 902 903 904 905 906 907 9no 909 91n

FBAF FOB3 FOB7 FOBB FOBF FOC3 FOC7 FOCB

FBCE FOD2 FOD6 FODA FODE FOE2 FOE6 FOEA FOEE FOF2 FOF6 FOFA FOFE F902 F906 F90A F90E F912 F916 F91A F91E F922 F926 F92A F92E F932

OUCA

F935 F930 0003 F93B F93C F93D F93E F93F 01F4 OU3F

F940 F944 F947 F94B F94F

3U 39 2C 34 35 36 BD 31 32 33 3U E7 U2 04 03 00 01 E6 FD 7F 2B 20 2A 2F FO 10 OE OF Al A3 A5

00 9B 91 92 93 94 95 96 97 90 99 90 IF 9A 00 09 1 I 17 05 12 14 19 15 09 OF 10 lB 10 OD EE 01 13 04 06 07 DO OA DB DC 7E 60 OA EC AE I A 10 03 16 02 DE ODIC 7C 5C ED 9E EF 00 EB 01 D2 D3 04 05 06 07 DO 09 DA DB DC B7 BO B9 AC B4 B5 B6 FE Bl 82 B3 BO C7 112 04 03 IE 01 C6 DO FF AB AD AA AF DO DE OE OF CO C9 CA

UO 00 00 no 00 00

()O F4 01 :IF LID

UO OA 00 20 2D 2E 2F ;lD 50 7B 7F 01 02 03 04 EO EO ED EO

MACRO-OO 3.44 09-Dec-01

defb 30h,39h,2ch,34h,35h,36h,Obd,31h ;0,9" ,4,5,6,=enter,1

defb 3211,33h,30h,Oe7,02h,04h,03h,OOh ,2,3,O,next,darr,Iarr,rarr,h

defb 0lh,Oe6,Ofd,7fh,2bh,2dh,2ah,2fh ,uarr,prev,acc,del,+,-,mul,d

defb Of 0, 10h,8eh,8fh,Oal,Oa3,Oa5 ,ihs,ean,mswl,msw2,rxl,rx2,r

k/b coded , Ctltab: defb

defb

defb

defb

defb

defb

defb

defb

deft)

eJefb

defb

defb

defb

,radix

captab: defb cptex: defb cptbsz equ sl1ftlck: defb tick: defb

defb tock: defb

deft} hlfsec equ tenths equ

r'ptbl: defb deft;) defb defb

r-ptex: defb

00h,9bh,91h,92h,93h,94h,95h,96h ,nul,esc,1,2,3,4,5,6

97h, 90h, 9911, 90h, I fh, 9ah, 08h, 09h ,7,O,9,O,-,=,bs,tab

1111, 17h,0511, 12h, 14h, 19h, 15h,09h iq,w,e,r,t,y.u,i

Ofh,10h,1bh,1dh,Odh,Oee,01h,13h ,o,p,l,l,cr,lctrl,a,s

04h,06h,07h,OOh,Oah,Obh,OCh,7eh ,d,f,g,I1,J,k,I,-

60h,08a,Oec,Oae,1ah,I8h,03h,I611 ,',If,1sh1ft" ,Z,S,c,V

02h,Oeh,Odh,1ch,7ch,5ch,Oed,geh ,b,n,m" ,I ,\,rshift,help

Oef ,0011, Oeb, Od I, Or12, Od3, Od4, Od5 ,retrl,sp,lock,fl,f2,f3,f4,f

Od6,Od7,Od8,Od9,Oda,Odb,OdC,Ob7 ,f6,f7,fO,f9,fl0,fl1.fI2,7

Ob8,Ob9,Oac,Ob4,Ob5,Ob6,Ofe,Obl ,0,9" ,4,5,6,=enter,1

Ob2,Ob3,ObO,Oc7,~2h,04h,03h,leh ,2,3,O,next,darr,larr,rarr,h

01h,Oc6,Odd,Off,Oab,Oad,Oaa,Oaf ,uarr,prev,acc,del,+,-,mul,d

OdO,Ode,Oeh,8fh,Oc8,Oc9,Oca ,ins,can,mswl,msw2,rxl,rx2,r

10

0,0,0 0,0,0 ($-captab)/2 o

;table of exceptions requiring shifting for ;ca~s lock key.(3 excepts then 3 translates) ;size of table

low hlfsec high hlfsec low tenths

11 i 911 ten tllS

500

;if set, locks all keys to shift table if lock set ;Isb - repeat char speed i JUsb ; Isb ;l\Isb

63 ,0,5 second count ,16 chars/sec

x' 08' , x 'Oa' , x 'Od' , " ' 20' x'2d' ,x'2e' ,x'2f' "'3d',x'50',x'78',,,'7f' x'OI' ,x'02' ,x'83' ,x'04' x ' eO' , x ' eO' , x 'eO' , x 'eO'

;bs,lf,cr,sp ;- t· • /

i-,X,x,del iueur,dcur,reur. leur ,16 TBD repeat keys

..... N o

» -0 -0 m :J 0-X .....

Position encoded ~~yboard handler RAM resident (Tallies)

911 912 913 914 915 916 '917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 9::J5 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966

\

0013

F953 F957 F958 0006 0159

F959 F95B 0002 F95D 0007 OOOb 0003 0001 0000 F95E 0160

F960 F964 F961J F96C

F9bO F971 F975 F979 DODD

F97A F97t F902 F986 F98A F98E

F99lJ F994 F991J F99( F9AO F9A4 0016

ID 2A 36 38 3A EO

EO EO EO EO

00

0000

:!3 3C 3E 40 56 5C 50 5E 60 76 7C 7D 7E

L:j 3C 3E 40 56 5C 50 5E

. bO 76 7C 70 7E

LI 23 LA 26 2C 2E 3C 3E 40 56 5C 50 5E 60 76 7C 70 7E FF FF FF FF

..' I 23 2A 26 :!C 2E 3C 3E 40 56 5C 50 ~)E 60 76 7C 70 7E FF FF FF FF

MACRO-OO 3.44 09-0ec-:81

cntrp equ

c t r It b: db

ctrlex: db cntctr equ tablex equ

ups: upsx: upssz mstbl: IIIsflg rnintrp strkup xy illS III 0 V

IIIsptr: ktabsz

(lefb defb equ defb equ equ equ equ equ defw equ

$-nptbl

x ' I d' , x ' 2a' , x '36' , x '30' , x '3a' ;lctr, lshft,rshft,rctr, lck

x'eO' $-ctrltb $-tabl

x' eO' ,x' eO' x' eO' ,x' eO' ($-ups)/2 o 7 6 3 I o o $-tabl

; 19 T6D additional key stations

;~pstroke exception key stations ;upstroke char or code translations ; 5 i z,e ;lIIouse table ;lIIouse translator enabled if set ;user interrupt with Illbyte else user polls ;upstroke user enable flag ;set for x delta else y delta ;Illouse table contains new data ;user address containing the following table ;size of k/b tables

Font translation table. first the exception codes

, Fontbl: defb 23h,3cn,3eh,40h,5bh,5ch,5dh,5eh

defb 60h,7bh,7ch,7dh,7eh

Now their translations

detb 23h,3ch,3eh,40h,5bh,5ch,5dh,5eh

defb 60h,7bh,7ch,7dh,7eh

fontsz equ ($-fontbl)/2 ;size of font tables

Printer translation table first the exception codes

Prntbl: defb 2lh,23h,2ah,2bh,2ch,2eh,3ch,3eh

defb 40h,5bh.,5ch,5dn,5eh,60h,7bh,7ch

defb 7dh,7eh,x'ff' ,x'ff' ,x'ff' ,x'ff'

Now the translations

defb 2Ih,23h,2ah,2bh,2ch,2eh,3ch,3sh

defb 40h,5bh,5ch,5dh,5eh,60h,7bh,7ch

defb 7dl1, 7eh,x'ff' ,x'ff' ,x'ff' ,x'ff'

pr-ntsz equ ($-prntbl)/2 ;size of printer table

;,' , (, I , ) ,-

;! .#.*.+" I· ,<,>

;@,l.\,I.J\,',LI

;l,-,TBD,TBD,TBD,T6D

,x ....... I

'-N .....

Pos i t ion encud,," h"ylJOa,-d 11alld 1 e,· RAM residellt (Tallies)

967 968 969 970 971 972 973 974 975 976 9n 97B 979 980 981 9B2 983 984 985 9B6 987 988 989 990 991 992 993 994 995 996 997 998 999

1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1 0 1 1 1012 1013 1014 1015 1016 If) 17 1018 1019 1020 1021 1022

F9A6

F9A7 0007 0006 U005 0004 0003 0002 0001 0000 F9A8 F9AA F9AB F9AC HIAE 0007 OlAF

F9AF F9Bl F9B4

F9B7 F9BA

F9BB F.9BC

F9BE F9BF F9Cl F9C4

IJU

UD

flOOD llO 00 0000 un

DB IE CO F9BE C3 1996

(0 F9C8 DO

C1 18 :3B

f5 DB lC 32 F9AE CB FF

MACRO-BO 3.44 09-0"c-Bl

lIef I)

cmd.6tat :defb ClOd equ u5trk equ yneg equ xneg equ mOU5e equ ctr I equ shift equ lock equ mi Ilcnt :defw rptchar:defb rptflg: defb 5ave: defw romram: defb 5iderom equ olsiz equ

o

00 7 6 5 4 3 2 1 o o o o o o 7 $-tabled

;e5cape sequence flag ;0=> no 5equence in progre5s ;lb=> expecting 2nd byte ;ff=> expecting 3rd byte ;comand-status byte ;co~nand-status flag ;up stroke ;mouse y axis negative ;mouse x axis negative ;mouse active ;control key active ;shift key active ;Iock key active ;current millisecond count ;repeat character ;repeat flag ;save address of the interrupt vector ;rom/ram memory bank status ;ram side

;; k/b interrupt handler for the low profile position encoded k/b. The interrupt interrupt service routine inputs two or three bytes from the keyboard port. The first byte is the cmd/status byte. Appropriate information Is saved in memory and the return from interrupt code i5 invoked. The 5econd and third byte(mouse) i5 position encoded data or mOU5e di5placement is analyzed, translated, and return to the existing keyboard handler if the information i5 valid; otherwi5e it is truncated and a return from interrupt i5 invoked. All registers saved except for the A regi5ter.

input- keyboard input port (data complemented) kbdat

output- Carry flag set - Command byte or truncated character Carry flag reset - Tran51ated character in A register

Lpkybd: in co II jp

Ipkext: call ret

pop jr

a.(kbdat) rom5ide pekhdl.

ramside nc

bc rptclk2

;read k/b port ;5witch to rom5ide ;decode posn. enc. k/b ;jp in5tead of call - interrupt stack"small ;re5tore original memory side ;return fo xerox code with char. ,here if command byte ;throw away return addre55 ;return from interrupt (via xerox)

Romside save5 the status of the current side of memory and switches to rom5tde.

output romram= status of syspio ; ROlllside:pusll

in Id set

af a.(5yspio) (rollwam) ,a shlerom,a

;save regi5ter ;read ram/rom status ;save it ;force rom side

» "0 "0 I'D :::l 0... >< '-

Po~itioll encolled I<uytloard handler RAM r-e~ iuent (1 dlJ I "s)

1023 1024 1025 1026 1027 102B 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 104B 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 Ifl59 1060 1061 1062 1063 1064 1065 1066 1067 106B 1069 107fl 1071 1072 1073 1074_ 1075 1076 1077 107B

f9C6

f9CB f9C9 f9CC f9CE f9Cf

F9DU f9D4 f9D7 f9DO f9D9 f9DA F9DD f9DE f9Eo f9E:! f9E4 F9E5 f9E7 f9EB F9EB f9ED F9fO F9f3 f9F6 f9f9

f9fC f9fO fAOO fAD3 fA06 fA07 FA07 020B

10 04

f5 3A F9AE 03 1 C f 1 [9

100 73 FIEC :11 Ff50 105 F5 C5 :lA f9AB A7 2B 19 2A F9AB 7C 65 20 06 20 22 F9AB lB OC LA F93E n F9AB 3A F9AA C3 f06f C3 f072

f3 CO F9BE CD 190C CO F9CB fB C9

MACRO-BO 3.44 09-Dec-Bl

jr rm~ide2

;; Ramside restores the ram/rom memory back to where it was

input

Rams i de: pusr. Id

rlllside2:out pop ret

romram= ;status of prior ram/rom

af a,(romram) (sysplo),a af

;save register ;recover prior ram/rom status ;swltch it

This routine is the repeat key timer interrupt handler. If the the repeat flag or the count is not zero, then the return from Interrupt is invoked. If the count is zero, then the repeat character is passed to tne ASCII keyboard handler.

input rptf'lg -repeat flag rptcllar -repeat char millcnt -tlmer'table

output a -repeat char if count is zero

Rptclk: Id Id push push push Id and jr Id Id or jr dec Id jr

rptcJkl:ld Id Id jp

rptclk2:jp

(savstk),sp sp,lntst.k hi af bc a,(rptflg) a z,rptclk2 hl-, (mi Ilcnt) a ,11 I z,rptelkl hi (mi Ilent') ,hi rptclk2 ' hl,(tock) (mlllcnt),hl a, (rptchar) keyZ key5

;save current stack ptr ;temporary Interrupt stack isave registers

;repeat key flag ;set flags ;qult If not in repeat key mode icurrent millisec count

; test count ;sklp If time elasped ;der count ;save milllsec count iquit if not time ireset millisec count

;fetch repeat char ;give char to keyboard key

Siout - output to ellannel b after translation and

Rxsioo: di ca II ca II ca II ei ret

kbr"amend equ 0lsiz3 equ

.dephase

escape sequence handling

rOllIside rmposend ralllside

$-1 $-tabled

;char" in a ;switch to romside ;does real work ;restore original memory side

; last location of code in ram ;size of relocatable code

l> u U ttl ::l Q..

>< '-

"-tv W

Pu!>itioll ellcuded heylJoanJ handler Over'lay (sigllonJ

1079 1080

MACRO-80 3.44 09-Dec-81

subtt1 Overlay (signon) page

"- Posltjon enc o(lt,d h"ylJ(}a,-eI tlan(l I e r' MACRO-BO 3.44 OU-Dec-BI N Over'lay (SIUIIOII) ~

lOBI IOB2 IOB3 ; i slgnon - Announce System Ready. 1084 1085 0552' rxsign: isource address in rom IOB6 .phase tca ;executlon in transient command area IOB7 fC5D 21 f091 Signon: Id hl,confg ;point to configuration byte 10B8 fC60 DB lC in a,(syspio) ;check configuration 10B9 fC62 CB 47 bit O,a 1090 fC64 28 26 jr z,slgn3 ; if SASI interface present 1091 fC66 f3 dl 1092 fCC7 3E Cf Id a, 1100111 It.> ;set Pia B in Bit Mode 1093 fCbB 03 10 out (sysctl),a 1094 fC6B 3E 38 ld a,001110000 ; turn ar'ound dO, 1,2 1095 fe6D 03 10 out (sysctl),a 1096 fC6f 31: 80 Id a, 1000000Ot.> ;ensure rom switched on 1097 fC71 03 lC out (syspio),a ;drop all drive selects 109B fC73 3E DO lei a,OdOll ;reset wd-1797-02 1099 fC75 D3 10 out (wdI797) ,a 1100 fC77 10 FE sign 1 : djnz slgnl i wa ; t 1797 not busy 1101 fC79 DB IC in a,(syspio) 1102 fC7B CB 67 bit c.flve,a 1103 fC7D 3E 02 Id a,2 ;preset 10 msec step rate 1104 fC7F :!O 04 jr nZ,sign2 ;if not 5" 1105 fCBl t:B E6 set c.five, (hI) 1106 fC83 3E 03 Id a,3 ;set long step 1107 fCB5 D3, 10 sign2: out (wdI797) ,a ; ,"estore I unload heads 1108 FCB7 32 ff54 lei (steprt),a 1109 fC8A 18 IE jr sign4 1110 fCat: CB F6 sign3: set cosasi, (Ill) ;set Sasl card installed 1111 fCBE 21 F70B lei Ill, R I gdpo ,::let add,-ess of rigid dpb 1112 fC91 11 f470 Id de, f I vdpl) ;set aeldroess of 5.25" floppy dpb 1113 fC94 01 0300 Id bC,Sasldl .set sasi driver length 1114 fC97 ED BO Idir ;Move elrlver down 1115 fC99 E6 02 and 2 1116 fC9B 20 OD jr nz.sign4 ;if not AlE swap 1117 fC9D L 1 f361 Id 11l,Sertab-tl 1118 fCAO Ub 08 Id b,B 1119 fCA2 7E slgn3a: Id a, (h I ) 1120 fCA3 EE 04 xor 4 1121 fCA5 77 lei (h I) ,a 1122 fCA6 23 Inc hI 1 12:1 fCA7 :!3 inc hi 1124 fCA8 10 fB djnz slgn3a 1125 fCAA 21 034A' sign4: lei hl,tabl~s .llIove '"X residen~ code to ram 1126 fCAD 11 fBOO Id (le, tallied 1127 fCBD Ul 020B Id tlC ,'a 1 s I z3 112B fCB:J ED BO Idlr ;move on top of GETHLP 1129 fCB5 21 fAOB Id III ,kbramend-tl jnext available ram lac

» 1130 fCBB 22 ff3C lei (aval Ib) ,Ill ; te 1 I the world 1131 fCBB 21 DODO lei III ,0

"D 1132 fCBE CD f03C ca II conflg ;get monitor configuration 'tJ (I) 1133 fCCI 7C Id a,h ;monitor level ::J 1134 fCC2 2 I 1000 Id hi ,xrslgn-tsigoff-romofs ;assume 4,01 level location a.. 1135 fCC5 FE 01 cp revl X "-

p Putiition tHICUCj,,(j I- eylJuanJ hand I "" MACRO-80 3.44 09-Dec"81 -0 Over'lay (tiignoli) -0 11) 1136 FCC7 28 03 jr z,sign7 ;skip if 4.01 :::J 1137 FCC9 21 1008 Id 111, xrtiign+sigoff ;4.02+ level location Cl. 1138 FCCC 11 FCE6 tiign7: I (I de,sign6 :put it in our signon message >< 1139 FCCF () 1 0004 Id bC,4 <- 1140 FCD2 ED 80 Idir

1141 FC04 CO F293 ca II crt off ;disable rom bank 1142 FCD7 CD F075 ca II pnext 1143 FCOA 1A defb clrs :clear screen 1144 FCOEI lB 38 defb 'esc. 'B' :set low ligl1t as default mode 1145 FCOO 3B 32 30 2D defm 'B20-II v 1146 FCE1 49 49 20 76 1147 FCE5 20 1148 FCE6 00 00 00 00 sign6: defb 0,0,0,0 i*********** space for the XR rev value 1149 FCEA 20 IF lC 20 defm ' ,31. 2B, ' 19B3 Xerox Corp' 1150 FCEt: 31 39 3B 33 1151 FCF2 20 5B 65 72 1152 FCF6 6F 7B 20 43 1153 FCFA 6F 72 70 1154 FCFD 20 2B 76 defm (v' 1155 FOOD 30 31 33 deflll ver/l00+'O' ,ever iliad 100)110+'0', (ver mod 10)+'0' 1156 F003 29 00 OA deHl ' ) , • cr, If 1157 F006 OA defb If 1158 F007 4C 20 20 20 defm 'L - Load Sys,tem' 1159 FOD8 4C 6F 61 64 1160 FOOF :w 53 79 73 1161 FD J:j 74 65 6D 1162 FD16 00 OA defb cr, If 1163 1164 if o. t erlll 1165 FD18 4B 20 20 20 defro 'H - Host Terminal' 1166 FDIC 48 6f 73 74 1167 FD20 20 54 65 72 116B F024 60 69 6E 61 1169 F028 6C 1170 F029 00 OA defb cr, If 1171 endif 1172 1173 if o.term 1174 F028 54 20 20 20 defb 'T - Typewriter' 1175 F02f 54 79 70 65 1176 F03:3 71 72 69 74 1177 F037 65 72 117B F039 liD OA defb cr, If 1179 endif 1180 1 181 FO~jB lJl 04 defb 7,eot 1182 1103 FD3(J CD F006 devour: ca II canst 1184 F040 CA F003 jp z,warm :go enter monitor 1185 F043 CD F009 ca II conin 1186 F046 18 F5 jr devour 1187 00E8 rxsigl equ $-signon 1188 11 B9 .dephase

'-' 11090 , subttl Overlay (boot) N V1

1 \ 9.,1, page

):> 0 0 t1) ::l Q.;

>< '-

flus i t i Ull e/lculled heyL)uar-cl llanelli .. dve.-Iay (boot) ,

1192 1193 1194 0030' 1195 1196 FC55 1197 FC5D :n FF5D 1198 FC60 7E 1199 FC61 2C 1:.!00 FC62 [Jo 00 1201 FC64 28 ·OB 1202 FC6b FE 13 1203 FC68 28 f6 1204 FCb" D6 34 1205 fC6C DO 1206 fC6D FE 10 1207 FC6F 3F 1208 FC7!) DO 1209 FC71 4F 1210 FCn Co 41 1211 FC74 32 F072 1212 FC77 2E 00 1213 FC79 C5 1214 FC7A E5 1215 FC7B CD FD1l9 1216 FC7E 21 F06E 1217 FCOI E5 12Hl FUl2 OE 00 1219 FC04 CD FOIB lnO FC1l7 CO 1221 FCOB 3E FF 1222 FCllA 12 1223 FC8B 11 OOOA U24 FCOE 19 1225 FCllF 5E 1226 FC90 23 1227 FC91 56 1228 FC92 CO F01E 1229 FC95 IA 1230 FC9b :J 2 FOGO 1231 FC99 87 1232 FC9A 20 20 1233 fC9C L 1 0000 1234 FC9F 19 1235 FCAO 4E 1230 FCAI L:i 1237 FCA2 46 123B FCA~j 08 1239 FCA4 ED 43 FA II 1240 1241 fCAB UE 10 1242 FCAA 21 EOllO 1243 FCAD CD F024 1244 FCBO CO 1245 FC81 OE IE 1246 FCB:! 21 EEBO

MACRO-80 3.44 09-Dec-81

rxboot: .phase tca-romofs ds romofs,O ld hl,linbuf+1

boot I: Id a,(hl) inc I sub cr jr z,boot2 cp '-cr jr z,bootl sub 'A'-cr ret c cp 16 ccf ret c

boot2: ld c,a add a, 'A' ld (bootd), a ld 1,0 push bc push hi ca II swap Id hl,booter push hi Id c,O ca II select ret nz Id a,-1 Id (de) ,a ld de,10 add hi ,de Id e,(I.I) inc hi Id d,It)I) ca II home Id a, (de) Id (boo t s) ,a or a jr nZ,boot3 Id hl,I3 add hl,de Id c, (h I) inc hi Id b, (h I) dec bc ld' (phytrk) ,bc

Id c,rtabl Id Ill,bootbf ca II read ret nz Id c,rtabl1"lpkofs Id hi ,bootbf+x'100'

.rom source address :execution address 0/1 area : 4.01 overlay start address :4.02 overlay start address :scan command line

: if no parameter, boot from A:

:skip leading blanks

:if invalid drive

;if bad drive ;set boot drive selected

:set up error message ;set A:

; switch boot drive with A: ;set boot error return

;then boot from A:

;if drive not configured or density error

;set dpb address offset within dph

;set dpb address

;get low sectors per track ;inforrn boot loader

:it not rigid ;set reserved track offset within dpb

;get reserved tracks

;point behind directory ;do implied seek :here for rigid ;first rigid sector ;buffer ; layout and k/b tables

:2nd rigid sector :buffer

I» Position eftCOded l-eytlOa,'O handler MACRO-BO 3.44 O~-Dec-Bl

jO Ove,"1 ay (boot) 0 1/1)

1247 FCB6 CD F024 ca 11 read ; layout. and k/b tables :J 0... 1248 FCB9 CO ret nz

1249 fCBA 18 20 jr rxbOI X 1250 fCBC boot3: ;here for floppy '- 1251 FCBC FE IB 27 ;double density? cp

1252 fCBE DA FD52 jp c,boot4 ino - exit 1253 fCCI OE 04 Id c,ftabl ;first floppy sector 1254 FCC3 21 ED80 Id hi ,bootbf ;buffer 1255 FCC6 CD F024 ca II read I ; layout table and half of k/b 1256 FCC9 CO ret nz 1257 FCCA DE 05 Id c,ftab2 ;second floppy sector 1258 fCCC 21 EEOO Id hl,bootbf+12B 1259 FCCF CO F024 ca 11 read ;midle third of k/b tables 1260 FCD2 CO ret nz 1261 FCD3 OE 06 Id c,ftab2+lpkofs ;third floppy sector 1262 FCD5 21 EE80 Id hi ,bootbf+12B+128 1263 FCD8 CD F024 ca II ,"ead ; last third of k/b tables 1264 FCOB CO ret nz 1265 FCDC rxbOI : ;check tables are present 1266 FCOC 3A ED80 Id a,(bootbf+lang) ; language no. set? 1267 FCDF FE E5 cp Oe5tl 1268 FCEI 2B 6F jr z,boot4 ina - exit 1269 FCE3 3A EDBI Id a,(bootbf+kbrd) ;k/b taples present? 1270 FCE6 FE 6B cp 'k' 1271 FCE8 20 68 jr nZ,boot4 ;no - ex it 1272 FCEA 3A ED82 Id a, (bootl)f'rfont) ;font tables present? 1273 FCED FE 66 cp 'f' 1274 FCEF 20 61 jr nZ,boot4 ;no - exit 1275 FCFl 3A ED83 Id a,(bootbf+prnt) ;printer tables prsent? 1276 FCF4 FE 70 cp 'p' 1277 FCF6 20 5A jr nZ,boot4 ;no - exit 127B FCFB 21 EDB4 Id hi ,bootbf+kbrdtb ;llIove in k/b tables 1279 FCFB 11 F800 Id de, tab I ed 1280 FCfE 01 0160 Id bt,ktabsz 1281 FOOl ED 60 Idir 12B2 FD03 OE IF Id c.rtab2+lpkofs ;3rd rigid sector 12B3 FD05 3A FD6D Id a,(boots) ;rigid or floppy? 1284 FDD8 B7 or a 1285 FD09 28 02 jr z,boot5 ;rigid 1286 FDDB OE 07 Id c,ftab3+lpkofs ;floppy - 4th sector 1287 FDOD L 1 ED80 boot5: Id hi ,bootbf ;buffer 1288 FOlD CD F024 ca II read ;font and print tables 1289 FD13 CO ret nz 1290 FDI4 ;jA EDBO Id a,(bootbf) ;configured? 1291 FOl7 FE E5 cp Oe5h 1292 FD19 28 37 jr z,boot4 ina -exit 1293 FD16 21 ED80 ld hi, bootbf imove font & print tables in 1294 FDIE 11 F960 Id de,fontbl 1295 FD21 01 0046 Id bc,fontsz*2+prntsz*2 1296 FD24 EO 60 ldir 1297 1298 . , a Iter SIOOUT 1299 1300 FO:6 DD 2A F019 Id iX,(monitr+sioff);sioout address

L- 1301 FD2A DO 30 00 C3 Id (ix),Oc3h ; jump instruction N. ,13.0~ i"'" , ,FD2E DD 36 01 Fe Id (ix+1),low rxsioo .....a

I

f?"iJ.;s it ion CI\COdelJ heylJoanj hand I e,- MACRO-80 3.44 09-Dec-81 Ovcer I ay (boot)

1303 FD32 DD 36 02 F9 Id (i x+2) ,higl. ,-xsioo 1304 1305 a Iter Clot driver 1306 I:W7 FD36 DO 2A FOlD Id iX,(monitr+fcrtof) ;address of fast crt handler 1308 FD3A DD 36 12 85 Id (ix+crtcall), low rxcrt 1309 FD3E DD 36 13 18 Id (ix+crtcall+l) ,high rxcrt 1310 FD42 DD 21 F22F Id ix,sprntl ;address of screenprint patch 1311 FD46 DD 36 00 C3 Id (ix),Oc3h ; jump instruction 1312, FD4A DD 36 01 06 Id ( i x + 1 ) , low scrprt 1313 F04E DO 36 02 18 Id (ix+2),high scrprt 1314 FD52 boot4: ;here to exit 1315 FD52 Cl pop llc ; throw away boater return 1316 FD53 Cl pop bc ;get disk swap parameters 1317 fD54 El pop hi 1318 FD55 CO FD89 ca II swap ;swap them back for xerox boot 1319 F058 Cl pop bc ;throw away return address 1320 F059 21 0000 Id hi ,0 1321 F05C CO F03C ca 11 config ;get rnoni tor configuration 1322 F05F 7C Id a,h 1323 F060 21 l1B8 Id hl,xrboot-romofs ;assumed 4.01 monitor boot overlay address 1324 F063 FE 01 cp revl 1325 F065 28 03 jr z,hoot6 ;skip if 4.01 1326 fD67 £ 1 llCO Id hl,xrboot ;address of 4.02+ monitor boot overlay 1327 F06A C3 F078 lloot6: jp prboff ;enter xerox code to execute boot 1328 F06D 00 boots: defb 0 ;workbyte to save disk type 1329 1330 , . Booter - Boot Error Processor. 1331. 1332 FU6E CD F075 Booter: ca 11 pnext 1333 FD71 07 detb 7 133'4 F072 b4 3A 54 61 bootd: def", 'd:Tables Load error. 1335 FD76 52 5C 65 73 1336 f07A 20 4C 6F 61 1337 F07E 64 20 65 72 1338 FDI:l2 72 6F 72 2E 1339 FD86 04 defb eot 1340 FD87 C I pop bc :switch drives· back 1341 FDI:l8 E 1 pop hi 1342 1343 .. Swap - swap logical drives. 1344 1345 Elltr"y: C first drive index, 0-15 1346 L second drive index, 0-15 1347 , 1348 FDB9 lib 00 Swap: Id b,O ;clear·upper indices 1349 F08B bO Id h,b 1350 FOUL 11 F360 Id de, se I tab ;set select table address 1351 FD81' 29 add hi. h I

I 1352 F090 19 add hI • cle ,~ 1353 F091 EB ex d·e, h I ;set second address to DE, get se I tab to HL a

a 1354 F092 09 add hI ,bc /'I) 1355 FD93 09 add hi. bc ;set first address to HL ~ 1356 F094 06 02 Id b.2 0.. 1357 FD96 'IE swapl : Id c • (111 ) ;swap two bytes >< 1358 FD97 lA Id a. (de) L....

» P,H' it iOll e"coOed "'eylJOduJ hdlluler "0 OvtH' 1 dy (boot) -0 ttl 1359 F090 n ::J 0.. 1360 F099 79

1361 F09A 12 >< 1362 F09B 23 '- 1363 f09C 13

1364 F090 10 F7 1365 F09F C9 1366 1367 1360 0780' 1369 0700' 1370 1371 1372 1373 1374 1375 1376 1371 1370 070C' : F97A 1379 07OE' F960

. .1300 07EO' f,950 , il30 1 07E2' , F'959

,1382 07E4' F950 1303 07E6' F953 13!l4 07E8' F94F 1385 07t::A' F940 1386 07EC' F93C 1307 07EE' F93B 1300 07FO' F938 1309 07F2' F935 1390 \ 07F4' F.I:!CE 1391 07F6' , F067 1392 07F8' F!lOO 1393 1394 07FA' 00 1395 07FB' 00 FF 1396 1397 1398 1399 1400 D7FO' AA 55 1401 07FF' ()(j

,1402 .1403 1404

MACRO-!lO 3,44

rOllltop:

09-0ec-01

ILl (hl),a ILl a,c Id (de),a inc 11 I inc djnz ret . depllase

de s ... apl ; if s ... ap not complete

defs (romsiz-x'24')-(romtop-start),-1

;; Drctry is a table containing the RAM addresses of the keyboard tables. Tilis table is located pn ROM side of memory. The

Orctry:

Ipid:

, ,

ROM address 'must be offset· by x' 1800' since resides tn the fourth 2kxO ROM slot. This directory is helpful if future release require the RAM tables to reside in a different RAM location

defw prntbl ;print exception table defw fontbl ;font exception table def ... mstbl ,mouse table defw ups ,upstroke table def ... ctrlex ;function key inhibit expansion table defw ctrltb ;function key inhibit table def ... rptex ,repeat key expansion table defw rptbl ;repeat key table defw tick ;repeat speed table defw i?llftlcl< ,shift lock flag def ... cptex ,alpha lock expansion table def ... captab ,alpha lock table defw cdtab ;code + table defw stl t ab ,shit t table detw tabl ,unshifted table

defb ver ;revision level . ' . nefb x '00' , x ' f f . , low profile kybd id

define check ... ord to let xerox know that we ·are pl'esent

defb Oaah,5511 , i d detb 0 ;space for Checksum'

Subttl Syml)o I., Tab 1 e end

U P,?!,~ \ t ion erlco<.Je,i "",yIJlliiUJ lIanej Ie,' MACRO-80 3.44 09"Oec-81

:l SyllltlO I Tatll e

Mae,'o,,:

SymllO Is: IA30 ALPt-tEXC IA23 ALPHTST ff63 ATTRI6 FF3C AVAILB 0002 60FF I 0018 BOff2 fC60 BOOT I fC71 BOOT2 fC6C BOOT3 f052 600T4 fOOO BOOT5 f06A BOOT6 ED80 BOOTBf f072 BOOTO f06E BOOTER f060 BOOTS 0004 C.fIVE 0006 C,SASI f935 CAPTAB f8CE COTAB 1904 CHAROUT ffB4 'CHRSAV OOIA CLRS 0007 CMO 19AI CMOB IAlf CMOBI f9A7 CMOSTAT 0006 CNfBYTE 003C CNfGOff 0006 CNTCTR OUI3 CNTRP f091 CONFG F03C CONflG F009 CONIN F006 CONST 0003 CPTBSZ f938 CPTEX 0000 CR 0012 CRT CALL 0182 CRTOI 0196 CRT02 f293 CRTOFf 0019 CTCI FFIO CTCVEC 0002 CTRL F950 CTRLEX f953 CTRLTB 190B CTRTST fFAC CURSOR f030 OEVOUR 070C' ORCTRY 0001 ENCNTR 0004 EOT OOIB ESC f9A6 ESCSQ 0007 ESCTSZ DOlO fCRTOf f47D flvDPB IBCf, fNTRAN IBBB fONI HICA FON2 18A6 fONCHK 0002 fONT F960 fONTBL 0000 fONTSZ 0004 FTABI 0005 fTAB2 J 0006 FTAB3 F319 GOLD 0100 GRPAD OlF4 HLfSEC fOIE HOME F066 WLE fF50 INTSTK OOOf JTBLSZ DOlE KBDAT OOOB KBlP OOOA KBOff fA!)7 KBRAMENO 0001 KBRD 0004 KBROTB ff I:A KBVEC f06f KEV2 F072 KEV5 0160 KTA6SZ f06C, KV60LP 1965 KVPOS 0000, lANG ff62 LEAOIN OOOA If FF5,C LlN6Uf 0000 lOCK 0061 LOWER 07fB,' lPID f9B7 " lPKEXT 0001 LPKOfS F91iF LPKVBO fOE3: • MAS.K " IA7D MICE IAE6 MICEI IAfl. MICEll" IAf6 MICEI2 IBDO MICE:! IB08 MICE21 1609 MICE22 1614 MICE23 1616 MICE24 IA63 MICEXI IAB8 MICEV f9AB MILLpn 0006 MINTRP fl67 MKEV2 fl8f MKEV5 F06C MNTREX FOOD MONITR 0003 MOUSE 1638 MOVT6l fC30 MPNEXT fA95 MPRMTO 0007 MSfLG 0000 MSMOV f95E MSPTR f950 MST6L 19AO NOCHAR 107E NOlOAO 0001 O.TERM OlAf OLSIZ 0208 OLSIZ3 1961 PEKEX 1996 PEt(HOl 19AO PEKNOC 1960 PEKNOCI 19AO PEKNOCL 198f PESCTB fA 11 PHYTRK f075 PNEXT 1986 POESC 1927 POSOI

}> 1939 POS02 1939 POS03 1930 POS04

"0 1947 POS05 1954 POS06 1955 POS07 "0 1914 POSENO 1959 POSOUT 1966 POTRAN It) f070 PRBOff 0003 PRNT f97A PRNTBl :::I 0016 PRNTSZ fA62 PROMPT f339 PRVATT 0- 1903 PTROI f9CB RAMSIOE f024 REAO X L-

» Position enCO(hHj i",yllOcaf'u 11 <u 1(; I ti ,- MAC~U-C.G 3.44 09-D.;c-81 :0 SyllllJO I Table "0 ro 0000 REVO COOl REVI ~2c4 REV50 ::l a. F706 RIGOPS 190C RMPOSENC f8CC RMSIDE2

X 0008 ROMOFS F9AE ROMRAM ,=geE ROMSIOE

"-0800 ROMSIZ 0765' RCMTCP ;=940 RPTBL F9AA RPTehAR F9DC RPTCU; :=9ED RPTCLKI F9F9 RPTCLK2 F94f RPTEX F9A8 RPTfLG IA30. RPTST OOlD iHA61 Cl:!lE RTAS2 IBIA RVITBL 1829 RV2TeL. ieJO RXI984 FeOC RXBOI 083D' RX800T IS55 RXeRT OOEB · RXSIGL 0552' RXS!G;\ :=SFC RXSIOO 0300 SASIOL f9AC SAVE r=1EC SAVSTK 18Ee SeROI 18f2 SCR02 .~ 804 SeRO:} 1806 SCRPRT FOIS SELECT f360 SELTAS DOFF SETFLG f938 SHfTLCK \ 0001 SHIFT F867 SHTAB 0007 ,S~PEROM PC77 SIGNI FCfl5 · SlGN2 fe8C SIGN3 PCA2 SIGN3A FCAA · S'lGN4 ,fLEe STGNe FCee SIGN7

. F.C50 ',: 'SIGNON ,0060 's't G.OFF 0005 SlOOP8 , ·QPI9 S'I:OFf .,F03F 'S'ibiWY 195A SIOXI

185e ISOOUT ,F20E ,~PACT f22F ' ,SPRNTl ,~,232 ' 'SPRNT2 0000' START 0001 STCNTR

" ,.FF54 '''STEPRT ,lA66 STPCTCI QQQ3 STRl\UP

" ,FDB9 SV/AP

' •• < !"

. F09G Sl~AP I 0010 SVSeTL oUle SVSPIO ,IT f 18 SYSVEC FGOO ,TA8L

, ')=800 : 'TABLED 034A' TABLES 0159 TABLEX 19FF ", TBLSEL )'81E TBxFER Fe50 TeA 003F : TENTHS f93e TIel, F93E TOCK

"'0020 UPAseil ,0078 UPPER F959 UPS 0002 l)PSSZ ,19E(; lJP$TRl\ F0EiB

". UPSX

. , 0006 USTRK :,0000 VER ,I'OD3 WARM 0010 W01797 0004 XNEG 11 CO XRBOOT 1078 XRSIGN .0001 >W 0005 VNEG 0000 ' ZERO

No Fatal errore:;)

'- ALPHEXC 565 !)67 57711 Lt.J ALPHTST 485 56211 r\J

ATTRIB 10011 165 AVAILB 9411 1130 BOFFI 4511 199 200 205 206 BOH2 4611 201 202 207 208 BOOTI I 19811 1203 BOOT2 1201 1209# B<JOT,;1 12~2

i'-' 125011

B~)(lT 1 . 1252' 1268 1271 1274 1277 1292 1314# B~Q15' q8,5" I '20"lii' BOQJp, 1325 132711 BOOTBF 84# 124:1" 1246 1254 1258 1262 1266 1269 1272 1275 1278 1287

1290' 1293' " \ ) \;,':,

BOOTO 121 i \ , 13~j4# BOOTER 12 i 6.' , 133211 j 1;: ~

BOOTS 1230 . 1283 132811 C.FIVE 13211 110i' 1105 C.SASI 13311 I lib' CAPTAB 577 89511 89'1 1389 CDTAB 537 :86611 1390 CHAROUT 487# '523 718 CHRSAV 10111 242 CLR$ " 14,9# 114'3 CMO" ' 460 !idil 97211

t .' 'u

: 4'(;'5'11 CMOB 462 CMO~1 536 539 542 545 54711 CMOSTAT 465 415 487 97.J11 CNFBVTE 12CJ.v liio 192 CNFGOFF J,l~# ' '189 I.:WrCTR 500 9i611 f./~,TRP 593 '911# ,CON,FG 86# lCIS7 CPiNFI G 5,711 175 1132 1321 !40NIN 5.211 Ih3'5 .'; 1',0,

,CONST ,51# 1183 ,CPJ,BSl ,5)8 89711 CPTEX ,69611 1.3ti8 CR 15,211 \156 I H)i2 1170 1178 1200 1202 1204 CRT CALL 5011 IjOB 1309 eRTOI '6611 254 CRT02 6711 i47 2'5t 'f:'

CRTOFF 76# 1141 CTCI 11011 608 626 CleVEC 41# 603 606 621 ClRL 538 977# CI RLEX 915# LHl2 ClRLT8 499 913# 916 13U3

I

Il> .0 1° iT)

P a.. Ix' ,L-

L-

W W

CTRTST ClJRSOR DEvOlJR DRCTRY ENCNTR EDT ESC ESCSQ ESCTSZ fCRTOf fIVDPB fNTRAN fONl fON2 fONCliK fONT fONTBL fONTSZ ; FlABl F,TAfj2

IilillEl3 GOLp GRP.AO, 1:t4-;I[,~EC. HOM.~.

ilj>,L,\= , HH~TK ,JJ;~L.sf KBDAT. ,KBl,f! ,,! I'tBJlH .KBf!~MEND

KBHD K.BRPTB KBVEC, KEY2 KEY5, KTABSZ KYBDLP KYPOS LANG LI'ADIN LF :1 LINBUF

c"LOft); il.L.PI(IFR ,),l;.P.J P ,':L,f,'Kf XT iA:,PK~)F S

482 9130

1 11330 13700

1140 1510 150# 347 426

490 900

278 267 271 253 1460 27.4 2i5 lfl #

142" 1430 8S#

8~'~''{' !?'!?'~

.,5,9,# ~~o 1~§, lU90 .1:i'\iI ',4}30

:1:4:5# ,i'4.Bo

: ,~f3# 6.2.#

; 6'3# ;B.2,90 , 610 ;461' 'l;~!4'#

i.' ;~,9# 1530 ' :97# p4) j;~50 3950 473 )23#

4,)00 241

1 113 (j

b07 1181 1339 325 351 362 1144 ;j54 383 9670 432#

1307 1112

2139# 272# 279# 261#

1272 30~\ 93'4N 945' 1294 1379 290' 306 307 311 9450 1295 125~f I "I.·,

,l:

1257'~ 12th l'2!J~} -244' " 2GB!

'9'0'0' 9030 12'i8' ~ , i

387 1047 714#

10CJ4 i91 '2 i,l 214 215·

10750 1'129 ;~ .. ,2'6'9 , :?7'8 , lzi2 1'0134 1065 1''1 t1 (f

214 :'2'1'5 , '4740

1'2'6'6 245

1'156 1157 ' 1)1197

1162 1170 1178

, '562 979#

:J6? ltmilo

I ,'245 1~61 , 12-82 1286 "

l> J J n l :l.. >(

(if p''f rtPKYBD

MASK MICE MICEI MI CE 11 MICE12 MICE2 MICE21 MI CEn MI CI;;23, " MI C!:24 ,"

~:~~C:r.' ; f, , ,

MltLCNT , ,~

MINTRP MKEV2 MKEY5 , , MNT,REX MONITR

ModsE MOlllEH--MPNEXT, MPRMTO

, : MSFt~ , r MSMOV MSPTR MSTBC I, '

NOC~jA~',' _ NOL\14p

g~~a~, :' OLS'iZ,3 PE~E.~' :;, Pf',IHi 0,':" -PE~,NQ{':,,,, Pf',I:,N,Q(,) P E,I',I;{OC 2,' ,_ Pr::~CtB' " pHVT~K ' PNEXT POESC POSOI POS02 POS03 POS04 POSn5 POS06 POS01

169 85#

479 690 J;?8 130 695 151 154 158 160'0' 698~ " 685'! \ 591 114

72';/' 73# 60#' 39# 62

466 185#

8'0# 1911

680 113" j 683 -.,

468 4b::ii 17fi' 134#'; 91:li3~

107ijll 47''1'# ' 45ii/' 46i:-47'1'11'; 4648' 4:15':;

9JN r;1411 '

378 352 360 358 349 372 375 381

176 1004# ~!4U G7b# 704 128# 131# 736# 709 149# 155# 756# 761# 162# i

715 700# i ;-,

980#' 1054 1059 1062 924'# " 710' 711"-771 ; , 118 185'

51 52 53 54 55 56 57 58 59 60 61 63 " 64 65 189 1300 1301

418"- 916#

712 719 ,:i ., t \ • ~

773' " 780 9234" , 921'i1 'Ii

928# 5i2 619-' 112 156 162 922# 1380 514' 518 681 180 228#'

1164' 1113 ,),r,;_

1 1 'I."/" " 4 ~1'O " "

1 !.IO'l)" : •

4i(),k"'" 477 .... ..-699" 483:);) 43(J#)':' 432,,'

1239" I"~ i ~

1142" 1332" " ,

4 25#1 ~ :l56# 366# :l67# :nn# :176# 319 382# :183#

}> POSENO 33t1 "0 PO SOlJT 326 "0 POTRAN 319 CD PRBOFF 65,v ::s 0.. PRNT 147d

)(' PHNTBL 400 PRNTSZ 401

"- PROMPT 78d PRVATT 77,v PTR01 409 RAMS IDE 1008 HEAD 56d REVll 116,v REV1 117 d REV50 110d RIGOPB 91d RMPOSEND RMS,IDE2 lb23

::;~q~qFS "i22d ,I R!!tvj~fM :9}j4d

",JNfi\;SI,DE 1005 , ;~(lMS 1Z ""'38,v ,M)Atop "i368,v

;L~F;r;~L "'592

,~f'TCHAR ' '5~8 " '

:-' ~%.+~~~ 1 ! 'll:~~~ \ t .' '" ~, ~ " : .. ~P![;LK2 ·,\ql:.:' ,; .. ~Pl~X J ,'!;!IO'\/ ".J~.P,T LG ,'1?)5 : R'rdsT " 486

, RT:ABI"'b9'\/ ,,', HT'ABL "; i 40#

~'VlTBL '\ 8 I 'dV2TBL >;;'\04

'RXI'98'1 " ''.3H

r-:- '~>\!l'O I ~f~~49 RiXBOOT 199

4-W V1

RX'CRT""24 \d RXSlliL '-225

1~~SlGN "'2'23 RXSIOO 1069# ~ASIDL i35# SA.I(E \ "604

'$~YI~TK ' '.1 40d r'CR I .' "309

§CR02 ;,,'317

, C~03 "'320 ;>!=RPRT "'''301d ~-: , J ;:'t

J4b,v ,129 353 363 368 374 377 385,v 413 415 :157 400d

lJ27 1:05 950d 965 137B 405 965d 1295

269 417,v

10:.:'9d 1072 1243 1247 1255 1259 1263 1288

177 18:.:' 203 1135 1324 179

1111 :d'6,v 1071

103"1,v 1 205 2'06 207 208 779 780 1134 1195 \196 1323 1021 1030 '~lb19d ,,\U70 'i':H,9

• j'J'69 g'06d "91 I 1385

""9'81# 1063 '.'1'046,\/

! 1 1061# 1053 1060 1065# ,

! 1'Jtl4 : ; ,,\ -j'

,"'982# ,1051 'j 592,\/ i>;

, 1241 1-245 "Y:i82 ,) ..,69# 774 1',,76#

160 ~ :.;:

'1265# ,1

200 201 202 205 206 207 208 1194d 1:308 ',1'309 1187# >i

1'()05# ' '1302 1303 'rl \3 " ..... ,

" \"620 \ \,983# !'(f4a

)1. 315,\/ . I',; ! -n ' li319d

! ;.'323 329d 131:.:' 1313

. '"

) SELECT 54# 1:!19 SELTAB 89# 1117 1350 i\ SETFLG 128# 6U2 SHfTLCK 543 ll98# 1387 SI1I fT 535 9-'8# SHTAB 534 546 837# 1391 SIDEROM 985# 1022 SIGNI 1100# 1100 SIGN2 1104 1107 # SIGN3 1090 1110# SlGN3A 1119# 1124 SlGN4 1109 1116 1125# SIGN6 1138 1148# SIGN7 1136 1138# SIGNON 1087# 1187 SIGOff 70# 1134 1137 SIODPB 107# 390 SIOff 47# 1300 S IORDV 58# 386 SIOX 1 386# 388 SOOUT 204 212# SPACT 87# 622 SPRNTI 74# 1310 SPRNT2 75# 332 START 159# 1369 STCNTR 115# 625 STEPRT 96# 1108 STPCTCI 470 615# SfRKUP 513 925# SWAP 1215 1310 1348# SWAPI 1357011 1364 SVSCTL- 105# 1m)] 1-095 SVSPIO 106# 1020 1031 1088 1097 1101 SVSVEC 42# 43 TABL 540 808# 917 929 1392 TABLED 92# 789 802 986 1076 1126 1279 TABLES 780 001011 1125 TABLEX 790 917# Tl3L SEL 484 532# TBXfER 183 185# TCA 44# 224 227 1086 1195 TENTHS 901 902 904# TICK 596 II 99 011 1386 TaCK 90 \oli lDGl UPASCII 126011 5G8 UPPER 124# 5li4 UPS 515 919# 921 1381 uPSSZ 516 f):.! (J 92 \oli UPSTRK 481 r,l '211

!l> iU ,-0 i(1) :~ !Cl.

>< .....

):> LJPSX !ol;Wg

"0 USTRK 400 ~)73g

"0 VER 28# 1155 1155 1155 1394 II) WARM 53# 111:14 :::J W01797 108# 1099 H07 a. XNEG 689 975# >< XRBOOT 71# 1323 1326 '- XRSIGN 69# 1134 1137

XV 469 604 757 759 761 926#

VtlEG 703 974# ZERO 127# 459 729 740

Notes

·j38

A

A66 Control Switch Abbreviations, list of Access cover

249,250 N1

- 40 CPS

-io CPS

Access times, disk Accessi bl e 1-second

238,239

227,228

207-211

interrupt Accessing BIOS Allocation, CRT RAM Alpha lock key

171,174, Bl 151 45

-ASCII 197

- LPK 205,206

Altitude requirements 18 Application programming 41,

42, 151, 152, 155, 170 ASCII keyboard

ROM, How it Works

Dimensions

Product Codes

General

CTRLkey

Alpha lock key

Auto-repeat keys

Function key priority

Function key uses

Key code chart

Main key array

Numeric key pad

Repeat keystations

133

13 . 3

195-199

Asynchron~us, General 135 I/O Port # 157

Port sele~ion 42

Index

Attributes U57, U58 ROMs

Configuration sector

Enable, Disable

General

Set mode

Auto-repeat keys -ASCII

- LPK

B

BOOS, General BIOS Entry points

43

225

189

183

191

195

205

5 . A2-A5

Banked Physical Driver listing App. I

Device Initialization 133,134

Execute Physical Driver 161,162

Op. Sys.lnt. 152,174-176,178-181

Physical Driver Address Table (3

Programmable Functions 170

Backspace or cursor left 187 Bank switching

Example D4

System PIO 134

Z80-A Example 171,172

Banked physical driver listing 11-112

Basic monitor calls 01-03 Baud rate

1/0 Channel 135

Command 144

Generator 1:36

Host Terminal 145

Port assignments 156

Printer port 135

Table Kl

, Bell (tone, speaker) Business graphics, (desc.) 16,17

Control code 187 CRT control 183

Description 47 CRT Controller 43

Port assignment 157 CRT entry points 158-160

BIOS CRT font selection 43,134

CP/M-80 2.2 5, 151 Attributes 44

CP/M-861.0 151 Attribute selection 7

Accessing 151,152 Configuration sector 225

Cold boot Al Display specification 15

Console input 167. 168,A2 Graphics mode

Console output 168,A2 - 40 CPS 243

Console status 167,A2 -20 CPS 232

Entry vector table AI-AS Memory allocation 45

Example 152 Prog. considerations 186-193

Home disk A2 Scroll register 46

10BYTE-directed 110 167-169

Interface 151. 152

Jumptable 151

List device 153,154,167-169

List output A2

List status AS C Printer output (IOBYTE) 168

Printer status (108YTE) 169

Punch output A2 CCP, Description 5 Read sector A4 CP/M-80, (disk contents) 6-9 Reader input A2 Accessing BIOS 151,152

Sector translate 152,A5 Digital Research files 6, 7

Select disk 152,A3 Entry Vector Table Bl

Set DMA address A4 Prog. considerations AI-AS

Set sector A3 Xerox files 7-9

Set track A3 CP/M-86, (disk contents) 9, 10 Vectors 151 Accessing BIOS 151,152

Warm boot Al Digital Research files 9,10

Write sector A4 Xerox files 10

Bit mask, keyboard 225 CPU, (general) 2 Break switch, printer 240 ROM 133,134

Bus, system Description 41-44

Connector 27 Go To Command 140

Electrical/environmental 18 System display 183

Specific~tion 28-32 CRT, (general) 3, 158, 183 CRT output 158

RAM 41,45

2 'Index

Block move

Direct CRT display

Entry points

Fast CRT output

Font selection

10BYTE

Read sector

Select media format

Set direct CRT cunor

160

160

158-162

159

43,134

167,168

162

161,162

159

Write sector 162

CRT controller, (general) 43,44 Attributes 16, 17.44

Control signals (sync & video) 43

Design 16. 17

Font ROMs 43

Functional description

CTC (Counter Timer Circuit)

Cabling requirements: -40 CPS

16

42,134

252

- 20 CPS 236

Capacity, disk 207-211 Carriage return, disp. code 188 Carriage movement

-40 CPS

- 20 CPS

Caution, rigid disk Centronics Interface Channel A

510 Controller

Description

Entry pOints

Channel B SIO Controller

242

231

47 2,43,135

135,136

42

165

135,136,

Description 42

Entry pOints 163,164

Character codes, display 186-193 Character delete 192 Character devices 153, 154 Character insert ' 192 Character ~ets (information)

ROM 43

Specificitions 15.16

Index

Character sets (pictures) Graphics

Text

Character spadng -40 CPS

- 20 CPS

Clear screen Clear to end of line Clear to end of screen Clock

B086 speed

I-second interrupt

Z80-Aspeed

Code charts Baud rate table

Cold boot Cold start Cold start loader listing Command codes:

40 CPS Carriage movement

Control codes

185'

184

251

235

188, 190 188, 193 188, 193

2

174

2

K1-K2 K1

151,Al 177

G1-G6

242-244

Hex codes 245

Margins & formatting

Miscellaneous commands

Paper movement

Printing

Remote Diagnostics

WPcommands

20 CPS 231-233 Carriage movement

Control codes

Hex codes 234

Margins & formatting

Miscellaneous com mands

Paper movement

Printing

Remote Di~gnostics

WPcommands

Command set (monitor) 137-149 Summary table

Baud rate

137

3

Copy memory

Display memory

Extended memory test

Fill memory

Goto

Host Terminal

Input

Load from disk

Modify memory

Output

Protocol

Read disk sector

Typewriter

Verify memory block

Write disk sector

Communications: 510 Controller 135,136

510 Ports, description 42

Baud rate command 144 Comm channel (Port #s) 156,157

Connector (J4) 19

Host Terminal 144-146

10BYTE 167,168

\ Input Data 165

Input ready status 165

Output status 165

Port (J9), description 5

Protocol command 148,149

Settings, 40 CPS Printer 249,250

Strapping Options 25,26

Configuration sector 225,226, Configuration status 181 Connectors

(see Hardware Connectors)

Console devices 153,154 Console input IOBYTE 167

BIOS entry point ' A2

Console output IOBYTE 168 BIOS entry point A2

. Console sta~us IOBYTE 167 BIOS entry point A2

4

Control codes, display 186-188 Backspace or cursor left

Bell (tone)

Carriage return

Clear to end of line

Clear to end of the screen

Clear screen !lnd home cursor

Cursor down-or line feed

Cursor left or backspace

Cursor right

Cursor up

Display next character direct

Escape

Home cursor

Horizontal tab

Line feed or cursor down

Restore previous attribute mode

, Set cursor character

Control key, keyboard - ASCII 197

-LPK 206

Control panel indicators-40 CPS 239,240

Break switch

Cover

Form feed

Here is switch

Line feed

Overflow

Parity

Power indicator

Print chk

Printwheel select

Reset

Ribbon/paper

Scroll

Spacing select

Control panel.switches -20 CPS 228

Form feed

Line feed

Pause

Index

Power indicator

Reset

Control sequences, CRT Codes 187,188

Table 186

Copy memory, (Monitor Command) 140

Counter Timer Circuit 134 Cover switch, (40 CPS) 240 CRT memory block move 160 CRT output 1 58

FAST CRT output 159 CRT RAM

Memory allocation 45

Scroll register 46

CTRL key, keyboard - ASCII 197

- LPK 206

Cursor, (general) 186 Cursor keys

-ASCII 195

- LPK 200

Cursor control codes Up, Down, Left, Right 187.

Host Terminal cursor control 147

o

DC system power DTR, SIO default Daisy-chain

SIO Controller

Rigidlfloppy interface

Data bits SIO defaults . Baud rate command

Configur.ation sector

Index

18 135

42

47

135

144

225,226

Get Config Status

Host Terminal

Pass 8 bits/keyboard

Pass 7 bits/keyboard

Data format, (LPK) Daughter board

ROSR monitor

SASI interface

Floppy connectors

181

144-146

190

190

200,201 47

38

J1 connector 1~

Rigid connector 39

Devices, character & physical assignments 153, 154

Device names, logical & physical 153, 154

Diablo printers - 40 CPS (630) 237-252

- 20 CPS (620) 227-236

Diagnostics, remote printer -40 CPS 244

- 20 CPS 233

Digital Research CP/M-80 files

CP/M-86 files

Dimensions 8" Floppy disks

8" Rigid disk

st" Floppy disks

40 CPS Printer

20 CPS Printer

ASCII keyboard

Display/Processor

Low profile keyboard

Direct CRT display Disable attributes Disk access connector (J 12)

Description

Disk connector (J 1) Floppy

Illustration

Rigid

Disk drive format

6-9

9,10

13

160 189 33

34-37

19 38

20

39

14

5

Disk drive storage 14 Dimensior'is 13

Disk drives 3,5 Graphics character set 185

Access times 207-211 Programming considerations 186

Caution 47 Text character set 184

Connector 47 Display, control codes 186-188 Dimensions 13 Backspace or left cursor

Specifications 207-212 Bell (tone)

Access times Carriage return

Bytes'per sector Clear to end of line • Capacity Clear to end of the screen

Encoding method Clear screen and home cursor

Formats Cursor down or line feed

Heat dissipation Cursor left or backspace

Latency Cursor right

Power dissipation Cursor up

Recording density Display next ,:haracter direct

Sectors per track Escape

Transfer rates Home cursor

Voltage requirements Horizontal tab

Disk driver Line feed or cursor down

Execute physical 161,162 Restore previous attribute mode

Firmware 4.7 Set cursor character

Media identification 213 Display, functional desc. 16 Disk mapping Display, ~scape codes 189-193

Description 48 Display manipulation '186,189 Device mapping 153,154 Display memory command· 138 Drive mapping table C2 . Display next character 188 Interleave 223,224 . Display/Processor 13, 183-193

Disk parameter block . Display specifiCations 15 (DPB) 214-218 Pixel resolution

8" Floppies Refresh rate

8" 10 Mb rigid Video bit rate

st" Floppies Video rate

Translate tables Documented system Disk parameter header storage C1, C2

(DPH) 213-218 Double density, Select media format 161 Select Media Format 161 Value(s) returned 162 Downcounter 42

Display 3,15-17,183-193 Drive mapping tables C2 Attributes 16,183 Drive selection

:

Business graphics 16 PIO Controller 134

Charact~r mode 183 Description 43

6 Index

Dual parallel port PIO Controller

Description

E

8" Disk access times', 8" Drives, dimensions 8" Floppy disks

Double-sided

Interleave

Rigid

Single-sided

Track formats

134

43

207-211 13

210,216

223,224

211,217,218 '

209,215,216

221,222

820-11 Device mapping General 153,154

Character devices

10BYTE

Logical device names

Physical device names

Physical devices

8086 1/0 Port assignments

CPU Port II­

Configuration ,status

Description

Dual CP/M-80/86

156

157

181

2,6,48

158

HostTerminal 147

Lock instruction 155

LogicallPhysical device mapping 154

Memory expansion PWB 132

Operating system files 9-11

Operating system interface 151

Schematics 128-132

System bus connector 27-32

Electrical Requirements AC 13 820-11-16/8 display

Disk driv~s

Index

Printers (40 & 20 CPS)

DC Disk drives

Display

Expansion slot

252,236

207-211

15

18

(See also Hardware Connectors)

Electrical interface 40 CPS Printer 246-250 A66 control switch

EIA interface

HPROS circuit board

Dipswitch module A

Dipswitch module B

Enable attributes 189 Enter key, unique codes 204 Entry points, CRT 158-160 Entry vector table A 1-A5 Environmental req. 18

Altitude

Humidity

Temperature

Escape codes Character delete

Character insert

Clear screen

Clear to end of line

Clear to end of screen

Disable attributes

Enable attributes

Line delete

Line insert

189-193

Pass 8 data bits from keyboard

Pass 7 data bits from keyboard

Position the cursor

Set blink attribute

Set graphic mode

Set inverse video

Set low intensity

Escape sequences I CRT

40 CPS Printer

ROSR translations

189-193

242,243

43

7

20 CPS Printer 221.222 Power indicator 239

Etch 1 CPU Specifications 251.252

J9 - strapping options 25 FIFO 48, 166 Schematics 109-116 Variables C1

Serial 110 Ports 42 Fast CRT output 159 Etch 2 CPU Fill memory command 139

J9 - strapping options 26 5·1-" Disk access times 207,208 Keyboard FIFO 48.166 5·1" Drives, dimensions 13 Schematics 117-124 5·1-" Floppy disks Serial 110 Ports 42 Disk Parameter Header 213

Even parity, host terminal 145 Double-sided 208.215

Examples Interleave 223.224

Bank switching 04 Single,sided. 207.214

Host Terminal 145.146 Track formats 219.220

List device status 152 Floppy disks 213-226 Monitor calls/BASIC 01-03 Connector (1) 19

Protocol command 148.149 Illustration 20

Start/Stop 8086 155 Disk parameter block (DPB)214-218

Z-80A Assembly Language 171·173 Disk parameter header (DPH) 213

Execute physical driver 161, 162 Interleave 223.224

Expansion slot, (general) 6 Track formats 219-222

Electrical 18 Font generator, 1/0 Port # 157 Extended memory Font ROMs (U57 & US8) 43

test command 139 Font selection 43,44, 134 40 CPS Printer 249.250

Form feed ·40 CPS 239

F ·20 CPS 228

Format, floppy disks 219-222 Front cover switches

4.03 ROM 135 -40 qps 238.239

40 CPS Printer 237-252 ·20 CPS 227.228

DC1/0C3 237 Function key HPR05 Priority • ASCII 196

Description 237.238 -LPK 205

Interface 247·249 Uses -ASCII 196

Access cover 238.239 - LPK 205

Command codes 242-244 Functional description 4,5 Cont. parael switches 239.240 BOOS

Electrica,l interface 246-250 BIOS

Font selection 249.250 CCP

OperatiQg codes 241 ROSR

8 Index

Operating systems -Interface 33

Ports Floppy disk (J1) System monitor - ROM - Connt;!ctor 19

-illustri;ltion 20

-Interface 38

Keyboard connector (J2) 19 Parallel port (J8)

G· -Connector 23

-Illustration 21

. - Picture 24

General Purpose PIO Power supply·(JS & 6) 22 Ports A & B, Description 43 Printer connector (J3) 19 Specifications 135 Rigid disk (J 1)

Get address of time- - Connector 19

of-day variables 180 - Illustration 20

Get config status 181 -Interface 39

Get disk map table System bus connector (J 13) address 178, 179 -Connector 27

Go to command 140,141 - Description 28-32

Graphics character set 18S Vid.eo connectors (J7) 22 Mode 183 Hardware description 2-4

Disk drives

Display

Keyboards

Printers

H System board

Hardware handshaking 148 Hardware interface • 5,6

HMINMI COMM port

- 40 CPS 241 Disk drive

- 20 CPS 230 Expansion slot

HPR05 desc. - 40 CPS 237,238 Keyboard

Hardware connectors 19-39 Parallel port

COMM connector (J4) 19 Printer

COMM port (J9) connector Hardware scrolling 46 - Etch 1 CPU 25 Head Step Rate,' - Etch 2 CPU 26 Configur.com 8

Daughter board Configuration sector 225 - Floppy 38 Here Is Switch, (40·CPS) 239 -Rigid 39 Hex codes

Disk access (J 12) - 40 CPS 245

- Description 34-37 - 20 CPS 234

Index 9

Home cursor (ESC code) 188 Home disk, BIOS A2 Horizontal Motion Index

-40 CPS

- 20 CPS

Horizontal tab - display Host computer

241'

230

187 144

Host Terminal mode Baud rate

144-148

Channel

Command set

Data bits

Monitor output command

Option Summary

Parity

Port

Stop bits

Humidity requirements 18

I/O Channel, setting baud rate 144

10BYTE CP/M-SO, device mapping 153

CP/M-a6, device mapping 154,155

Console input 167

Console output

Console status

Directed 1/0

168

167

167-169

Printer output 168

Printer status 169

Input command (Monitor) 141 Input/output

Port assignments 156, 157 SOS6

CRT!

CTC

GP-p,IO channel A

10

GP-PIO channel B

SIO channel A

SIO channel B

ZSO-A

Baud rate

Double density select

Font generator

Scroll register

Single density select

Speaker

Interleave, (flo'ppy disks)

Interrupt mode 2 Interrupt vectors

CTC

GPPIO

SIO

Disk

System PIO

Interrupts CTC

GPPIO

223,224 41, Cl Cl, C2

134

135

510 135

Daisy-chain vectoring 42

Disk 34-37

Expansion slot

System PIO

J

2S-32

134

J 1 (Disk access) 19, 20, 38, 39 J2 (Keyboard) , 19 J3 (Pri nter) 19 J4 (Communications) 19 J5 (Power supply) 22 J6 (Power supply)' 22 J7 (Video) 22 J8 (Parallel' connector) 23, 24, 43 J9 (Parallel port, Etch 1) 25

Index

J9 (Parallel port, Etch 2) 111 (Option connector) J 12 connector

26 43, 135

33-37 27-32

151, 1 58, A l-A5 J 13 connector Jump vectors

K

Key code chart: - ASCII 198.199

-lPK 202-204

Keyboards 3, 5, 195-206 FIFO variables

ROM

ASCII

Bit mask

Connector (J2)

Data input

Device Mapping

Dimensions

Enter key, unique codes

Handler

Input (System PIO)

Input channel

Cl

133

195-199

224.225

19

157-165.C1

153.154

13

204

201

43.166

134

Interface (FIFO variables) 48.(1

low profile

Product Codes

Status

Translation tables

L

LsT 153,154, 167-169 (device mapping) ,

Line delete ..

Index

200-206

3 166

201

192

Line feed switch (40 CPS) 239 Line feed or cursor down 187 Line insert 192 List device 153, 154, 167-169 List output, BIOS A2 List status, BIOS A4 Listings: Appendix

BIOS jump table

ROM

Banked physical driver

Cold start loader

Macros & Symbols

H

E

G

F Position-encoded kybd handler J

Load from disk command 142 Logical device names

820-11 153

1~ 1~

Logical to Physical Dis~ Mapping Table 178, 179, C2

Logical/physical translate tables 213

Low profile keyboard 200-206 Auto-Repeat

Cursor'keys

Data format

Dimensions

Enter key. unique codes

Function key' uses

Key code chart

Keyboard handlef

Main key array

Numeric key pad

Low profile ROM 133,134,204

M

MS-DOS 10,11,151 Macros & Symbols listing Fl-F24

11

Main key array • ASCII 195

·lPK 200

Margin & formatting codes ·40 CPS 242

·20 CPS 231

Memory allocation 44,45 Memory banks 41-43 Memory contents 138 Memory pointers C2 Memory size: RAM/ROM 2 Microsoft 10,11,151,01 Miscellaneous f.unctions 117-182

Cold start

Get configuration status

Get disk map table address

Get TOO variable

Start screen print

Warm start

Miscellaneous printer codes: ·40 CPS 243

-20CPS 232

Mode 2 Interrupt Vectors Cl, C2 Modem 42, 135, 136

(channel, baud rate generator)

Modes of operation 145 (Host terminal)

Modify memory Monitor calls in BASIC Monitor commands

12

Summary table

Baud rate

Copy memory

Display memory

Extended memory test

Fill memory

Goto

Host Terminal

Input

load fro'!'disk

Modify memory

Output.

138, 139 01-03

137-149 137

Protocol •

ROSR

Read disk sector

Typewriter

Verify memory block

Write disk' sector

Monitor entry vector table B 1 More interrupt vectors C2

N

Numeric key pad -ASCII

-LPK

o

1-second interrupt Offset, display Operating codes:

-40 CPS

195

200

170, 174 46

241·244

230-233

13 - 20 CPS

Operating environment Operating mode switches:

- 40 CPS 238-240

-20CPS

Operating System General

227-230

4,5

Interface 151-18:!

Output codes, keyboards: - ASCII 198,199

-low Profile 202-204

Output command 141, 142 Output ports 134-136 Output status, comm 165

Index

Overflow Switch (40 CPS) 240

p

PIO, (general) 43, 134, 135 Paper movement, printer:

- 40 CPS 243

- 20 CPS

Parallel 110 controller Bank switching

Floppy drive select

Floppy side select

Font selection

Keyboard input channel

Parallel port Connector

Parallel printer Parity

231

134, 135

2,6,43 23,24

43, 135

Host Terminal 145,146

40 CPS switch 240

20 CPS switch 229

Pass upper bit of data from keyboard 190

Pause switch (20 CPS) 228 Physical device names

820-11 153 16/8 154

Physical Disk Interleave 223,224 Physical driver

Address table C3 Request block 161, 162, 176, C3

Physical format, disk drives 219-222

Physical to Logical Device Mapping 167

Pixel resolution 15 Ports

Commun,ication 4,5,19,25,26,135

General 4

Parilliel • 23,24

Index

Printer 4,5, 19,135

Position-encoded keyboard Handler

Listing

Position the cursor Power indicator:

-40 CPS

201

J1-J3B

191,192

239

- 20 CPS 22B

Power on sequence • 133-136 Power supply (J5 & 6) 22 Print Chk switch (40 CPS) 240 Printers, general 4,227-252

A66 Control switch

40CPS

20CPS

Baud rate command

Baud rate generator

Buffer

Channel

Connector (J3)

Dimensions

Entry points

Output

249,250

237

227

144

136

238,251

42

19

13

163,164

163,,164

Overview

Port

163

42,43,135,136

Status 163

Printing commands - 40 CPS 243

~ 20 CPS 232

Printwheel selection (40 CPS) 238 Product code numbers 3, 4 Programmable

functions: 170-176 l-second interrupt

Processing while 1/0 pending

Sample program

Soft disk error

Soft error recording

System exit points

Programming considerations: BIOSA 1-A5

CRT Control codes 187,lB8

13

CRT Escape codes 189-193

Display 186-193

Escape sequences

-40 CPS 242.243

- 20 CPS 231.232

Printer control codes

- 40 CPS 245

- 20 CPS 234

Proportional spacing, (HMINMI) -40CPS 241

-20CPS 230

Protocol command 148, 149 XONIXOFF

Hardware handshake

Serial printers

Punch output, BIOS

RAM, CRT Attributes

Driver

R

Font Selection

Memory Allocation

Offset

Power on

Refresh RAM

Scroll Register

A2

41-46

ROM 5,41,42, 133-136, 158 ROM listings E 1-E 11 0 ROM/O.S. Interface 158 ROSR 5,41,44,47,133-136,170 RS232 (See Comm port) RTS 135, 136 Read disk sector command 143 Read sector 162, AS

• Reader inP4t A2 Real Time C'lock 174

(See also pock)

14

Refresh RAM" Memory

Rate

Remote Diagnostics: -40CPS

- 20 CPS

Repeat keystations: -ASCII

Reserved ASCII Keys

-LPK

Low Profile Keys

Ports

I Tracks

Reset Switch (40 CPS) Reset, Power on Resident monitor

commands

43 183

15

243.244

232.233

195

205

198.199

202-204

157

214-218

239 133-136

137-149 15 Resolution, screen

Restore previous attribute mode 187

Ribbon/Paper switch (40 CPS) 240 Rigid disk conn. (J1) 19,20,39

s

7 data bits (SIO controller) 110 1797 - Western Digital 279-302 6-8k ROM 2, 42 16/8 physical device mapping

153, 154, 167-169 Application programs

Communication channel

IGBYTE

Logical device names

Physical device names

Physical devices

64k RAM 2,42 ROSR monitor

Index

Z80-ACPU SA 1403

Proce~sing while 1/0 pending 174 Soft Error Recording

SA 14030 controller 176

254-278 SA400l207, 214, 219, 220,223, 224 SA450 208,215,219,220,223,224 SA800 209,215,216,221,224 SA8S0 210,216,221,224 SA 1004211,217,218, 2i3. 224 SASI interface 47 510, (general) 42 510 Channels:

-A 135,136 -B 135,136,163,164

510 controller SIO-B

42, 135, 136

Input data 163 Input ready status 163 Output data 163 Output ready status 164

Sample programs Z80-A assembly 171-173 Monitor calls - BASIC 01-03 Bank switching 04

Schematics 109-132 Screen attributes - see Attributes Screen codes 186-193 Screen print 182 Screen resolution:

Description Specification

Scroll switch (40 CPS) Scroll register .

Hardwa~e scrolling Offset

Sectors per track Sector translate, BIOS

Table Vector

Sectran Seldsk

Index

16 15

239 45,46

207-211 AS 213 152

152, A5 152, A3

Select media format 161 Serial I/O Controller 42, 135, 136

Async modem port Baud rate ChannelB Printer port

Set blink attribute Set cursor character Set OMA address Set direct CRT cursor Set graphic character Set inverse video Set low intensity Set sector Set track

191 187 A4 159 191 191 191 A'3 A3

Shugart - 14030 Side selection Single density Skewing

253-278 43,134, 161

161

Soft disk error Soft error recordiflg Spacing select (40 CPS) Speaker (bell, tone)

. 223,224' 176 176 238

Specifications . - 820-11 & 16/8

Dimensions Disk drive format Disk drive storage Display Electrical Operating environment

Specifications

47, 157

13-16

40 CPS 251,252 Cabling requirements Character set Character spacing Power requirements Print buffer Print line Printwheels

20 CPS 235,236 Cabling -requirements

15

Character set

Character spacing

Power requirements

Print buffer

Print line

Printwheels

Start screen print Storage capacity Strapping options,

Comm port Strobe, printer Synchronous

1/0 Port # . Port selection

System board System bus

Connector (J 13)

System configuration System display

Graphics character set

182 207-211

25,26 135

157

42

2 18~48

27-32

181 183-193

Programming considerations

. Text character set

System exit points 170-176 System monitor,

ROM 4, 133-136 System PIO System storage

43,134 C1

T

20 CPS Printer Dimensions General'

13 227-237

16

Cabling requirements

Command codes

Control panel switches

Fronf cover switches

Horizontal motion index (HMI)

Powt!r indicator

Operating codes

Operating mode switches

S peci fications

Vertical motion index (VMI)

Temperature req.· 18 Text character set 184 Theory of Operation 41-48

6-Bk ROM memory

64k RAM

CPU

CRT controller

CTC

PIO Controller

510 Controller

Bus expansion

Daughter board

Dual parallel ports

Memory allocation

Parallel keyboard interface

Scroll register

Serial 110 ports

Speaker

Time constant

Time-of-oayand timer variables

Timer variables Tone generator ..

(speaker, bell)

47, 180,C4 180,(4 47,157

Track format, disk. drives

Transfer rates Typewriter command

v Vector table Verify command Vertical Motion Index:

-40 CPS

- 20 CPS

207-211 207-211

144

81 140

241

230

Index

Video bit rate 15 Video connector (J7) 22 Video rate 15

w

WD1797 Warm boot

174, 176, 279-30~ A1

177 Warm start Western Digital

General

Reprint

WP commands:

174.176

279-302

40 CPS printer 243

20 CPS printer 232

Write disk sector command 143 Write sector, BIOS 162, A4

x XON/XOFF protocol Xerox files

CP/M·60 disk

CP/M-66 disk

Xtended memory test command

Index

148

7·9

10

139

Z80-A

z

2,41,42,47-108 133, 158, C1, c2

Assembly language ex. 171·173

Zilog Reprint' r 49-108

17

18 Index