Technical Reference Options and Adapters Volume 2 Apr84
Technical Reference Options and Adapters Volume 2 Apr84
-- --- -
- ---
- --- Personal Computer
- - ---
-----
--_.- ---
Hardware Reference
Library
Technical
Reference
Options and Adapters
Volume 2
Revised Edition (April 1984)
The following paragraph does not apply to the United Kingdom or any country where such
provisions are inconsistent with local law: International Business Machines Corporation
provides this manual "as is," without warranty of any kind, either expressed or implied,
including, but not limited to the particular purpose. IBM may make improvements and/or
changes in the product(s) and/or the program(s) described in this manual at any time.
This product could include technical inaccuracies or typographical errors. Changes are
made periodically to the information herein; these changes will be incorporated in new
editions of the publication.
It is possible that this material may contain reference to, or information about, IBM
products (machines or programs), programming, or services that are not announced in
your country. Such references or information must not be construed to mean that IBM
intends to announce such IBM products, programming, or services in your country.
Products are not stocked at the address below. Requests for copies of this product and for
technical information about the system should be made to your authorized IBM Personal
Computer dealer.
The following paragraph applies only to the United States and Puerto Rico: A Reader's
Comment Form is provided at the back of this publication. If the form has been removed,
address comments to: IBM Corp., Personal Computer, P.O. Box 1328-C, Boca Raton,
Florida 33432. IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligations whatever.
ii
Federal Communications Commission
Radio Frequency Interference Statement
CAUTION
The product described herein is equipped with a grounded
plug for the user's safety. It is to be used in conjunction with
a properly grounded receptacle to avoid electrical shock.
iii
iv
-- ---
--
-
-
- --
- --
-- -- -
--
-
---
- ---
Personal Computer
--_.- -- Hardware Reference
Library
mM Monochrome
Display and Printer
Adapter
6361511
ii
Contents
Introduction ................................... 1
Monochrome Display Adapter Function .............. 1
Description ................................ 1
Programming Considerations .................. 5
Specifications .............................. 9
Printer Adapter Function ........................ 11
Description ............................... 11
Programming Considerations ................. 13
Specifications ............................. 17
Logic Diagrams ................................ 19
ill
iv
Introduction
Description
The IBM Monochrome Display and Printer Adapter is designed
around the Motorola 6845 CRT Controller module. There are
4K bytes of RAM on the adapter that are used for the display
buffer. This buffer has two ports to which the system unit's
microprocessor has direct access. No parity is provided on the
display buffer.
Two bytes are fetched from the display buffer in 553 ns,
providing a data rate of 1.8M bytes/second.
Monochrome Adapter 1
Characteristics of the adapter are:
2 Monochrome Adapter
The following is a block diagram of the monochrome display
adapter portion of the IBM Monochrome Display and Printer
Adapter.
Processor (12)
Address Memory
Address
(1~ Multiplexer (10) (10)
2K Memory
2K Memory
Character
Attribute
Code
(8)
Processor Data
Bus (8)
Data I~
Gating I"""
Character
Clock ,Ir
BDO-7 I (8)
Octal 1 Octal
MA ~
Latch Latch
f--
RA ~ Character Attribute
AO
~ -.. Generator Decode
(4)
Chip MC6845
Select
-.
~
CRTC
DOTCLK
Timing
Shift
Register
L...
...
Signals Video
Process
Serial Dots Logic
r
HSYNC, VSYNC, CURSOR, DISPEN
Character
I
Clock
*
Monitor
Direct Drive
Outputs
Monochrome Adapter 3
4 Monochrome Adapter
Programming Considerations
The following table summarizes the 6845 controller module's
internal data registers, their functions, and their parameters. For
the IBM Monochrome Display, the values must be programmed
into the 6845 to ensure proper initialization of the display.
IBM Monochrome
Register Register Program Display
Number File Unit (Address in hex)
Monochrome Adapter 5
The IBM Monochrome Display and Printer Adapter supports 256
different character codes. In the character set are alphanumerics
and block graphics. Each character in the display buffer has a
corresponding character attribute. The character code must be an
even address, and the attribute code must be an odd address in
the display buffer.
7 6 5 4 3 2 0
Character Code
Even Address (M)
7 6 5 4 3 2 0
FI R G
I B
I I
I R G
B I Attribute Code
Odd Address (M + 1)
Foreground
~
Intensity
I I I Background
I Blink
Background Foreground
R G B R G B Function
0 0 0 0 0 0 Non-Display
0 0 0 0 0 1 Underline
0 0 0 1 1 1 White Character/Black Background
1 1 1 0 0 0 Reverse Video
6 Monochrome Adapter
Interrupt level 7 is used on the parallel interface. Interrupts can
be enabled or disabled through the printer control port. The
interrupt is a high-level active signal.
The following table breaks down the functions of the I/O address
decode for the adapter. The i/O address decode is from hex 3BO
through hex 3BF. The bit assignment for each I/O address
follows:
1/0 Register
Address Function
3BO Not Used
3B1 Not Used
3B2 Not Used
3B3 Not Used
3B4 6845 Index Register
3B5 6845 Data Register
3B6 Not Used
3B7 Not Used
3B8 CRT Control Port 1
3B9 Reserved
3BA CRT Status Port
3BB Reserved
3BC Parallel Data Port
3BD Printer Status Port
3BE Printer Control Port
3BF Not Used
Monochrome Adapter 7
Bit
Number Function
0 + High Resolution Mode
1 Not Used
2 Not Used
3 + Video Enable
4 Not Used
5 + Enable Blink
6,7 Not Used
Bit
Number Function
0 + Horizontal Drive
1 Reserved
2 Reserved
3 + Black/White Video
8 Monochrome Adapter
Specifications
9-Pin
Monochrome
Display
connector
o
1~6
5U
o
9
Ground 1
Ground 2
Not Used 3
Not Used 4 IBM
IBM
Monochrome
Monochrome Not Used 5 Display and
Display
+ Intensity 6 Printer Adapter
+ Video 7
+ Horizontal 8
- Vertical 9
Note: Signal voltages are 0.0 to 0.6 Vdc at down level and + 2.4 to 3.5
Vdc at high level.
Connector Specifications
Monochrome Adapter 9
10 Monochrome Adapter
Printer Adapter Function
Description
The printer adapter portion of the IBM Monochrome Display and
Printer Adapter is specifically designed to attach printers with a
parallel-port interface, but it can be used as a general
input/ output port for any device or application that matches its
input/output capabilities. It has 12 TTL-buffer output points,
which are latched and can be written and read under program
control using the microprocessor In or Out instruction. The
adapter also has five steady-state input points that may be read
using the microprocessor's In instructions.
The output ports may also be read at the card's interface for
diagnostic loop functions. This allows faults to be isolated to the
adapter or the attaching device.
Monochrome Adapter 11
The following is a block diagram of the printer adapter portion of
the Monochrome Display and Printer Adapter.
L 8 25-Pin D-Shell
Connector
BUffe~r8:::....>-l~Data h_.....,8"--~
Bus
-..
Latc...
.
~ Enable ~ Clock
Trans- 14C8~___+-____~
r ceiver
DIR
L...---..J
,DIR O.C.
SLCTIN
Read Drivers
A~ Data
STROBE
Write Data I----r~
Command ~::..:..:..:~:....:.-:_ _ _ _+---.J AUTO
Decoder Write Control
FDXT
Read Status
Read INIT
I Control
Bus Control
Buffers Latch
~ Enable
~ 4 Clock f-
. 5
Y Enable
SLCT
r.
Reset
r rl Clear
PE
ACK
BUSY
12 Monochrome Adapter
Programming Considerations
The printer adapter portion of the IBM Monochrome Display and
Printer Adapter responds to five I/O instructions: two output
and three input. The output instructions transfer data into 2
latches whose outputs are presented on pins of a 25-pin D-shell
connector.
The instruction captures data from the data bus and is present on
the respective pins. Each of these pins is capable of sourcing 2.6
rnA and sinking 24 rnA.
It is essential that the external device does not try to pull these
lines to ground.
Bit4
IRQ
Enable
Monochrome Adapter 13
respective pins as shown in the previous figure. If bit 4 is written
as aI, the card will interrupt the system unit's microprocessor on
the condition that pin 10 changes from high to low.
14 Monochrome Adapter
This instruction causes the data present on pins 1, 14, 16, 17, and
the IRQ bit to be read by the system unit's microprocessor. In
the absence of external drive applied to these pins, data read by
the system unit's microprocessor will match data last written to
hex 3BE in the same bit positions. Notice that data bits 0-2 are
not included. If external drivers are dotted to these pins, that
data will be ORed with data applied to the pins by the hex 3BE
latch.
These pins assume the states shown after a reset from the system
unit's microprocessor.
Monochrome Adapter 15
16 Monochrome Adapter
Specifications
• • 14
• •
• •
• •
• •
• •
• •
•
• ••
• •
• ••
13 • 25
0
- Strobe 1
+ D.ata Bit 0 2
+ Data Bit 1 3
+ Data Bit 2 4
+ Data Bit 3 5
+ Data Bit 4 6
+ Data Bit 5 7 IBM
+ Data Bit 6 8 Monochr orne
Printer + Data Bit 7 9 Display and
- Acknowledge 10 Printer
+ Busy 11 Adapter
+ P. End (out of paper) 12
+ Select 13
-Auto Feed 14
- Error 15
- Initialize Printer 16
- Select Input 17
Ground 18-25
Connector Specifications
Monochrome Adapter 17
18 Monochrome Adapter
110 SLOT
~
74LS244
r---------~II~~'-----------
_.
(8HT6) DO '09 A31 BAD ISHT 2.4.81
0
'" ~=========,~:; l U~D l ~:========= ."
Ol ADB "0 BAI [8HT2.4.81
02 AD' [8HT2.4.81
03 AD6 A28 BA3 [8HT2.4.8] (JQ
04 AD5
"
_.
~
05 A04
D6 A03
~
18H161 D1 .02 A4 [8HT2.4)
A27
(SNT9) +IR07
." ".
A"
A23
A7
AD
[8HT2.4)
(8HT2.41 ~
Ai (8H12.41 (JQ
'" AID [8HT2]
'"
A20
A16
All
Al5
[8H12]
[8HT4)
""'l
~
Al5
AI4
Al3
AI,
All
A16
AI7
AI8
AI'
AEN
(8H14)
[8HT4)
(8HT4)
[8H14)
(8HT4.6)
a
r.IJ.
DECOUPLINGCAPACITORS
'03
}: ."
DOl
BID
-5'
GROUNO~
m '09
BlI
74LS125 11
+IZV
-MEMW [8HT3.4)
f
.12 r---------~12~IUsgl~C~I3~----------- -MEMR (8HT4.61
59)~""'------------- -lOR
1-
DO' 1----------'74,,'::.:S1.::':CjIUsgl";~>__'3'--...... 13~---'.-LS-04----- +RESET (8HT2.3.5]
f 820
:;~;~~~~~~~~~~~~~~~I'i~:L~'Y~7R
i: 6
11 3A 4Y
2Y
3Y r[-~MA2==
~:MA3-
RMAO -
RMAI -RMAO~65 ~
-RM~~=+
u "
Al
",,,,"",",,,,,,,",,,,,,,-,--:::4,:~Z114l2 :;~;r*-,', eel
- H}- ceo 18HT 6.101
10 38 U18
~! :: SEL G l-'~-"-'--'---'c-"-"-'~-", -:::;=+:: U15 :~~!Ill ~~i t
(8HT 6.10)
74LS157~ I~~ -RMA6Jt- A6
53 18 IV 74-- ,RMA4-- ; A:O,' r- =:::!t:~ U14
2A -t--~MA5 4 1t ~
- RMA9
1~ 28 ~~ f2~MA6== 3 :: ~ cs
4Y ~RMA7--'-...,-"",,"",,,i' ~ ---+ ~
;,
10;: A5 U13 U12 I
----------.-++f++-++f---~-4l-S1-57~:~.Ll 3 18
rrr-----,::,::7, 15
IV 4--RMAB-
~ ~i!~I/04~:;~~11~E~E8~C~'~~~~~~i ee7
[SHT 6.10]
T
18HT 6.10)
_ _ _ _ _ _ _ _ _ _H+f++t+H-+------T_---;5i-j2A 2Y L- RMA9-= J ~
-jt !i,U163Y~#4lSI39
-----------H+f++-++f++-+~"'-.-l1313'14B~ G4Y.!.L I~ iro 2 4
L -H+H-+++H-+--h---'.J'
-=-
15 1 IGU7 fv1
3 IB
ATO (8HT 5.6)
+-""""""""'""----. ATl
T
~~
AT!
AT' (SHT 5.6)
15 ~~ ~~~ 11
74lS04
I 11~ 10 574lS02 AT. [8HT 5,61
--------v-- 6 ) U17 •
AT5
AT6
AT7
T
(8HT 5,6)
RAO 18HT 7.12)
RAl 18HT 7.12)
RA2 (8HT 7.121
RA' (SHT 5,71
-~l-J~~~~~~~~~¥~~~
CURSOR (8HT 5)
HSYNC (SHT 5)
VSYNC ISHT 5)
DISPEl ISHT 5J
(SHT3) ·WE
18HT 11 +RESET dE
9 74886
u~
15 +5V
RPJ
r '1l/
U2
T 74S1B
+JUMPER ISNT4.51
~
0' (SHT5)
10 Ul00 8
113~,111 1 74lSOO
U25 3 SII (SHT10)
~:::!p
iV~ L..:::::::i;
+5V ' U6
3D 311
40 U1 40 1O
4~D11
U25 6
1 74SI12A
12 J
K U' 1
74LS1O
741810 14 51 50
+5V~fLRQg
• B~LK 5l~TC8 ~LS04
1 , 10 PH 'T ~6 ·WE IS'T'.61
(SHT 1)-RESEl '~ ~ 13 eLK
U44
(SHT1)-MEMW
-..:s
14LSD4
3~ • 74LS112A r ~6
374811
+CACS ceLK ISHT2j
ISHT"
ISHT"
E
~I
1 U2 ~ 2 2 5 .r:J4LSr
12 U57 13 9 U2 +CCLK 18815.101
,SHT., -CPU MSEl
.,v·" 0 r--i-J
1 eLK U5 ~ 13 U2 12 -CCLK (SHT2]
1 74~ 10 p~LK 0 9
15 elR 11 74lS74
6 74LS153
3 74LS74 -XACK
~' lL~LRU' ;1 • T
51CD
;~~ 1l U3
I I ·,v 1 CLR ' -
TESTOSC : IY 1 +XACK ISHT~
'EJ ~-
132C3II,D
MHZ 8 -=- I 15 .tLRVIDEO (8815.7.101
7 OSCI
ISIIT 2J DISPEl
ISIIT2JCURSOR
,--
I
~211'07
74LS17
43 10 105
3Q 10
-~"8~;:r -CURSORDLY
-DISPENOlY
+DlSPEN OlY
(8HT5)
(8H17}
(SHT1)
11 30 U55
+CURSDRDlY (SNT5)
(SHT2) HSYIIC 13:: ::~
15
+HSYNCDLY IS'T~71
(SHT2) VSYlfC 1460 60 +VSYNCDlY 18H15.11
ISHT3)+ CClK
~
-----.<
I 12074814
II
474lS32
B
10 CLK Q9 5 100
..V
~~RU1OI
ISHT 2)
,"lSOO~
~13 U53 11 "'GRPDCO ISHT8)
ISHT 11
ISHT II
·IOR
-lOW
,"53P!- 3 , 4 14l3Z
"56 5 U43 6 6845CS (SHT 2)
~.
(SHT1) BA3
~
ISHTI)
(SH-T 11
"'AEN
AS
'S2A
5 GZB ~~ G1 - 15 "'6845CS (SHT 3)
ISHT II
(StlTI)
.,
AS
r--!-3
,, 61 U52
e
B
Y7 I
4 GZA
5 GZB
YO
Y2 13 -STATUSSEl I
"44
-SEL 1 (SHT1)
(SHTI)
(8HT 1I
A4
B..
• L-
3 e
"50
(SHT1) BAI , B
(SHT1) BAO 'L-
ISHTll
.. ~
AS 10 U46 B
2 A
14lS139
YO 4
·RDGATECC ISHT6I
~5
-ROGATE AT (SHT 61
(StlTI)
ISHT II
(S8TI)
-MEMR
-MEMW ~
5 U46 6 5 ~
, G2B
"51
(SHT1) .,9
'18
.11
G2A
G1 fB • -CPUMSEl (S8T3)
~
e 214lS02 14lS04
~1
AI6 , B 5 13 U46 11 OATAGATE (S8T 6)
, A
6
~
ISHT1) AI5
'--- "56
14lS244
iSHT~ "'HSYIICDlY '~'B BOD (SHT6)
(S8T1) +lV1DEO q I~
1"001::
B01
B..
B03
(SHT61
ISHT6I
(SHT6I
(SHT3) "CUR8DRDLV
~ 10 U3 B
'---h. 14S2D
[SHT7) "ENABLE BUNK 4 ""p!--
(SHT3) -CURSDRDLV 5,--1"
(SHT21 ATO
All
!~ 0 O!
ATDX
ATIX
3n
4 0
1 6 AT2X 1
An
AT3
8
13 "31
9
12
AT3x
AT4X
8
13 • Ilf) (SHT71
AT<
AT5
14 15 AT5X 14 "3D
11 AT6X 11
AT6
18 "
19 AT7X
" 19
IfCl'
(SHT2) AT7
1
ISHT71 "VIDEO ENABLE CLR
11
~
J(~
18HT3] "CCLK
~
':'2
"A~:~: [SHT 7)
:~
ISHT II -RESET
U26 8
ISHT3) -CLRVIDED
[SHT4) "SOOTS I
~
I I
ISHT3) 05
4~ 974LS02
L9~ I CLK
13 U43 11
flt :~~
--T :'
~~~
-fO]
8 U27
10
13
CLR
10 10~
l~
"5V U49
1 1174LS02
15
I 4 748B6
:: 2 8
~13 ,5220
"29 20 7 "RVV 5~ "B&WVIDEO ISHT7)
1
3 C V1 3Q 10 +UNDERUNE
=
3D
~
L---
= ~G2AY015 -B[OI
=
~
_ 5 G2B
+5V~Gl
I A V7
7 -B(71
SERIN (SHT10]
2 B U48
~ I
3 C
~
~~
ISHT11 SEROATA
I
'A3
"'2
,AI
1 81
2 ~ U41 V4
11 13
U
12
;-
... (SHT21 ",0 3~
~
.~
Monochrome Display Adapter (Sheet 5 of 10)
~
ISH 11 .., N
1 74LS32
"'a::"
2 UIOa J
[SHI] 10 R
[SH 11 ·MEM R
(SH 3) DATAGAT E
0 ISH 21 CC 0
=
0
/')
cc 1
CC 2
,
CC 3
'1
CC
if
0
1
[SH 2)
CC5
CC 6
CC 7
e
~ (SHI]
>
Co
~
'CI
~
...
~
ISH 3) +XACK
(SH 4] ·ROSATEC c
(SH 3) ·WE
[SH 2) AT 0
AT 1
AT 2
AT 3
AT ,
1
ISII2]
AT 5
AT 6
AT 7
ISH 41RDGATEAT
_
_~II!'liJ:::7QI4i~!![!
(1 i!
1312
il
eLK
B03
=\/~
---BOO
---B01
---B02
---B03
---B04
~ B06
B05
B07
(SH 2.4}.8,9]
[8112.4.8,9)
(8112.4.7.9)
[8112.4,8,9)
(SH2.B,91
(SHZ.7.B,9]
(SH 2.8,9)
(SH 2.8.9)
~ ~ R2
(SKT51 -?IA
j ~ l~
~" TV..!... .!. A
I
PINa
-!-2I U63
~2B "L ~
PIN4
+13A
~3B 3Y~ .! ~ PIN5
14
Iml 13 4A
r
8
4Y 12 .!L
"" PIN6
(SKT5) -HIGHLIGHT
I"
ISHT 5) +ALPHA DOTS
(SHT31 -BiSPENDLY
SEl
15
• ~ -s 200
C4il20PF J3
9PIN
0-8HEll
r
HI CONNECTOR
+5\1 4_~ PIN 1
t=fi? 3 DClK
U45n~5 4 74LSOB
PIN2
-=j
11
·VERTIlRIVE ----PIN9
(SHT3) +VSYNC DU 148.8
~
U64
1I
r
2 U54 3 C1
(SKT3) -JUMPER
~ -c
UIOI +lVIDEO 18HT41
~ ~ I
8 (SHT51 +B/WVIDEO
+5V-+PR
, 0
Q 5
=
n
If
(SHT~ DOTClK
9 74LSOD
eLK eLR
'-------f,"-
,....1!!:!!!!..
~
ISHT 10) Lee7 13 28
@U25 8
(8HT 101 lee6
~ U42 74lS04
~ 'h'
-ClRVIDEO 14 11 174811
(SKT3) 2A
-..
15 'V1 12
(SRT 101 lee5 '0 V 13 U"
8ERDATA (8HT5)
~ (SNT lQ CDEMBITD
'---
r
~ ISKl3) +DISPENDlY
~
Ul Monochrome Display Adapter (Sheet 7 of 10)
~
cr\ Jcsrle5*cs*csITcslcslcslcslo02''''
1I=:!10~1:~~
ISHEET 61 BOD I I OATAO PIN2 _ _
~
DATA 1 PIN3 _ _
(SHEET 6) BDl ---
-- T
\~
BD3 B 9
(SHEET 61 B04 PIN6--
=
~
ISHEET6) BD5 - -
{SHEET6IBD6 - - -
'ISHEET61 BD7
i-
~
.----------"-'-1>' eLK
'9
OATAS
PIN1--
PIN8---
PIN9--
25-PIND-SHEll
CONNECTOR AND
SHEEl9
DE
PIN1~'
=
e
~
>SV --'-''''------.----.--.------.-,
=->
PIN2
7405 PIN 25
800 3 ~, ~'J>o-,-,----,,-3~.+---,6't---.--------,7+---,5't--_-S.=cT",RO=BE PINI---
~ ~~~ lQ~2
25-PIND-SHEll
...
~ \~ 50
~6D
30 7
4010
llr::; 10
V
'
I
9~,t'05»"-'r--+---1---"-""-'-'T
I
PIN 16---
=========~~~~~~~~I5~'~i·~~:'1~~i'~~~~======================~~~~~==============::1~===
(SHEEl91
ISNEETlJ-IOW 14 2G 2Y2 1 C5::c .0022#1
I=:~N :: ::~ :;~ ~
-RPA
----:=l:,::Ie
ISHEEl91
USI - -RPB (SHEEl9)
tV2 5 -RPC (SHEEl9)
~~
NOTE:exARE CAPACITORS PROVIDED ON OUTPUTS FOR FILTERING. NOT
74lS02 USEDDN PRESENT CARD ASSEMBLY.
ISHEET11-IDR -------jf-""':~~~U;;57;-,4
ISHEET1) BA3
(SHEETIIBA2
(SHEET 41 +GRPDCD
=dR"1
9
~""-__--'
74820
U62
V 18
16
14
'00
BOI
.IIZ
DATA 3
DATA 4
•
11 U40
IZ
9
BOB
.04 (SHEET 8)
DATA 5 13 7 B05
OATA6 15 5 BOB
DATA 7 17 3 807
ISHEET S) ·RPA
·RPI
H
I 19
ISHEET~ 74lSI25
PIli 15 ·ERROR 9 3 8
+SlCT gt:l!LS04 pO
"'113 9 5 B
I~ ~~
lj
J4 <PE II 10
25-"'N PIII2
D-SHELL V 18
~ j
CONNECTOR
PIli 10
PIN II
·lCK
+BUSY
9 U57 10
I 16
14
IZ
U37
(SHEETS) -STROBE II, 9
V
l,
(SHEET8J- ·AUTOFDXT 7
13!
15
",LCTII 17 3
ISHEET~
I.HE!T~
·1"IT
,r;: B 't~'1
BPI
~.
-
V
~ 5~
g ISHEETS) ~'OEN
-.PC • 3 B
r
ISHEET~ 74LSI25
,r.::.:4lSlZ5
12 It <111Q7
(SHEET I)
-IROEN
~C
ISHEET~
tD
> Monochrome Display Adapter (Sheet 9 of 10)
!S'
...
~
.....
CGEltBITDfSHT7)
~
BAO 00 9 2 A
~
(SHT2) RAO
(SHT2)
(SH121
RAI
RA2
,
6 .2
AI 01
02
10
\I ••
• C
(SHT2) ceo
COl
CC2
---'~
.0 Q
------',
-8
2
•
6
9
...
• AS
2• '8
AS
."
03
D.
\3
15
16
l~
\I E
12'
0
U.2
OH 13 +800T8 (SHT5)
~~~~/lOAD
(SHT3) ROMAII
(SHT3) +JUMPER 21 AI2
(SHT3) -CEROM 20CE ~ elKINH
'------ ':" '----
(SHT51 SERIIT
(SHT3I -ClRVIDED
(SH13) DOTelK
(SHT3) SII
lCC7 (SHl7)
leC6 (SH17)
lCt5 (SHl7)
mM Color/Graphics
Monitor Adapter
6361509
ii
Contents
Description .................................... 1
Controller ................................. 5
Mode Set Register . . . . . . . . . . . . . . . . . . . . . . . . . .. 5
Display Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5
Character Generator ......................... 5
Timing Generator ........................... 6
Composite Color Generator ................... 6
Alphanumeric Mode ......................... 6
Graphics Modes ............................ 9
Basic Operations ........................... 12
Programming Considerations ..................... 15
Programming the Mode Control and Status Register 15
Programming the 6845 CRT Controller ......... 15
Color-Select Register ....................... 18
Mode-Control Register ...................... 19
Mode-Control Register Summary .............. 20
Status Register ............................ 20
Sequence of Events for Changing Modes ........ 21
Memory Requirements ...................... 22
Specifications ................................. 23
Logic Diagrams ................................ 27
iii
iv
Description
~~ ~,
Processor
Data . 6845
CRT
~
Address
Latch r-
,Ir
Data
Latch
•
Data
Latch
~
Output
Latch
I--
Controller
f- .... Graphics
Serializer
I--
Character
~R
..
rL:..
Alpha
~
o.
Generator
~G
Serializer
ROM Color
I~
Palette/
Encoder
r-. B
~
Overscan
o.
..
I
Composite
. Horizontal
Vertical
4 Model
Control
.... Timing
Generator
o.
Color
Generator
r-.
& Control
Display Buffer
The display buffer resides in the processor-address space, starting
at address hex B8000. It provides 16 bytes of dynamic
read/write memory. A dual-ported implementation allows the
processor and the graphics control unit access to this buffer. The
processor and the control unit have equal access to this buffer
during all modes of operation, except in the high-resolution
alphanumeric mode. In this mode, only the processor should have
access to this buffer during the horizontal-retrace intervals.
While the processor may write to the required buffer at any time,
a small amount of display interference will result if this does not
occur during the horizontal-retrace intervals.
Character Generator
A ROS character generator is used with 8K bytes of storage that
cannot be read from or written to under program control. This is
a general-purpose ROS character generator with three character
fonts. Two character fonts are used on the Color/Graphics
Monitor Adapter: a 7-high by 7-wide double-dot font and a
7 -high by 5-wide single-dot font. The font is selected by a
jumper (P3). The single-dot font is selected by inserting the
jumper; the double-dot font is selected by removing the jumper.
Alphanumeric Mode
Every display character position in the alphanumeric mode is
defined by two bytes in the regen buffer (a part of the monitor
adapter), not the system memory. Both the Color/Graphics
Monitor Adapter and the Monochrome Display and Printer
Adapter use the following 2-byte character-attribute format.
7 654 3 2 1 0
IBIR G BII IR G BI
I L - - - _~: ~n~~e::i:~nd
I Color
I - : Background Color
Blinking
R G B I Color
0 0 0 0 Black
0 0 1 0 Blue
0 1 0 0 Green
0 1 1 0 Cyan
1 0 0 0 Red
1 0 1 0 Magenta
1 1 0 0 Brown
1 1 1 0 White
0 0 0 1 Gray
0 0 1 1 Light Blue
0 1 0 1 Light Green
0 1 1 1 Light Cyan
1 0 0 1 Light Red
1 0 1 1 Light Magenta
1 1 0 1 Yellow
1 1 1 1 White (High Intensity)
7 6 5 4 3 2 o
C1 CO C1 CO C1 CO C1 CO
First Second Third Fourth
Display Display Display Display
PEL PEL PEL PEL
Memory
Address
(in hex) Function
B8000
Even Scans
(0,2,4, ... 198)
8,000 bytes
B9F3F
Not Used
BAOOO
Odd Scans
(1,3,5 ... 199)
8,000 Bytes
BBF3F
Not Used
BBFFF
C1 co Function
0 0 Dot takes on the color of 1 of 16 preselected background colors
0 1 Selects first color of preselected Color Set 1 or Color Set 2
1 0 Selects second color of preselected Color Set 1 or Color Set 2
1 1 Selects third color of preselected Color Set 1 or Color Set 2
The background colors are the same basic 8 colors defined for
low-resolution graphics, plus 8 alternate intensities defined by
the intensity bit, for a total of 16 colors, including black and
white.
Basic Operations
In the alphanumeric mode, the adapter fetches character and
attribute information from its display buffer. The starting address
of the display buffer is programmable through the CRT
controller, but it must be an even address. The character codes
and attributes are then displayed according to their relative
positions in the buffer. The following addresses will produce an
"AB" in the upper-left corner of a 40 by 25 screen and an "X" in
the lower-right corner.
Memory
Address
(in hex) Display Buffer
B8000
(Even) Character Code A
Starting B8001
Address Attribute A
B8002 (Example of a 40 by 25 Screen)
Character Code B
B8003 AB
Attribute B
X
B87CE
Character Code X Video Screen
Last B87CF
Address Attribute X
Hex
Address A9 AS A7 A6 A5 A4 A3 A2 A1 AD Function of Register
The table on the next page defines the values that must be loaded
into the 6845 CRT Controller registers to control the different
modes of operation supported by the attachment.
C1 co Set Selected
0 0 Background (Defined by bits 0-3 of port hex 3D9)
0 1 Cyan
1 0 Magenta
1 1 White
C1 co Set Selected
0 0 Background (Defined by bits 0-3 of port hex 3D9)
0 1 Green
1 0 Red
1 1 Brown
Mode-Control Register
The mode-control register is a 6-bit output-only register. Its I/O
address is hex 3D8, and it can be written to using a processor
'out' command. The following are bit definitions for this register.
Bits
0 1 2 3 4 5 40 x 25 Alphanumeric Black-and-White
0 0 1 1 0 1 40 x 25 Alphanumeric Color
0 0 0 1 0 1 80 x 25 Alphanumeric Black-and-White
1 0 1 1 0 1 80 x 25 Alphanumeric Color
1 0 0 1 0 1 320 x 200 Black-and-White Graphics
0 1 1 1 0 z 320 x 200 Color Graphics
0 1 0 1 0 z 640 x 200 Black-and-White Graphics
0 1 1 1 1 z
Bit 2 The light pen switch is reflected in this bit. The switch
is not latched or debounced. A 0 indicates that the
switch is on.
Read/Write Memory
Address Space (in hex)
01000
System
Read/Write
Memory
AOOOO
B8000
128K Reserved
Display Buffer Regen Area
(16K Bytes)
BCOOO
COOOO
· ·· 6
·
·
5 ··
·· 9
0
Color Direct
Drive 9-Pin
D-Shell Connector
Color/Graphics
Monitor Adapter
+ 12 Volts 1
RF (key) Not Used 2 Color/Gr aphics
Mo dulator Monitor
Composite Video Output 3
Adapter
Logic Ground 4
RF Modulator Interface
The following pages contain the logic diagrams for the IBM
Color/Graphics Monitor Adapter.
n
• [WAlUILI.
"' -"
t
........
...
.. ...
'" .~
~ . ..,..,"
...'"
...
.ae: ,~
"'
...
-ENCPUMSADOII
I")
III ..
,.'"
~ ..,.
...'"
.~
=
~ co
~
~
.
'"
,.,., ."
.,
.
.~
,'"'"
.. r.~~-------------
.~
S- 'M
,.,. ....
~ "
,.,.'" .
-1011
-«L~
::
U
~5
~.
"'
.,...,.
....,
'"
141
(4)
:.r"'"
-GM'II
E ."
."
(1,4.61
(1.6)
\1,111
'"
'"'"
'"'"
'"'"
'"'"
'"'"
n [~ I Ft~'1 ,.,'"
-..,
0
0
......... (tI) +I~ MIIZ
~
IU
L--
~ 01
:
~~
I~
,--'lL
DZ
fr
01
QZ
l
~
:1 ~ ~~
II
:))4 "~~
t-"-'i ~,'. _"_~_"_:_ ~:,
'"
~ H:;"
Ill-RESET
.f---LJ. s~~ SIll
I
=
lSec.
"
"= t=bG
::r
I~~\ .
I~--~J
;::).
~
r~
~
+'ill"
~
:01 QI: ~~ ".
un
~ 6
:~~
~ ~:
::;
1
l~~ (4.5)
a.0.... ff~''~'l,I L ~.
'"
..,
0
;>
~."
,~ L~~
=- 1k~
'if' .:
""
6~ ~
~ J 1I
".
J Q ~
'lA
nbL------- Lg<LK
.., "~
<;
,,'" +,-d~
,~
n> : ,,~~
(0) +A<;
{til +AT
(III} +.l!>
'L.- '---- 11 ...--LS02
'----
(O) -RESET'
(4)
15)
+IIRES
+VSYNCDLY
LE..) ""
(8) +IOCUX~
, L.g ~ 0 II ~
~'
It (LK
~ "" 11 LR
~
~'"
" '> GlB +"--.!!!Pf!
'" ,,~
"" ""
, '"
LSO~
~
vo 1<;
~::'
,
VI I~
'"'"
.
11
V2
'"
,
,, ' ~ :~
II " ' I
. .'
(lR
~~
lSl~
, 'I
'"'"
Color/Graphics Monitor Adapter (Sheet 3 of 6)
(31 -Q2'
(31 +cASCO
(1.41
." '"
131 -<;fL,
(21 -"ES£T
12J tOO (3.41
(21
(21
tDI
+0'
'"
(21 to" '"'"
(2) ~O~
'"
n
e..., ,.
=
"- '"'" .U''''DU
:~=:
12.3,4)
:!:
~
~
e:
~
III
a:
e=.
....
.,
=
=->
III
.,....
"C
I'D
'"'"'" .,
'"
(OJ • I~ ItHI
,.,
'"
'''fj
"
~~"
.,,,
l
',.,
JIVlOEOJ.l(K
CHASSI5G11OUNO
(5) YSYN(OUT
IS) HSYNCOUT
111'+100 -LP(N 5W
IS) lOUT 1"
(6) BOUT
n ,
(5)
IS)
G CUT
II OIlT
RlllOn -LPENINPUT (3'
.r---;;- 9-PINO-TYPE
,
,~
, 11,3)
I L~~~
...'"'"
CONNECTOR
11,3)
." 11,31
,
l
'"
"" ""
,~ (1,3)
(2) DO
" '"
.
"" ,,,
(1,3)
(2) DI
'" '" '"
""" "" ".'"
(1.31
(2J DZ
'"m '"
(2) D1
(2) D'I
(2) D'i
(2) Dr.
""
"",
""
.
.-"
""
""
.
, '"
'"
'"
'"
'"m'"
'"
."
""
11.3)
(1.3)
'"'"'"
121 D1
(3) + DATA '"
'" '"
GATE + An
, '" '"
'"
'''' (3'
,3,
. . ..
, ""
(8) -t1EI1R
, L52"'i
."
'" (3'(3,
(8)
(8)
(4)
-lOR
+AEN
+ 10 READY
"
~
""
LSl2
"""
."
'"
''""
,n
.'"
-1011
-lOll
(3'
(3,8)
(1,3)
r' ""
(3.,4.111
.0It7J,tF
., " ,O"1J,tF
Cl'I CI9
f
a.
I,h'''
IOuF
110
'" '", ..
':' L51t.
.,,'
+IOCLK ,.
(3.81
'" '"
+12Y
'" ~. -II£SET~ 12.11)
n' "
."
""
"
13,4,5)
""
'"'
"
">so."
alphanumeric mode 6
B
basic operations 12
c
change modes 21
character generator 5
color-select register 18
composite color generator 6
controller 5
description 1
display buffer 5
Index-l
G
graphics modes 9
high-resolution black-and-white 11
low-resolution color 9
medium-resolution color 9
H
high-resolution black-and-white graphics mode 11
logic diagrams 27
low-resolution color/graphics mode 9
Index-2
p
programming considerations 15
programming the mode control and status register 15
programming the 6845 crt controller 15
registers
color-select 18
mode control and status 15
mode set 5
mode-control 19
status 21
s
sequence of events for changing modes 21
specifications 23
status register 21
timing generator 6
Index-3
Index-4
---
----
- ----
---- -
------
- - --- Personal Computer
Description .................................... 1
Major Components .......................... 3
Modes of Operation ......................... 5
Basic Operations ............................ 8
Registers ................................. 12
Programming Considerations ..................... 62
Programming the Registers ................... 62
RAM Loadable Character Generator ........... 69
Creating a 512 Character Set ................. 70
Creating an 80 by 43 Alphanumeric Mode ....... 71
Vertical Interrupt Feature .................... 72
Creating a Split Screen ...................... 73
Compatibility Issues ........................ 74
Interface ..................................... 76
Feature Connector ......................... 76
Specifications ................................. 79
System Board Switches ...................... 79
Configuration Switches ...................... 80
Direct Drive Connector ...................... 83
Light Pen Interface ......................... 84
Jumper Descriptions ........................ 85
Logic Diagrams ................................ 87
BIOS Listing ................................. 103
Vectors with Special Meanings ............... 103
v
vi
Description
CPU
Addr.
.
..J... MUX L
CPU ... ... CRTC ~
Data LSI
• H 1~
:1 GRAPH L
~ LSI ....
~ BIT 0 -
MAP ~~
Sequencer
The Sequencer generates basic memory timings for the dynamic
RAMs and the character clock for controlling regenerative
memory fetches. It allows the processor to access memory during
active display intervals by inserting dedicated processor memory
cycles periodically between the display memory cycles. Map
mask registers are available to protect entire memory maps from
being changed.
Graphics Controller
The Graphics Controller directs the data from the memory to the
attribute controller and the processor. In graphics modes,
memory data is sent in serialized form to the attribute chip. In
alpha modes the memory data is sent in parallel form, bypassing
the graphics controller. The graphics controller formats the data
for compatible modes and provides color comparators for use in
color painting modes. Other hardware facilities allow the
processor to write 32 bits in a single memory cycle, (8 bits per
plane) for quick color presetting of the display areas, and
additional logic allows the processor to write data to the display
on non-byte boundaries.
Attribute Controller
The Attribute Controller provides a color palette of 16 colors,
each of which may be specified separately. Six color outputs are
Display Buffer
The display buffer on the adapter consists of 64K bytes of
dynamic read/write memory configured as four 16K byte video
bit planes. Two options are available for expanding the graphics
memory. The Graphics Memory Expansion Card plugs into the
memory expansion connector on the adapter, and adds one bank
of 16K to each of the four bit planes, increasing the graphics
memory to 128K bytes. The expansion card also provides DIP
sockets for further memory expansion. Populating the DIP
sockets with the Graphics Memory Module Kit adds two
additional 16K banks to each bit plane, bringing the graphics
memory to its maximum of 256K bytes.
BIOS
A read-only memory (ROM) Basic Input Output System (BIOS)
module on the adapter is linked to the system BIOS. This ROM
BIOS contains character generators and control code and is
mapped into the processor address at hex COOOO for a length of
16K bytes.
Support Logic
The logic on the card surrounding the LSI modules supports the
modules and creates latch buses for the CRT controller, the
Modes of Operation
IBM Color Display
The following table describes the modes supported by BIOS on
the IBM Color Display:
°
Modes through 6 emulate the support provided by the IBM
Color/Graphics monitor Adapter.
The "MAX. PAGES" fields for modes 2,3, D, and E indicate the
number of pages supported when 64K, 128K, or 256K bytes of
graphics memory is installed, respectively.
* Note that modes 0, 1,2, and 3 are also listed for IBM Color
Display support. BIOS provides enhanced support for these
modes when an Enhanced Color Display is attached.
In modes 2, 3, and 10, the dual values for the "COLORS" field
and the "MAX. PAGES" field indicate the support provided
when eit4er 64K or greater than 64K of graphics memory is
installed, respectively.
Graphics Modes
Two bits, one from each bit plane, define one picture element
(pel) on the screen. The bit definitions for the pels are given in
the following table. The video bit plane is denoted by CO and the
Intensity Bit Plane is denoted by C2.
co = Blue Pels
C 1 = Green Pels
C2 = Red Pels
C3 = Intensified Pels
Four bits (one from each plane) define one pelon the screen.
The color combinations are illustrated in the following table:
I R G B Color
0 0 0 0 Black
0 0 0 1 Blue
0 0 1 0 Green
0 0 1 1 Cyan
0 1 0 0 Red
0 .1 0 1 Magenta
0 1 1 0 Brown
0 1 1 1 White
1 0 0 0 Dark Gray
1 0 0 1 Light Blue
1 0 1 0 Light Green
1 0 1 1 Light Cyan
1 1 0 0 Light Red
1 1 0 1 Light Magenta
1 1 1 0 Yellow
1 1 1 1 Intensified White
Color Mapping
Bit 7 6 5 4 3 2 1 0
Bits
3 2
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
IIII
I
I
: Not Used
Switch Sense
Reserved
Reserved
CRT Interrupt
Bit 7 6 5 4 3 2 1 0
Display Enable
Light Pen Strobe
Light Pen Switch
Vertical Retrace
Diagnostic 1
Diagnostic 0
Not Used
Bit 7 6 5 4 3 2 1 0
IIII II I I
L...----L.---'.--------I_~
:: Sequencer Address
Not Used
Reset Register
Bit 7 6 5 4 3 2 1 0
IIIIIII~
Asynchronous Reset
Synchronous Reset
Not Used
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
1 Enables Map 0
1 Enables Map 1
1 Enables Map 2
1 Enables Map 3
Not Used
Bit 7 6 5 4 3 2 1 0
I I ~I::
IIII ~I - -
Character Map Select 8
Character Map Select A
'--""---'----'-------~ Not Used
Bits Map
1 0 Selected Table Location
Value
0 0 0 1st 8K of Plane 2 Bank 0
0 1 1 2nd 8K of Plane 2 Bank 1
1 0 2 3rd 8K of Plane 2 Bank 2
1 1 3 4th 8K of Plane 2 Bank 3
Bits Map
3 2 Selected Table Location
Value
0 0 0 1st 8K of Plane 2 Bank 0
0 1 1 2nd 8K of Plane 2 Bank 1
1 0 2 3rd 8K of Plane 2 Bank 2
1 1 3 4th 8K of Plane 2 Bank 3
Bit 7 6 5 4 3 2 1 0
E Alpha
Extended Memory
Odd/Even
Not Used
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
BH 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
I I I
II I
End Blanking
Display Enable Skew Control
Not Used
Bits
6 5
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
III
II I
End Horizontal Retrace
Horizontal Retrace Delay
Start Odd Memory Address
Bit 7 6 5 4 3 2 1 0
I I I I II I I• Vertical Total
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
I I I I:
III Maximum Scan Line
Not Used
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
I' ,
Row Scan Cursor Ends
Cursor Skew Control
Not Used
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
B~ 7 6 5 4 3 2 1 0
B~ 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 432 1 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
Offset Register
Bit 7 6 5 4 3 2 1 a
I I I I I • Logical line width of the screen
Bit 7 6 5 4 3 2 1 a
I I I
III : Horizontal row scan where
underline will occur
Not Used
Bit 7 6 5 4 3 2 1 0
BH 7 6 5 4 3 2 1 0
I I I I
III : End Vertical Blanking
Not Used
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
IIIIIII~
Position 0
Position 1
Not Used
B~ 7 6 5 4 3 2 1 0
Position 0
Position 1
Not Used
Bit 7 6 5 4 3 2 1 0
E
Bit 7 6 5 4 3 2 1 0
I ~set/Reset Bit 0
~set/Reset Bit 1
Set/Reset Bit 2
Set/Reset Bit 3
L-~~--L-----------~NotUsed
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
I I L: Colo' Comp'" a
Color Compare 1
Color Compare 2
L...-_ _ _~ Color Compare 3
~~~--~----------~NotUsed
Bit 7 6 5 4 3 2 1 0
Rotate Count
Rotate Count 1
Rotate Count 2
Function Select
Not Used
o0 Data unmodified.
o1 Data AND'ed with latched data.
1 0 Data OR'ed with latched data.
1 1 Data XOR'ed with latched data.
Bit 7 6 5 4 3 2 1 0
Map Select 0
Map Select 1
Map Select 2
Not Used
Mode Register
Bit 7 6 5 4 3 2 1 0
II : : : Wdt, Mod,
Test Condition
Read Mode
'-------~ Odd/Even
'--------~ Shift Register Mode
'--..L-_ _ _ _ _ _ _ ~ Not Used
Bits
1 0
Miscellaneous Register
Bit 7 6 5 4 3 2 1 0
Graphics Mode
Chain Odd Maps to Even
Memory MapO
Memory Map 1
Not Used
Bits
3 2
Bit 7 6 5 4 3 2 1 a
Bit 7 6 5 4 3 2 1 a
The bit mask applies to any data written by the processor (rotate,
AND'ed, OR'ed, XOR'ed, DX and SIR). To preserve bits using
the bit mask, data must be latched internally by reading the
location. When data is written to preserve the bits, the most
current data in latches is written in those positions. The bit mask
applies to all bit planes simultaneously.
Bit
71 6
1
, i I I 1: Attribute Address
L-.-------i~Palette Address Source
'
Palette Registers Hex 00 through Hex OF Format
llli
Bit 7 6 5 4 3 2 1 0
~ Blue Video
~ Green Video
Red Video
Secondary Blue/Mono Video
1..-_ _ _ _ _ _ Secondary Green/Intensity
L-_ _ _ _ _ _~ Secondary Red Video
L-....L_ _ _ _ _ _ _ _ _ Not Used
Bit 7 6 5 4 3 2
II
1
I:
0
Grnph'"IAlphaoome", Mode
Display Type
Enable Line Graphics Character
Codes
L....-_ _ _~ Select Background Intensity Or
Enable Blink
I--....L...........I._.L.-_ _ _ _ _~ Not Used
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
The external registers that are not part of an LSI device and the
Graphics I and II registers are not accessed through an address
register; they are written to directly.
The following tables define the values that are loaded into the
registers by BIOS to support the different modes of operation
supported by this adapter.
External Registers
Reset 3C5 00 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03
Clock Mode 3C5 01 DB DB 01 01 DB DB 01 00 DB 01 05 05 01 01 DB DB 01 01
Map Mask 3C5 02 03 03 03 03 03 03 01 03 OF OF OF OF OF OF 03 03 03 03
Char Gen Sel 3C5 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Memory Mode 3C5 04 03 03 03 03 02 02 06 03 06 06 00 00 06 06 03 03 03 03
'Values for these modes when the IBM Enhanced Color Display is attached
:Values for these modes when greater than 64K Graphics Memory is installed
Sequencer Registers
Graphics 51 Registers
Attribute Registers (1 of 2)
Attribute Registers (2 of 2)
Bit Plane 2
+OK
Character
Generator 0
+8K
Character
Generator 1
Character
I-++-+-++-+-+-HI-++-I-++-I-++-i-++-i-i Generator 2
Character
t-+-+-t-+-+-t-+-+-t-++-IH-+-IH-+-I-++-t-l Generator 3
+64K ~--------------------------~
CC * 32 +0 18H
3EH
2 66H
3 66H
4 7EH
5 66H
6 66H
7 66H
movax,130l
mov bx,OOOF ;write char. string with attribute bit 3 = 1
mov cx,003A ;cx = character string length
mov dx,1600 ;write character on line 22 of display
mov bp,0200 ;pointer to character string location
push cs
popes
intlO
mov ax ,1301
mov bx,0007 ;write char. string with attribute bit 3 =0
mov cx,003A ;cx = character string length
mov dx,1700 ;write character on line 23 of display
mov bp,0200 ;pointer to character string location
push cs
popes
intlO
int 3
Screen A
Screen 8
OOOOH . - - - - - - - - ,
Screen B
Buffer Storage Area
OFFFH 1 - - - - - - - - ;
1000H
Screen A
Buffer Storage Area
7FFFH '--_ _ _ _ _--'
Screen Mapping Within the Display Buffer Address Space
Compatibility Issues
The CRT Controller on the IBM Enhanced Graphics Adapter is a
custom design, and is different than the 6845 controller used on
the IBM Monochrome Monitor Adapter and the IBM
Color/Graphics Monitor Adapter. It should be noted that several
CRTC register addresses differ between the adapters. The
following figure illustrates the registers which do not map directly
across the two controllers.
Background Foreground
R G B R G B Function
0 0 0 0 0 0 Non-Display
0 0 0 0 0 1 Underline
0 0 0 1 1 1 White Character/Black Background
1 1 1 0 0 0 Reverse Video
Feature Connector
The following is a description of the Enhanced Graphics Adapter
feature connector. Note that signals coming from the Enhanced
Graphics Adapter are labeled "inputs" and the signals coming to
the Enhanced Graphics Adapter through the feature connector
are labeled "outputs".
Signal Description
G Green input
B Blue input
Gnd 1 2 ...........
, -12V
+12V J1
J2 G'OUT
R'OUT B'OUT
ATRS/L BOUT
GOUT G
R' B
R ROUT
FEAT 1 BLANK
FEAT 0 FC1
FCO G'/I
B'!V HIN
VIN 14MHz
Internal EXTOSC
VOUT HOUT
GND 31 32 +SV
~
'"
Feature Connector Diagram
1 234 5 6 7 8
~DDDD~~DD
Switch Block (1)
Optional
Graphics Memory
Expansion Card
Off On
9-Pin Direct
Drive Signal
P-2 Connector
SHT1Sl1~~"::=======:'::
27'28
CI
G')
:z:I
l>
"'a
...~
~
(JQ
=
n
en
....~
l>
CI
l>
"'a
-I
a
rJj
m
:z:I
...
C, CD
f"""'---_+-_---'-'-jlllJ1t7 12
__----------"JiiSi1rr SHT"
, lS"
5~" ROM_IO---------------~---------==~~~--------------~
I
m
CI
f=-
SHY 6.7,11 c;,
:0
=
=
RASZ
SHU
SHY II
""It
~
."
::n
('D
SHYlO £XI" OS(
""'" en
"""... ~
fe: .
SliT b,7.8.IO
-CCLK 5HT'i,')
SHT 9 CUCSEL 0 CRTLAltHSHl'i,b.7.8 CI
CPUlAlOI SHT 6.7 ~
SIr
SHr. (lJ(SEl.1
"" .....,-
9iTb.7
::!I
m
f") "". ilr :g
~
SHT 6 f1ID'i WE SHT b.7.11
SHI''t VREi1ii
iii<
SHT 1.1f.o'i
SHT 1.0;
SHT1."
SHT'I ii'ii"
SIfT" ~
St/Tl HAiIt
SHTl HAr<)
ATRs/[ SHT8.1O
(
IKASO SHr 7
ii1ASi
iCm SHTII
scm
~
~
\C
QO
~ Enhanced Graphics Adapter Shaet 2 of 11
m
Z
:z:
l>
Z
SHT 2 HU' n
m
c
SHT 2 iWi C)
:::a
SHT2 CRT/CPU l>
"'CII
SHT2 ::n
~T"
SHT6
SHT Ii en
SHT I
SHTIf
l>
SHTIf
C
SHTLI l>
5HT .... 6.11
"'CII
SHT I BOO -I
m
I
BDI
BDZ HAlit
HAl')
SHT 2 :::a
BD~ SHT 2
BD.
BD~
BOb
SHT I BD1
::iHT9 LPSTB
SHTIf.'5.7.11
I
SHTIf,').7.11
RSD SHT I)
I
RSI
RS2
RS~
RS' SHT I)
-::=
\C :2
~
. " """.
SHT~
"'~
:::t:
»
:2
C")
!l
.," m
".- c
~ ~
C')
:xl
.," »
~ '" "CI
![
'" :::t:
n '"
'"'" C")
,.,.".'"
I'D
=-~ '" en
»
.., c
»"CI
~ ....m
n
a: :xl
~.J! """" -
"""
rIJ (RT/m
---~
>
=- . IWIENABLE
"'"" ""'" -
COSELO
~
....
..,
I'D
0i00i
SHT'tOIOr1ONITOR
"" ""
SILM
LEGEND
J'
i....
ffiii
U
iffitij
, " "~ .. :2
4
R53 40 4' -- BA>
14 n
~
SKT; R54 B"
SHT t.
SHT Eo
SHU
MODI
M002 " eo
8
be
10 7Q
BQ
12
'
BAt.
A'
I
\= BA>
BAb
SA'
t
SHT7
m
C
" '"
I
C)
" :%I
l>
-a
SHT Z CRT LATCH
I '------
LSO"
::n
"VuZb 12
2. LSIO
en
12 l>
I ~ U'i
[G SHU
C
l>
-a
~ -I
m
",
-=
8AO
SHT Eo HOO'l
10
20 Ul
IQ
2Q "
2. 8AI :%I
SHT E-
17
;Q~
SHT b
HOD">
M006
M001
14
4
"" 4Q~
I
'iQAlt
SHU
"be 6Q~
~
SHT 6 MOD,
"• 10
eo
7Q
Ba;
12 SA6
..L.J!L...../
l'!1 " I
(LX
r=- ~
"
-
LSD"
I
f') SHU GRAPHICS ; U26
4 I GRAPHICS SHT 8
~ L 2 LSII
CRT ICPu
I( U27 12
1
I LSOO
21 Uti
, I
~
SHT 2
SHT Z "UX
.a I "
LSOO
~ SHT 2 M"'UX
121 Ub "
~
2~~74
!".... \2 PRE
,l' 1
8 I
..
SHT; REF ADR
CLR
Qq I
....
\C ".,
Enhanced Graphics Adapter Sheet 5 of 11
CO 22
CO SHr 8 m
(I 21 CI SHr 8 Z
GPO IZ
GPI II
GRAPHICS SHr '1,1; :z:
U"
CHAIN SHT .. l>
,
2 Z
1=\
BOD DO HODO HDDO
BDI , 01 HOD I --- HODI n
HOD2 ~ --- m
T ~
BD2 HDDZ
BO' r; HODl ~ -- HODl CI
SHY I
B...
"'"
BD.
B07
b
~
•
"..
00;
01>
07
HODIf
HOO";
HOOl>
MOD1 ~
" HODO
HODI
Z 000
--
---
---
HDOLt
HOI)';
MOOb
HOD1
1''1'
SHTIIi.11
G')
:xl
l>
j:H 02
1 QQI
U.O ."
SHT2
I
CPU LAlO!
CRrtAKH
17 CPU LATCH
18 CRT UKH
"M D1
~ 000
17 :~
=
n
en
51HZ
OOltLK
sIr
WE
Iq elk
16 ~/[ \Ij
l~ 001
AAO 14
OOZ
"DOl 17 00,
U~ l>
CI
it ~
'~
.
AD
AI
l>
~
\Iij ...
AZ
A"
I
SHr If GRAPHICSIOW
:","(2) n
'If
:0
" row
H5'SE[
... 8 A' m
:xl
SHY" AI AA7 10
A7
m
13 ~
CAS r:;sLtltlb
HIDO '0
r~
• W HI DO SHY 8.11
HIDI
THSlfItl& ---
---
MIDI
1'1102
SHY 8.11
SHr 8.11
"102
MIOl ---
--- 1'1101 SHr 2.8,11
~
SHT8.11
HID"
HIDe;
1'1106 HIDO
---
---
"10'+
HI 011)
HID6
SKT8.11
SHrB,1I
t'llD7
z> 2 000 HI07 SHTe.1I
HIDI u.,
QtAPHICS CONTROL
U HID2
HIDl DQl
: :
\1- Mt:1~
HID7 17 DQl
U";I
.. ,
sHT1 AA.
AAI ---
--- MAAIA11OAI
{.... I
AA2 12 AZ
--- ~Al
AA' ---
~ ---
--- \ iAA6
§A '
6 Ar;
SHTl
AA.
"7 r AAl 10 ~~
5HT2 iiASO -'L HAS -
~
'" t
SHT2 =
11m"
WE
.r~
CAS
ii
nt5l+'+16
""'"
\C
QD
TH5'tI+'6
II
~ 4 02 In
I
B02 ---H2D2
'"~ BO' ---H2O' CI
IC
Ba.
BO'
BOb
' 0'
04
00;
Ob M2DO
---HlO"
---H20l)
---"'ZDb
) G)
:II
OD SHT I BD7 07 HZD7 SHT 'i,S »
01:0- UIO "a
SHT Z
DOTeLl<
SIC
WE
Iq
1&
S/L
WE
UI »
CI
»
SlIT 4 ~ I row ~
In
I t
5HT It
Yi1Ei"ii
iiii
A2
,."" R1ID
iiii
IIIrnt
:II
;;
3: Iu ; TI"IS't'tlb
11100
---H1DI
SHT II
II
Tl"IS'+'Ilb ---11102
f=-
---Hl01
---t1101+
---1'1101)
---Hl0b
H107 SHT II
n UII
t'D GRAAiICS CONTROL
"-l
ie: BAD
U2
II
BAI
n
1'1.1
BA>
SA'
t.
SA4
SlIT ,
SlIT 2
SA'
BAO
BA7
RAS2
~
I
II
sur 2
~
WE
1l1S .... I&
IC TI15""I&
1M Enhanced Graphics Adapter Sheet 7 of 11
m
-
IC :2
~
::c
l>
:2
n
=~= SHTt>
(0 IliA
10 18
m
CI
5Hft.
1'1100
"
Iii 2" ,,' ATTRIBUTE LSI
f 2Y,r't2======~1
SHTb MIDI n 28 COl
SHn C2 2 " U23
!;~~ II IL 0
_ _ _ _...!'.2. ATROICO ::IC
,,'"""
SMft, MIDl 9 ATRI/( I
I l>
SIIT7
SHU, " SEL sTah 8 ATRUC/!:
7 ATRvn -a
::c
~ 'I - 1 n
=-~ SHTS ~~-------------~ en
l>
CI
5HTt> MIO'l
SHTb MID'> l>
SHT!> 1'110!>
....m-a
-=a:
r')
fI.!
SHT7
Mt07
1'1200
M2DI ::IC
M2D2
> [
1'1203
M2D'I
!.... SHT7
"'"
1'12DI>
1'1207
.
~
SHT I
a
.DD
11
21 DO
27 01
LG
I
'D'
.D2 28 02
.D' 2'+ 01
m 2S Oli
it> os yccf-!-------+sy
SHT I
'"'
==========================~'~"
SHT 2 (RT LATCH
SHT2 ATRS/l IS S/L
SHT2 DOT eLK OOTCll(
CRTlAT(H
~~~~~~~~~~~~~~~~~~~~~~~~~~~9
SHH BLANK
5HT3 YSYNC 32 YRTC
SHT 3 DE , DE
BLANK
SHT ~ CURSOR/UL 10 CURSOR
i
~
~
IC
...
QO
Enhanced Graphics Adapter Sheet 8 of 11
• our
R'DUT
H,"
VI.
SHY 10
SHT 10
m
• our Z
Sr (I'ooT
Bour ::c
:to
.
• our
SHT10
,our
HOUT
zC")
SO" .PO.
HSYNC ~) UB m
7'iLS86 0
SHT '9 ,PO. ~~
, C)
::g
UB ,---
~
SHT' VSf"(
:to
~~'>
7'iL.S8&
"'52"
.
RZ
"a
17ZA'I zy" 1 RI ,B
~ ::~ U~YI :8 ,, ==
SH" G
!
B R7 C")
G'11
en
."
8 IAl IY2.1t
I'/V
W
11 IAII IH 12
1~'9
'B
7• :to
SHrB R
~1ir
I
2Y27 •, 0
,~
-J!c~
~7.- :to
Ol
SHT' BOO BOO '----
BDO "a
I BO'
B02 BDZ 122D
I 10 UII'
aD
1· }, J. 1 1" }<fc'
} }B p, qPIN~lYPE
CONNEC'RlR -t
SHT ,
SHY 'I "'"
'fEiO'W
BD
, "' ce. m
::g
,
~ FCO SHT 10
SHr' BOO
~1~IR7IQ2 Fel SHY 10
BO'
1 BDZ 71D ZQ'i
~
RAM ENABLE SHT It
I ..."'"
B02
BO' ~ItO 1G b CLKSELO SHT2
B"
\~~g ~:~2 ;~~s:~ I ~~i~
."
iiDE1i5W I
,~'.I
~: II
:~
-rr
8Q If!
~
H POL
V POl
SHY 'I
SHY '9
SHY 9
RESET
~
~T" ~
i'i1iiOii
SHT.. ==============================================================-______J
Enhanced Graphics Adapter Sheet 9 of 11
\C> m
C\ Z
:c
;; ):0
z
3: SHT ~ FCO 21 ,. FEAT D SHT ,
n
m
CI
f
SHT CJ FCI
20 17
1 FEAT I SHT •
28 osc Ii)
SHY 8 R
,.
12 I.
EXT SHT •
:a
II
G ROUT SHT •
a
" GOUT ):0
.," a OUT "'Ill
II
R'
n
.
22
2:
,.•
G'II J' R'OUT
(D BYV ,'OUT
SHY.
0. '_2 2. 8 B'OUT n
SHT 1
rn
SHT C) Hili
•• HOUT
f
2~
SHT , VIN your SHY' ):0
18
SHT ,
SHT 2
BLANk
A1RS/C ,.• CI
):0
+~V
27
, ~
r- SHT.1iimiiii.
+12V
"-12V
GND
"
2
, m
:a
~
GIl)
1
i ;
J2
EXT VIDEO
;
JI
VIDEO JACK
FEATURE CONNECTOR
{
NOTE:
{ SIfT, 1'1000
11001
1'1002
1"I0Dl
"OD"
"'"
"""
",,
2JC12 CONNECTOR Z
::c
)00
Z
n
m
~ MODb
1"1007 " C
I-l "''''' " C)
,""
1"1101
IC 1'1102
11101
:a
QD )00
~
Hiolt
.,"
28 -a
"100;
1'1106
..
26
==
-,
SIfT, .U07
n
"'" HZO'
Pl201
21 en
H202
".... ••
20
)00
"20' • C
)00
H'06
"'D1 ""
"'"' "
," ~
"'" m
"""
",., " :a
"". " "'
"'"
...
=
==
,lIT,
,lIT, """
...
"""
........,
......
""
""
f
.AS
.A1
"
."....U....." 50
ME"""
t!)
=- ...
.
re: ...,"
SIfT ,
SIfT.
....,.
mr
....,..,..
n
~
II==
51fT.
RID
1Zi5i
..,
WE .,
> GND
GND
= "".
!
SlIT.
51fT,
SlIT. ""'"
iCASi
<ND "" "EMORY EXPANSION
! 21(12
IC
~ Enhanced Graphics Adapter Sheet 11 of 11
\0 m
ac Z
:c
t;; :J:o
z
~ n
m
c
f I
Ii)
~2 61 :lei
SHT If 11000 AAO SHT 1t,1)
I
1100 I
~ ~ ""CI
11002 q AA2
fD
11001
1I00~
AA~
AA~
:5
Q. 1I00~
~7 o;s
AA~
n
~6 ~~ UJ
1100& AA&
=t SHT
SHT
~
~
11007
11100
~~ q
8
AA7
BAD
SHT't,'5
5HT 6.7
:J:o
C
»
~ BAI
I
1110 I
I
I 7 BA2
11102 6 :!I
~
1I10~ 8A~
~
1I10~ BA~ m
fI.I 1I10~ BA~ :lei
27 1
1110& PI BA&
> SHT ~ 11107
SHT 6 11200
&
2H2 BA7
A CAS I
SHT6.'
SHT~.~
i 11201
~ ~~
A CAS 2 SHrlf.'S
I
~
11202 ACA51 SHTIf,'S
22 ~I
BCASI SHT 6.7
11201
{ 1120~
1120~
21
20
<;It
~~
BCASZ
B CAS ~
SHT 6.7
SHT 6.7
11206 18 ~8
RAS 0 SHT ~
SHT 6 11207 7
RASI SHT t;
SHT 7 11100 RASZ SHT 6
16 ~
1I~01 RAS ~ SHT 7
I i+
11102 I~
11101 n +yV
1I10~
1I10~
11106
SHT 7 11107 "
10 ~2 1
IA IV iiEo SHT ~
+~V
" E:t ZA ZY WEi SHT ~
CI~f+ lo..F
CI~f+
t···t 10"F
CI:f+
10"F
F.! r~A
lA
~A "
~Y
~
lin
SHT &
SHT 7
( " CI-CI6
• 0~7"F
&A
U•
7~LSO~
.....
~
'"
\0
ac
Graphics Memory Expansion Card Sheet 1 of 5
{
~ SHT 3 ACAS!
....
\C
SHT 3
SHT 3
SHT 3
SHT '3
ACA.S2
ACAS3
RAS 0
oro
SHT 3 '0
QC
~ " A2
"'"
13 ""
SHT A7
+SV
, .", .sv
,
~ ~ ~
-+ ~ t
=! UIB
~ Ht UlO
n- Ul
n-
*
--1}
12 IfLflb .. 41b .... ,E>
II II II
a
,
2 a
,
7 ,
2 a
,
7 ,
2
10 "
12-- 10 "
flL--- 10 "
~
~
18 ~
18 '---:pa-
I
.sv
,
.sv
, .",
4 ~ ~
~
--It
12
U19
441~ ~ ~
'----------+l-
12
UII
Iflilb ~ ~
~12
U2
,*,+lb ~
II Il II
a
a
, t=- , It-- +--
~
7
-It--- F
I"
10 1'- 10
"-'- 10
~
18 ~
18 ~
18
MODO 5H
MODI
HOD2
MOO,
MOl,.,
MOD')
MOOb
MOD7 SHT 3
l~l: ., AO
AI
A2
::1:1
l>
"'Ill
A' ., ::c
A6
C")
SHT 3 A7
." .>V ." en
9 9 9 l>
~
f-f.-
~ 12
U20
Itltlb h
~
-f
~ 12
UIZ
1t1t16 n +
~ " '+'+16 n
c
l>
~
12
rn
"
7
2 "
7
" ::1:1
6 6 6
10 "
~
10 "
ell-- 10 "
~
.".18 T" ':" 18
q q q
~ UZI
'+ltlb ~ ~
~
12
U13
It'+lb h ~ " ~
'+ltlb
12
" "
8
6
10 F
JL
6
10
Li
P'-
8
7
10
f--
~
JL
T
18 T
" T
18
MIDI
MIDO
NID2
MI03
'"1"
MtDIt
MIDS
MIDb
MI07 SHT3
i
~
SIlT ;
SIlT ;
SHT 3
SHT 3
SHT;
SHT 3
SeAS I
seAS 2
BCAS ;
'AS 2
WE 2
Z
:c
)00
z
n
m
C
~
\C
I "
AI
A2
C)
~
QC
.ca.. j "'" )00
'""
."
SHT ; AI :c
'", ,+" ,+" n
en
r{-
=f r-t R: )00
c
~ UZ2
-H12 ...." h ~ 12
UI4
lilliE> h ~
12
U'
...." ~ )00
."
.
"
1
10
2
;
"
I"---
.
"
1
10
2
;
"
f'L--
.
"8
1
10
2
;
"
~
-I
m
~
~
18
~
• -
18
IC
I~
~
"
I
•
}--
t=-
t!L
18 18 18
~ ~ ~
SHT 3
"'01
I
11202
11203
"'''''
H2D'
H2D'
H201 SHT ;
.
RAS , Ci)
f
SHT , ~,
SHT l ::D
>
I
41
A2 og
A.A'
ft! SHT ,
A'AA
AT
."
=
n
en
Q.
H~ ~ p. · >
CI
ier.
n
a~11.
I
2
~.
tj,I 1
oiL
•
Ulb
't1ff6 n
,
2
-
~•
I
• -U7
h
2
>
:!:I
m
::D
rI.I
• " • •
> 10
t!L-- I
JlL-- ~
t!L--
-• •
fS"
18
-
." ."
...
· ·
''W
•
~ ~ 13
~ ...."" h ~ ...,. UI7
h ~12
ua
...." n
"
.
I
~
"
•
~
l;
"
7
10 b
ilL
-• " •
5HT ,
""'"
"'01
> "'02
t .. 1
"301
""'....
"206
KlD7 SIlT ,
365 e
366 e ;----- REUSE RAM FROM PLANAR BIOS
361 e
0449 366 e ORG 449H
0449 ?1 369 e CRT MODE DB
044A 1711 310 e CRT-COLS OW
044C ???? 311 e CRT:::\EN OW '7
044E 11?7 312 e CRT START OW '7
0450 08 I 313 e CURSOR_POSN aw 8 OUP( 1)
7117 374 e
315 e
316 e
0460 ???? 311 e
0462 ?? 316 e
4"
436
C
C
ALPHA MODE AUXILIARY POINTeR
INITIALIZED TO 0000:0000, THIS VALUE IS OPTIONAL.
437 C WHEN NON-ZERO, THIS POINTER IS USED AS A POINTER
438 C TO A TABLES DESCRIBED AS FOLLOWS:
439 C
440 C BYTE BYTES/CHARACTER
441 C BYTE BLOCK TO LOAD, SHOULD BE ZERO FOR NORMAL
442 C OPERATION
443 C WORD COUNT TO STORE, SHOULD BE 2560 FOR NORMAL
444 C OPERATION
445 C WORD CHARACTER OFFSET, SHOULD BE ZERO FOR NORMAL
446 C OPERATION
447 C DWORD PO I NTER TO A FONT TABLE
448 C BYTE DISPLAYABLE ROWS
449 C IF 'FF' THE MAXIMUM CALCULATED VALUE WILL BE
450 C USED, ELSE TH I S VALUE WILL BE USED
4"
452
C
C
BYTE CONSECUTIVE BYTES OF MODE VALUES FOR WHICH
THIS FONT DESCRIPTION IS TO BE USED.
4"
.,4 C
C
THE END OF THIS STREAM IS INDICATED BY A
BYTE CODE OF 'Ff'
455 C
456 C NOTE: USE OF THIS POINTER MAY CAUSE UNEXPECTED
457 C CURSOR TYPE OPERATION. FOR AN EXPLANATION
458 C OF CURSOR TYPE SEE AH '" 01 I N THE INTERFACE
459 C SECT I ON.
460 C
461 C GRAPHICS MODE AUXILIARY POINTER
462 C INITIALIZED TO 0000:0000, THIS VALUE IS OPTIONAL.
463 C WHEN NON-ZERO, THIS POINTER IS USED AS A POINTER
464 C TO A TABLES DESCRIBED AS FOLLOWS:
465 C
466 C BYTE DISPLAYABLE ROWS
467 C WORO BYTES PER CHARACTER
468 C DWORD PO I NTER TO A FONT TABLE
469 C BYTE CONSECUT I VE BYTES OF MODE VALUES FOR WH I CH
470 C THIS FONT DESCRIPTION IS TO BE USED.
471 C THE END OF THIS STREAM IS INDICATED BY A
472 C BYTE CODE OF 'FF'
473 C
474 C DWORD_5 THRU DWORD_7
475 C RESERVED AND SET TO 0000:0000.
47. C
477 C
0500 478 C ORG 0500H
0500 17 479 C STATUS BYTE OB
0501 480 C ABSO - ENDS
481 C
== 0061 482 C PORT B EQU 61" 8255 PORT B ADDR
== 0040 483 C TIMER EQU 40"
484 C
485 C ; ----- EQUATES FOR CARD PORT ADDRESSES
486 C
'" 00C4 487 C SEQ ADDR EQU OC4H
'" 00C5 488 C SEcLDATA EQU OCSH
== 0004 489 C CRTC ADDR EQU OD4H
'" 00B4 490 C CRTC::::ADDR_B [QU OB4H
== 0005 491 C CRTC_DATA EQU OD5H OR OB5H
:= OOCC 492 C GRAPH_'_POS EQU OCCH
'" OOCA 493 C GRAPH_2_POS EQU OCAH
= OOCE 494 C GRAPH_ADDR EQU OCEH
= OOCF 495 C GRAPH DATA EQU OCFH
= OOC2 496 C MI SC OUT PUT EQU OC2H
'" 00C2 497 C I N_STAT_O EQU OC2H
'" OOBA 498 C I NPUT STATUS B EQU OBAH
'" OODA 499 C I NPU(=STATUS- EQU ODAH
= OODA 500 C ATTR READ EQU ODAH
= OOCO 501 C ATTR=WRITE EQU OCOH
502 C
503 C ;----- EQUATES FOR ADDRESS REGISTER VALUES
504 C
gn~H ~~i=~
0130 0194 R 111 C DW
0132 01A8 R 112 C DW
0134 OlBC R 113 C OW OfFSET PST_6
0136 01C7 R 114 C OW OfFSET PST_7
115 C
0138 01C7 R 116 C OW OFfSET PST 8
013A 0102 R 111 C DW OffSET PST-9
013C 0100 R 118 C DW OffSET PST-A
013E 01 f1 R 119 C DW OffSET PST-B
0140 0204 R 180 C DW OfFSET PST=OUT
0142 0204 R 181 C DW OfFSET PST OUT
0144 0204 R 162 C DW OFFSET PST-OUT
0146 0204 R 183 C DW OffSET PST=OUT
184 C
0148 185 C ENV_X PROC NEAR ; SET 40X25 COLOR ALPHA
0148 80 26 0410 R CF 166 C AND EQU I P_LOW, OCfH
0140 80 OE 0410 R 10 161 C OR EQUIP_LOW,010H
0152 B8 0001 188 C MOV AX,lH
0155 CD 10 169 C INT 10M
0157 C3 190 C RET
0158 191 C ENV_X ENOP
192 C
0158 193 C ENV_O PROC NEAR SET 80X25 COLOR ALPHA
0158 80 26 0410 R cr 194 C AND EQUIP_LOW,OCfH
0150 80 DE 0410 R 20 195 C OR EQU I P_LOW,020H
0162 B8 0003 196 C MOV AX,OlH
0165 CD 10 191 C INT 10M
0167 C3 196 C RET
0168 799 C [NV_O ENDP
600 C
0168 601 C ENV_1 PROC NEAR SET MONOCHROME ALPHA
0168 80 DE 0410 R 30 802 C OR EQUIP_LOW,030H
0160 B8 0007 603 C MOV AX,07H
0170 CO 10 604 C INT 10M
0172 C3 605 C RET
0173 606 C ENV_3 ENOP
601 C
606 C
0173 609 C PST_O:
0173 20 26 0487 R 610 C AND INFO,AH
0177 E8 0148 R 611 C CALL ENV X
017A E8 0168 R 612 C CALL ENV=l
0170 C3 613 C RET
017E 614 C PST_1:
017E 615 C PST_2:
017E 20 26 0487 R 616 C AND INFO,AH
0182 E8 0158 R 617 C CALL ENV_O
0185 E8 0168 R 616 C CALL ENV_1
0188 C3 619 C RET
0189 620 C PST_3:
0189 20 26 0487 R 621 C AND INFO,AH
0180 f8 0158 R 622 C CALL ENV_O
0190 E8 0168 R 823 C CALL fNV_1
0193 C3 824 C RET
0194 825 C PST_4:
0194 86 03 826 C MOV OH,3
0196 B2 C2 627 C MOV oL,M1SC_OUTPUT
0198 SO 00 628 C MOV AL,O
019A EE 629 C OUT DX,AL
019B f6 04 830 C NOT AM
0190 08 26 0487 R 831 C OR I NFO,AH
01Al E8 0168 R 632 C CALL ENV_3
01A4 E8 0148 R 833 C CALL ENV_X
01A7 C3 834 C RET
01A8 835 C PST_5:
01A8 86 01 836 C MOV OH,3
01AA 82 C2 837 C MOV Ol,MISC_OUTPUT
01AC BO 00 838 c MOV AL,O
01AE EE 839 C OUT OX,Al
OlAF F6 04 840 C NOT AM
OlBl 08 26 0487 R 641 C OR I NFO,AH
0185 £8 0168 R 842 C CALL ENV_3
01B8 £8 0158 R 843 C CALL ENV_O
0188 C3 644 C RET
01BC 645 C PST_6:
01SC 20 26 0487 R 846 C AND INFO,AH
OlCO £8 0168 R 847 C CALL ENV 3
01C1 £8 0148 R 848 C CAll ENV=X
01C6 C3 849 C RET
01C7 850 C PST_7:
01C7 851 C PST_8:
01C7 20 26 0487 R 852 C AND INFO,AH
01CB f8 0168 R 853 C CALL ENV_3
01CE £8 0158 R 854 C CALL ENV_O
0101 C3 855 C RET
0102 856 C PST_9:
0102 20 26 0487 R 851 C AND INFO,AH
0106 £8 0168 R 858 C CALL ENV_3
0109 E8 0158 R 859 C CALL ENV_O
010C c3 860 C RET
0100 661 C PST_A:
0100 B6 01 862 C MOV OH,3
010F B2 C2 863 C MOV OL, M I SC_OUTPUT
01E1 BO 00 864 C MOV AL,O
01E3 EE 665 C OUT OX,AL
01E4 F6 04 866 C NOT AM
01 E6 08 26 0487 R 867 C OR I NFO,AH
OlEA E8 0148 R 666 C CALL ENV_X
OlEO £8 0168 R 869 C CALL ENV_1
OHO C3 870 C RET
01 f1 871 C PST_B:
OlFl B6 03 872 C MOV OH,3
OlF3 B2 C2 873 C MOV OL, MI SC_OUTPUT
OH5 80 00 814 C MOV AL,O
01f7 EE 815 C OUT OX,AL
OH8 F6 04 876 C NOT AM
OHA 08 26 0487 R 811 C OR INfO,AH
OlFE E8 0158 R 878 C CALL ENV_O
0201 £8 0168 R 819 C CALL ENV_1
0204 880 C PST_OUT:
0204 C3 881 C RET
0205 882 c MK_ENV ENoP
0205
891
892
C
C
bD:pRESENcE:'fs'f-pRoc----NEAR--------------------------------------------
0205 53 89' C PUSH BX SAVE BX
0206 B8 007F 89' C MOV BX,07FH INITIAL WORD PATTERN BYTE
0209 88 FB 895 C MOV DI,BX
020B 50 89. C PUSH AX SAVE PORT ADDRESS
020C £8 022C R 897 C CALL RO_CURSOR
020F 88 FO 898 C MOV 51 ,AX SAVE OR I G I NAL VALUE
0211 58 899 C POP AX RECOVER PORT ADDRESS
0212 50 900 C PUSH AX SAVE PORT ADDRESS
0213 £8 0236 R 901 C CALL WR_CURSOR WR I TE CURSOR
0216 58 902 C POP AX RECOVER PORT ADDRESS
0217 50 90' C PUSH AX SAVE PORT ADDRESS
0218 £8 022C R 90, C
g~~L ~~;gyRSOR READ IT BACK
021B 38 C7 905 C SAME?
0210 58 90. C POP AX
021 E 75 03 907 C JNZ NOT_PRESENT EXIT IF NOT EQUAL
0220 EB 05 90 908 C JMP TST_EX
0223 909 C NOT_PRESENT:
0223 33 CO 910 C XOR AX,AX SET NOT PRESENT
0225 56 911 C POP BX
0226 C3 912 C RET
0227 913 C
0227 B8 0001 914 C MOV AX,l SET PRESENT ON EXIT
022A 56 915 C POP 8X RESTORE BX
0228 C3 91. C RET
022C 917 C CD_PRESENCE_ TST ENOP
918 C
919
920
G
G
; -MODULE- NAME--RO:CURSOR------ --------- -------- ------- -- --- ------ --------
921 G READ CURSOR POSITION [ADDRESS] (FROM CRTC) TO AX
922 C
923 G : REGISTER AX IS MODIFIED.
022C
924
925
G
C
~O-CURSOR--- ----;ROC-NEAR -- ---------- -------- ---- ------------------ ------
022C 52 92. G - PUSH OX ; SAVE REGS USED
0220 88 00 927 G MOV DX,AX
022F 80 DE 928 G MOV AL, C_CRSR_LOC_HGH
0231 H 929 G OUT DX,AL
0232 42 930 C ING OX
0233 EC 931 G IN AL,OX
932 G RETURN WITH CURSOR POS I N AX
933 G RESTORE REGS USED
0234 5A 934 G POP
0235 C3 9'5 C RET
0236 93. C RO_CURSOR ENDP
937 C
938
939
G
C
; -MODULE-N~M~--~~=~U~SO~ ------ -- ------- ------- ----- -------- --------------
940 C WR I TE CURSOR pas I T I ON [ADDRESS] (TO CRTC) 101 I TH CONTENTS OF AX
941 C
942 C ; ALL REGISTERS PRESERVED
94' C ~R=~U~S~R-------PR~C-NEAR-----------------------------------------------
0236 944 C
945 C SAVE REGS USED
0236 50 94. C PUSH AX
0237 52 947 C PUSH OX
0238 86 DO 948 C MOV DX,AX
023A B4 OE 949 G MOV AH, C CRSR LaC HGH CURSOR LOCATION HIGH INDEX
023C BO 7F 950 C MOV AL,07FH - - TEST VALUE
023E E8 0015 R 951 C CALL OUT_OX
952 C RETURN WITH CURSOR pas I N AX
953 G RESTORE REGS USED
0241 5A 954 C POP OX
0242 5B 955 C POP AX
0243 C3 95. C RET
0244 957 C WR_CURSOR ENOP
958 C
0244 959 G POST:
9.0
9.'
C
C
; --------------------------------------------------------
INITIALIZE AND START CRT CONTROLLER (6845)
9.2 G ON COLOR GRAPH I CS AND MONOCHROME CARDS
963 C TEST V IDEO READ/WR I TE STORAGE.
9.4 C OEseR I PT I ON
9.5 C RESET THE V IDEO ENABLE SI GNAl.
9 •• C SELECT ALPHANUMERIC MODE, 40 *
25, 8 & W.
9.7 C READ/WRITE DATA PATTERNS TO STG. GHECK STG
9.8 C ADDRESSABILJTY.
9.9 C . --------------------- - ----------------------------------
970 C ASSUME OS: ABSO, ES: ABSO
0244 [8 DC FE R 971 C CALL DOS
0247 F6 06 0487 R 02 972 C TEST INFO,2
024C 75 12 973 C JNZ COLOR_PRESENCE_ TST
024E B8 03B4 974 C MOV AX,03B4H
0251 E8 0205 R 975 C CALL CO PRESENCE TST
0254 30 0001 97. C CMP AX;1 -
0257 74 03 977 C JE CONT1
0259 E9 0317 R 978 C JMP P0014
025C 979 C CONTt:
02SC B4 30 980 C MOV AH,30H ; MONOCHROME CARD INSTALLED
025E EB 10 981 C JMP SHORT OVER
0260 982 C COLOR_PRESENCE_TST:
0260 88 0304 98' C MOV AX,03D4H
0263 E8 0205 R 984 C CALL CD_PRESENCE_ TST
0266 3D 0001 985 C CMP AX, 1
0269 74 03 98. C JE CONT2
026B E9 0317 R 987 C JMP POD14
026E 988 C CONT2 :
026E 84 20 989 C MOV AH,20H COLOR GRAPH I CS CARD INSTALLED
0270 990 C OVER:
0270 50 991 C PUSH AX RESAVE VALUE
0271 8S BODO 992 C MOV BX, OBOOOH BEG V I OEO RAM ADDR B/W CO
0274 8A 0368 99' C MOV OX,3B8H MODE CONTROL B/W
0277 89 1000 994 G MOV CX,4096 RAM BYTE CNT FOR B/W CO
027A BO 01 995 C MOV AL,l SET MODE FOR Bioi CARD
027C 60 FC 30 99. C CMP AH,30H B/W VIDEO CARD ATTACHED?
027F 74 08 997 C JE E9 YES - GO TEST V I DEO STG
0281 87 B8 99. C MOV BH,OB8H BEG VIDEO RAM AODR COLOR CD
0283 82 08 999 C MOV DL,OD8H MODE CONTROL COLOR
0285 85 40 1000 C MOV CH,40H RAM BYTE CNT FOR COLOR CO
0287 FE C8 1001 C DEC AL SET MODE TO 0 FOR COLOR CO
0289 1002 C E9: TEST_V I DEO_STG:
0289 EE 1003 C OUT DX,AL o I SABLE V IDEO FOR COLOR CD
1004 C
028A 8B 2E 0472 R 1005 C MOV BP, OS: RESET_FLAG POD INITIALIZED BY KBD RESET
1006 C
028E 81 FD 1234 1007 C CMP BP,1234H POD INITIATED BY KBD RESET?
0292 BE C3 1008 G MOV ES,BX POINT ES TO VIDEO RAM STC
02A9 58
1031
1032
1033
C
C
C
;
;
AND HORIZONTAL SYNC LINES.
----------------------------------------------
POP AX
----------
GET VIDEO SENSE SW INFO
02AA 50 1034 C PUSH AX SAVE IT
02A8 80 FC 30 1035 C CMP AH,30H B/W CARD ATTACHED?
02AE BA 03BA 1036 C MOV OX,03BAH SETUP ADOR OF BW STATUS PORT
0281 74 02 1037 C JE E11 YES - GO TEST LJ /liES
02B3 B2 DA 1038 C MOV DL,ODAH COLOR CARD I S ATTACHED
0285 1039 C Ell: LlNE~TST:
0285 B4 08 1040 C MOV AH,8
0287 1041 C E12: ; OFLOOP~CNT:
02B7 2B C9 1042 C SUB CX,CX
02B9 1043 C £13:
02B9 EC 1044 C IN AL,OX READ CRT STATUS PORT
02BA 22 C4 1045 C ANO AL,AH CHECK V I OEO/HORZ LI NE
02BC 75 04 1046 C JNZ Et. ITS ON - CHECK I F IT GOES OFF
02BE E2 F9 1047 C LOOP E13 LOOP TILL ON OR TIMEOUT
02CO EB 09 1048 C JMP SHORT E17 GO PR I NT ERROR MSG
02C2 1049 C E14:
02C2 2B C9 1050 C SUB CX,CX
02Cl, 1051 C £15:
02C4 EC 1052 C IN AL,DX READ CRT STATUS PORT
02C5 22 C4 1053 C ANO AL,AH CHECK VIDEO/HORZ LI NE
02C7 74 OA 1054 C JZ E1. I TS ON - CHECK NEXT LI NE
02C9 E2 F9 1055 C LOOP Et5 LOOP If OFF TILL IT GOES ON
02CS 1056 C E17: CRT_ERR
02CB SA 0102 1057 C MOV OX,102H
02CE E8 06C8 R 105B C CALL ERR BEEP ; GO BEEP SPEAKER
0201 EB 06 1059 C JMP SHORT E18
0203 1060 C E16: NXT_LINE
0203 Bl 03 1061 C MOV CL,3 GET NEXT BIT TO CHECK
0205 02 EC 1062 C SHR AH,CL
0207 75 DE 1063 C JHZ E12 GO CHECK HORIZONTAL LINE
0209 1064 C £18: o I SPLAY_CURSOR:
0209 58 1065 C POP AX GET VIDEO SENSE SWS (AH)
02DA E8 3B 1066 C JMP SHORT P0014
1067
1068
1069
C
C
C
; --------------------------------------------------------- ---------------
THIS SUBROUTINE PERFORMS A READ/WRITE STORAGE TEST ON
1070 C A 16K BLOCK OF STORAGE.
1071 C ENTRY REQU I REMENTS:
1072 C ES == ADDRESS OF STORAGE SEGMENT BE I NG TESTED
1073 C OS == ADDRESS OF STORAGE SEGMENT BE I NG TESTED
1074 C WHEN ENTERING AT STGTST_CNT. CX MUST BE LOADED WITH
1075 C THE BYTE COUNT.
1076 C EXIT PARAMETERS:
1077 C ZERO FLAG = 0 I F STORAGE ERROR (DATA COMPARE OR PAR I TY CHECK.
1078 C AL == 0 DENOTES A PARITY CHECK. ELSE AL::XOR'ED BIT
1079 C PATTERN OF THE EXPECTED DATA PATTERN VS THE
1080 C ACTUAL DATA READ.
1081 C AX.BX.CX.DX,DI, AND SI ARE ALL DESTROYED.
1082 C ~TGTST--PROC----NEAR-----------------------------------------------------
020C 1083 C
020C B9 4000 1084 C MOV CX,4000H SETUP CNT TO TEST A 16K BLK
02DF 1085 C STGTST_CNT:
02DF FC 1086 C CLD SET DIR fLAG TO INCREMENT
02EO 88 09 1087 C MOV BX,CX SAVE CNT (4K fOR VIDEO OR 16K)
02E2 B8 AAAA 1088 C MOV AX,OAAAAH GET DATA PATTERN TO WRITE
02E5 BA FF55 1089 C MOV DX,OfF55H SETUP OTHER DATA PATTERNS TO USE
02E8 2B FF 1090 C SUB 01,01 01 = OFfSET 0 RELATIVE TO ES REG
02EA F3/ AA 1091 C REP STOSB WR I TE STORAGE LOCAT IONS
02EC 1092 C C3: STGOl
02EC 4F 1093 C OEC 01 PO I NT TO LAST BYTE JUST WR I TTEN
02EO FD 1094 C STO SET DIR FLAG TO GO BACKWARDS
02E£ 1095 C C4:
02££ BB F7 1096 C MOV SI,OI
02fO 88 CB 1097 C MOV CX,8X SETUP BYTE CNT
02F2 1098 C C5: I NNER TEST LOOP
02F2 AC 1099 C LODS8 READ OLD TEST BYTE [SI]+
02F3 32 C4 1100 C XOR AL,AH DATA READ AS EXPECTED ?
02F5 75 1E 1101 C JNE C7 NO - GO TO ERROR ROUTI NE
02F7 8A C2 1102 C MOV AL,OL GET NEXT DATA PATTERN TO WRITE
02F9 AA 1103 C STOSB WRITE INTO LOCATION JUST READ
02FA £2 f6 1104 C LOOP C5 OECREMENT COUNT AND LOOP CX
1105 C
02fC 22 E4 1106 C ANO AH,AH ENDING 0 PATTERN WRITTEN TO STG?
02FE 74 13 1107 C JZ C.X YES - RETURN TO CALLER WITH AL=O
0300 8A EO 1108 C MOV AH,AL SETUP NEW VALUE fOR COMPARE
0302 86 F2 1109 C XCHG DH,DL MOVE NEXT DATA PATTERN TO OL
0304
0306
0308
22
75
8A
£4
04
04
1"0
1111
1112
C
C
C
AND
JHZ
MOV
C.
AH,AH
DL,AH
READING ZERO PATTERN THIS PASS?
CONTI NUE TEST SEQUENCE TILL 0
ELSE SET 0 FOR END READ PATTERN
030A EB EO 1113 C JMP C3 AND MAKE fiNAL BACKWARDS PASS
030C 1114 C C6:
030C FC 1115 C CLD SET D I R FLAG TO GO FORWARO
0300
030E
0310
47
74 DE
4F
1116
1117
1118
C
C
C
INC
JZ
DEC
C,
01
01
SET POINTER TO BEG LOCATION
READ/WRlTE FORWARD IN STG
ADJ UST PO INTER
0311 E809 1119 C JMP C3 READ/WR I TE BACKWARD IN STG
0313 1120 C C6X:
0313 80 00 1121 C MOV AL,OOOH AL==O DATA COMPARE OK
0315 1122 C C7:
0315 FC 1123 C CLO SET DIRECTION FLAG BACK TO INC
0316 C3 1124 C RET
0317 1125 C STGTST ENDP
1126 C
1127 C
1128 C EGA CRT ATTACHMENT TEST
1129 C
1130 C 1. INIT CRT TO 40><25 - 8W ****SET TO MOOE****
1131 C 2. CHECK FOR VERTICAL AND VIDEO ENABLES, AND CHECK
1132 C TIMING OF SAME
1133 C 3. CHECK VERTICAL INTERRUPT
1134 C 4. CHECK RED, BLUE, GREEN, AND INTENSIFY DOTS
OEBO
OEBl
'a
f.
2651
2652
POP
STC
AX
24
06 0"87 R
7F
2715
2716
2717
OR
POP
AND
INFO,AL
AX
AL, q7FH
SAVE REGEN GLEAR, BIT
~ECOVER TRUE CALL VALUE
ALREADY DEALT WITH 01
OF2F 3C OF 2718 CMP AL,OfH A MONOCHROME MODE
Of31 74 02 2719 JE ST 2A 00 THIS MODE
0f33 80 07 2120 MOV AL-:-7 REGULAR MONOCHROME
Of35 2721 ST_2A:
Of35 A2 0449 R 2722 MOV CRT_MODE,AL sAVE MODE VALUE
0f38 B2 B4 2723 MOY OL, CRTC~ADDR_B I T IS 3~B~X
OF3A 89 16 0463 R 2724 MOY ADDR~6845, OX SAVE CRTC ADDRESS
Of3E EB lC 90 2725 JMP QQl CaNT I NUE THE MODE SET
2726
2727 ; ~~~~~ COLOR SETUP TO THE ADAPTER
2728
OF"l 2729 ST_3:
OF41 5. 2730 POP AX RECOVER PARAMETER VALUE
Of42
Of43
'0
B6 03
2731
2732
PUSH
MOY
AX
DH,3
SAVE IT
Df7E
Of82
26: sA 47 01
A2 0484 R
2757
2758
2759
2760
MOY
MOY
~L.ES:[BX][11
ROWS,AL ,
: GET ROW VALUE
STORE ROW VALUE
~~~~~~H
10BA 75 02 2895 JNE
10BC BO 3F 2896 Mav
lOBE 2897 DO_PAL:
lOBE A2 0466 R 2898 Mav CRT_PALETTE, AL
"57
3022
3023
e
e iH2;-------------------------------------------------------------
1157 E8 1150 R 3024 C CALL
READ_C¥~~~R ROUT I NE
3054 C
3055 e ; READS THE CURRENT CURSOR VALUE f=ROM
3056 e :,', I NPUT MEMORY AND SENDS IT BACK TO THE CALLER
3057 e
3058 e BH - PAGE OF CURSOR
3059 e ":, OUTPUT
3060
3061
e
e : ~3~RE~~Lg~~sg~ ~~~ECURRENT CURSOR POS I T ION
g~
1186
3062
3063
c
e
iHi;-.. -.. -.... -............. -.. --.. .. -.. ------.. -.. -.. --.... ---..
~- .... -.... -.. -
------~---
3112 e THIS ROUTINE TESTS THE LIGHT PEN SWITCH AND THE LIGHT
3113 e PEN TitIGOER. Ir ~orH ARE SET, THE LOCATION OF THE LIGHT
3114 e ~, r~~0~~A~T6~R7~N~fDE~rH£RwISE, A RETURN WITH NO
3115 e
3116 e ON E:xn
3117 o , (AHl '" 0 IF NO LICHT PEN INf'ORMATION IS AVAILABLE
3118 e ; BX, CX, oX ARE: otSTROYED
e
(AH) '" 1 nH~br~T,/~~W!~ot~~~L~~L~URRENr LIGHT PEN
3119
3120 e :,:
3121 e POSIT I ON
3122 o (CH) '" I\ASTE:R POS I T I ON (OLD MODES)
3123
3124
e
e ; {........ - --_ - l~~l ~ :~~+E~u~~~lr+O~I~~[WH~~?i~~TAL
-- -_ ....
...... ...... ........ - ............ _.......... -...... _.... __ _.. _...... _..POSITION
_...... -----
3125 c
3126 e ASSUME CS: CODE, DS:ABSO
3127 e ;-........ SUBTRACT_TABLE
l1el 3128 o V1 LABEL BytE
l1Cl 06060707 05 05 3129 e Os OQ6H, 006H, D07H, OD7H, D05H, 005H ; 0-5
l1C7 040$ 00 00 00 00 3130 e DB 004H, D05H, OOOH, OOOH, OOOH, OOOH ; 6 .. B
'1eo 0() 05 06 04 04 04 3131 c DB 0001'1, 005H, 006H,004H, 001lH, 004H ; e .. l1
1103 040606040704 3132 e DB 001lH, 006H, 006H, OD4H, 007H, 004H ; 12-11
1109 07 04 3133 e DB 007H,004H J 18-19
3134 e
110B 3135 e PROC NEAR
3136 e
3137 e ; .. ~ .. - .. WAIT FOR LIGHT PEN TO BE DEPRESSED
3138 e
110B sa 16 01163 R 3139 e HOV OX, ADDR_6845 GET BASE ADDRESS OF 6845
110r 83 C2 06 3140 e ADD DX 6 j PO I NT TO STATUS REG I STER
11 E2 EC 3141 e IN AL,OX GET STATUS REGISTER
11E3 A8 04 3142 e TEst AL,4 ; TEST LIGHT PEN SWITCH
11E5 B4 00 3143 e MOV AH,O J SET NO LIGHT PEN RETURN
l1E7
11E9
14
E9
03
1291 R
3144
3145
e
e
JZ
JMP
v.
v6
; CODE
J NOT SET. RETURN
3146 e
3147 e ;-_ ...... NOW TEST fOR LIGHT PEN TRIGGER
3148 e
l1EC 3149 C V9:
11EC A8 02 3150 e lEST AL.2 J rEST L I CHi PEN TR I GGER
,0
3164
3165
3166
0
C
C
OUT
INC
PUSH
DX,AL
OX
AX
SET IT UP
DATA REGISTER
1HE EO 3167 C IN AL,DX GET THE VALUE
llFF SA [8 3168 C MOV CH,AL SAVE IN CX
1201 5. 3169 C POP AX
1202 4A 3170 C OEC OX ; ADDRESS REG I STER
1203
1205
1207
FE C4
8A C4
EE
3171
3112
3173
C
C
C
INC
MOV
OUT
AH
AL,AH
DX,AL
, SECOND OAtA REGI aIER
1208 42 3174 C INC OX J POINT TO DATA REGISTER
1209 EC 3175 C IN AL,DX J on THE 2ND DATA VALUE
120A 8A E5 3176 C MOV AH,CH I AX HAS I NPUT VALUE:
3177 C
3178 C ; --_ .... AX HAS THE VALUE READ I N FROM tHE 6845
3179 C
120C 8A lE 0449 R 3180 e MOV BL, CRT_MODI::
1210 2A FF 3181 e SUB BH,8H MODE VALUE TO ax
1212 2E: 8A 9F l1Cl R 3182 C MOV BL,CS:V1IBXI AMOUNT TO SUBTRACT
1217 28 C3 3183 C SUB AX,BX TAKE I T AWAY
1219 8B 1E 044E R 3184 C MOV BX,CRT_START SGREEN At:)D~ESs
1210 01 EB 3185 C SH. BX,l DiviDE BV 2
121F 2B C3 3186 C SUB AX, ax ADJUST Tt) ZERO START
1221 79 02 3187 C JNS V2 IF POSITIVE, GET MOOE
1223 2B CO 3188 C SUB AX,AX <0 PLAYS AS 0
3189 G
3190 e 1-........ DETERMINE MODE OF OPERATION
3191 C
1225 3192 C V2: DETERM I NE MODE
1225 Bl 03 3193 C MOV CL,3 SET *8 SHIFT COUNT
1227 80 3E 0449 R 04 3194 C eMP CRT_MODE,4 , GRAPH I cs OR ALpHA
122C 72 40 3195 C JB V4 i ALPHA_PEN
122E 80 3E 0449 R 07 3196 C CMP CRT_MODE,7
1233 7446 3191 C JE V4 i ALPHA_liEN
3198 C
1235 80 3E 0449 R 06 3199 C CMP CRT~MODE; 06H
123A 77 28 3200 C JA VO
123C 7S 02 3201 C JNE VO'
123E 01 f8 3202 e SH. AX,1
3203 G
3204 C ; - ....... OLD GRAPH I CS MODES
3205 G
1240 3206 G VflX;
1240 B2 28 3207 C MOY DL j 40 DIVISOR FOR GRAPHICS
1242 F6 F2 3208 e OIV DL ROW(Al) AND GiJLUMN(AH}
3209 C AL RANGE 0-99;
3210 e AH RANGE 0"'39
3211 e ,"---" DETERMINE GRAPHIC ROW POSiTION
3212 e
1244 8A f8 3213 e MOY CH,AL SAVE ROW VALUE iNCH
1246 02 ED 3214 C AOO CH,CH *2 FOR EVEN/ODD FIELD
1248 8A DC 321~ e MOV BL,AH COLUMN VALUE TO BX
124A 2A ff 3216 e SUB BH,BH *8 FOR MED I UM RES
124C 80 3E 0449 R 06 3217 e eMP CRT_MODE, 6 MEDIUM OR HIGH RES
1251 75 04 3218 C JNE V3 NOT~HIGH_RES
1253 B1 04 3219 C MOV CL,4 SH I FT VALUE FOR HIGH RES
1255 DO E4 3220 C SAL AH,1 COLUMN VALUE *2 FOR HIGH RES
1257 3221 G V3: NOT _H I GH_RES
1257 D3 f3 3222 C SHL BX,CL *16 FOR HIGH RES
3223 C
3224 C ; ----- OETERM I NE ALPHA CHAR POSIT ION
3225 C
1259 8A 04 3226 C MOV DL,AH ; COLUMN VALUE FOR RETURN
125B 8A FO 3227 C MOV DH,AL : ROW YALUE
1250 DO EE 3228 e SH' DH,1 ; DIVJOE BY.4
125F DO EE 3229 C SH. DH,l ; FOR VALUE: iN 0-24 RANGE
1261 EB 2C 90 3230 G JMP V5 ; LIGHT_PEtLRETURN_SET
1264 3231 C V8:
3232 C
3233 G ;----- NEW GRAPHICS MODES
3234 e
1264 99 3235 e CWO PREPARE TO 0 I V I DE
1265 F7 36 044A R 3236 e DIV CRT .COLS AX "" ROW. ox "" COLUMN
1269 fl8 DA 3231 C MOV BX,OX SAVE REMA I NOEA.
126B 03 E3 3238 G SAL aX,CL p[L COLUMN
126D 88 c8 3239 e MOV eX,AX PEL ROW
126F 52 3240 e PUSH OX SAVE FROM i1lVIDE
1270 99 3241 e CWO PREPARE: TO blVIDE
1271 F7 36 0485 R 3242 C OIV Po I NTS 01YIDE BY BYTES/CHAR
1275 3243
~~X~X~~ER
5A e POP OX
1276 8A FO 3244 C MOV DH,AL ROW
1278 EB 15 90 3245 G JMP V5
3246 e
3247 G ; --'--- ALPHA MODE ON LI GHT PEN
3248 C
1278 3249 C V4: ; ALPHA PEN
127B f6 36 044A R 3250 C OIV BYTE PTR CRT_COLS ; ROW,COLUMN VALUE
127r SA fO 3251 C MOV DH,AL ; ROWS TO DH
1281 8A D4 3252 C MOV DL,AH ; COLS TO DL
1283 flA DC 3253 C MOV BL,AH ; COLUMN VALUE
1285 32 Ff 3254 C XO. BH,BH ; 10 BX
1287 03 E3 3255 C SAL BX,CL
1289 F6 26 0485 R 3256 C MUL BYTE PTR PO I NTS
1280 fiB C8 3257 C MOV CX,AX
128F 3258 C V5: LJ GHT rEN iH:TUR~ _SET
128F B4 01 3259 C MOV AH,l INDICATE EYERt~ING SEt
§~e~TRt¥~ft~E~~~~E
1291 3260 C V6:
1291 52 3261 e PUSH DX
3262 G IN CASE _
1292 8B 16 0463 R 3263 e MOV DX.At)iJR 6845
1296 83 C2 07 3264 e ADO (lX; 7 -
1299 EE 3265 e OUT ox.Al
3266 e
129A 5A 3261 G POP OX
129B 3~68 G V11
129B 5F 3269 C POP 0;
129C 5E 3270 C POP 51
1290 113 C4 06 3271 C ADD sl>,6 OiSCARD SAVED ex,cx,ox
12AO
12A1
12A2
"
07
50
Of
3272
3273
3214
C
C
C
POP
'0'
pOP
OS
ES
S.
12A3 3215 (j I RET
12A4 3276 C REAO.... lPEN lSNDfi
- -:-:::::-::-::::::~:::-::------
3473 C
3474 C
3475
3476
C
C ~ -SCROLL~~ r:-:::~ ~:: ::~::
3477 C ON THE SCREEN
3478 C
3479 C : : :. INPUT (AH) = CURRENT CRT MODE
3480 C (AL) = NUMBER OF ROWS TO SCROLL
3481 C (CX) = ROW/COLUMN OF UPPER LEFT CORNER
3462 C (OX) = ROW/COLUMN OF LOWER RIGHT CORNER
3483 C IBH) = ATTRIBUTE TO BE USED ON BLANKED LINE
3484
3485
3486
C
C
C
;
; OUTPUT
I~~ ~ ~ ~~~~N S~~~~~~ SEGMENT
3487
3486
C
C
; W~._~. _________________________
N014E -- THE REGEN BUFFER · _______ · _____ · _________ _
IS MODIFIED
8A DE
13DA R 3638
3639
3640
C
C
C
N16:
MOV
JMP
N'
BL,DH
1412 E6 ED 3641 C JMP N1'
1474 3642 C SCROLL_DOWN ENOP
3643
3644
3645
C
C
C
; ----------------
SCROLL UP
--~--------------------------- ------------------
3646 C THIS ROUTINE SCROLLS UP THE INFORMATION ON THE CRT
3647 C ENTRY
3648 C CH,CL"" UPPER LEFT CORNER OF REGION TO SCROLL
3649 C DH,DL'" LOWER RIGHT CORNER OF REGION TO SCROLL
3650 C BOTH Of THE ABOVE ARE IN CHARACTER POSITIONS
3651 C BH = fiLL VALUE fOR BLANKED LI NES
3652 C Al = # LINES TO SCROLL (AL=O MEANS SLANl( THE ENTIRE
3653 C FI ELO)
3654 C DS = DATA SEGMENT
g ~ -EXPAND;~nE:::~~::-~::::-~::-:~~:-~:-::-:::-:::::::----
4029
4030
4031
4032 C; ALL OF THE BITS, TURNING THE 8 BITS INTO
16BA
4082
4083
e
e
6R=CUR;----------------------------------------------------------
4084 e ASSUME OS: ABSO
16BA 53 4085 e PUSH BX , SAVE REG I STER
16BB 8A OF 4086 e MOV BL, BH ; GET TO LOW BYTE
16BO 2A FF 4087 e SUB BH, BH ; ZERO HIGH BYTE
16Bf 01 (3 4068 e SAL BX.1 ; *2 FOR WORD COUNT
16C1 8B 81 0450 R 4069 e MOV AX, I BX + OFFSET CURSOR_POSN 1 ; CURSOR, REQUESTED PAGE
16c5 5B 4090
4091
4092
4093
e
e
e
e
; POP
-~~~;~s~- -------------------------------------------------------
8X ; _RECOVER REG I STER
1899
4463
4464
C
C
1;;9 ----------------------------------- ----------
~
51
KEEP GOING
RECOVER CODE paNTER
19CF 5F 4710 C POP 01 RECOVER REGEN PO INTER
1900 47 4711 C INC 01 PO I NT TO NEXT CHAR
1901 47 4712 C INC 01
1902 E2 87 4713 C lOOP 58 ; MORE TO WR ITE
1904 E9 219E R 4714 C JMP V_RET
1907 4715 C GRAPH I CS_WR I TE ENDP
4716 C
4717 C
4718
4719
C
C I. -ENTRY-i~-~-~i~~~~:i~~!:::----------·--------------------------
4720 C
4721 C
4722 C CX '" COUNT OF CHARS TO WR ITE
1907
4723
4724
4725
C
C
C
bRX=WRj-:~~~::--~~~::::~-::~~:~::::------------------------------
1907 80 FC OF 4726 C CMP AH, OFH 640X350 GRAPH t cs
190A 72 DE 4721 C J8 NO_ADJl
190C E8 14F7 R 4728 C CAll MEM_DET BASE CARD
~~D :~~~g~~010'8
190F 72 09 4729 C
19E1 80 E3 65 4730 C 85H, XOR C2 CO MASK
19E4 8A E3 4131 C MOV AH,8l
19E6 DO E4 4732 C SHl AH,1 EXPAND CO TO Cl, C2 TO C3
19E8 OA DC 4733 C OR Bl,AH BUilD ?(80H) + (O,3,C,n
19EA 4734 C NO_ADJ1 :
19EA 2A E4 4735 C SUB AH,AH ; ZERO
19EC F7 26 0485 R 4736 C MUL POINTS ,; OFFSET FONT TABLE BASE
19FO 50 4737 C PUSH AX ; FONT TABLE DISPLACEMENT
19F1 E8 16BA R 4738 C CAll GR_CUR ; GET OFFSET I NTO REGEN
19F4 8B F8 4739 C MOV DI,AX , INTO DESTI NATION
19F6 88 2E 0485 R 4740 C HOV BP,POINTS ; ByTES PER CHAR
"741 C SRlOAO ES,OAOOOH ; REGEN SEGEMNT
19FA BA AQOO 4742 C+ MOV DX,OAOOOH
19FD 8E C2 4743 C+ MOV ES,DX
19FF C5 36 010C R 4744 C LOS SI,GRX_SET ; ADDRESS I NG TO FONTS
lA03 58 4745 C POP AX ; RECOVER OF fSET
lA04 03 FO 4746 C ADD SI,AX ; CHARACTER I N TABLE
1A06 86 03 4747 C MOV DH,3
lA08 4748 C S20A:
lA08 F6 C3 80 4749 C TEST Bl,080H ; TEST FOR XOR
lA08 74 08 4750 C JZ NO_XOR ; NO XOR
lAOD 82 CE 4751 C MOV OL, GRAPH_ADOR
lAOF 88 0318 4752 C MOV AX,0318H GRAPH I CS CH I P XOR
1A12 E8 0015 R 4753 C CAll OUT_OX SET REG I STER
1A15 E8 lE 90 4754 C JMP '.2 SKIP BLANK
lA18 4755 C NO_XOR: BLANK BOX FOR CHAR
1A18 57 4756 C PUSH 01 SAVE REGEN PO INTER
1A19 82 C4 4757 C MOV Dl, SEILADDR
1A18 88 020F 4758 C MOV AX,020FH ENABLE ALL MAPS
lA1E E8 0015 R 4759 C CAll OUT_OX
1A21 28 CO 4760 C SUB AX,AX ; STORE ZERO
1A23 51 4761 C PUSH ex ; SAVE CHARACTER COUNT
1A24 88 CD 4762 C MOV CX,BP ; GET ByTE COUNT
lA26 1E 4763 C PUSH OS
lA27 E8 OCFE R 4764 C CALL DDS
lA2A 4765 C S13A:
1A2A AA 4766 C STOSB ,; ZERO REGEN 8YTE
lA28 03 3E 044A R 4767 C ADD OI,CRT_COlS ; NEXT BVTE OF BOX
lA2F 4f 4768 C DEC 01 ; ADJUST
1A30 E2 F8 4769 C lOOP 513A ; NEXT BYTE
1A32 lF 4770 C POP OS
lA33 59 4771 C POP ex RECOVER CHARACTER COUNT
lA34 5f 4772 C POP 01 RECOVER REGEN POINTER
lA35 4773 C
lA35 82 CII- 4774 C HOV Dl,SEQ_ADOR
lA37 84 02 4775 C MOV AH,02H SET MAP MASK
lA39 8A C3 4776 C HOV Al,8l FOR COLOR
lA38 E8 0015 R 4777 C CALL OUT_OX SET THE CHIP
lA3E 57 4778 C PUSH 01 SAVE OFFSET I N REGEN
lA3F 53 4779 C PUSH BX SAVE COLOR VALUE
1A40 51 4780 C PUSH CX SAVE CHACTER COUNT
lA41 88 DO 4781 C MOV 8X,BP LOOP CONTROL, BYTES/CHAR
lA43 1E 4782 C PUSH OS SAVE FONT SEGMENT
lA44 E8 OCFE R 4783 C CAll DDS SET LOW RAM SEGMENT
4784 C ASSUME DS:ABSQ
lA47 88 OE 044A R 4785 C MOV CX,CRT_COlS ; GET COLUMN COUNT
lA48 lF 4786 C POP OS ; RESTORE FONT SEGMENT
4787 C ASSUME DS:NOTHING
lA4C 4788 C SlK: ; WRITE OUT THE CHARACTER
~~:f~i\~U
lA4E 26: 8A 25 4790 MOV LATCH DATA
lASl 26: 88 05 4791 MOV WR ITE ONE BYTE OF FONT
lAS4 46 4792 INC 51 NEXT FONT PO I NT
lASS 03 F9 4793 ADO OI,CX ONE ROW BELOW LAST PO I NT
lAS7 4B 4794 DEC BX BYTES PER CHAR COUNTER
lAS8 75 F2 4795 JNZ SlK DO NEXT ROW OF CHARACTER
4796
lASA 59 4797 POP CX ; CHARACTER COUNT
lA5B 5B 4798 POP BX ; COLOR VALUE
lA5C 2B FS 4799 SUB SI, BP ; ADJUST PTR TO FONT TABLE
lA5E 5F 4800 POP 01 ; REGEN PO INTER
lA5F 47 4801 INC 01 ; NEXT CHAR POSN I N REGEN
lA60 E2 A6 4802 LOOP S20A ; WR ITE ANOTHER CHARACTER
4803
lA62 82 CE 4804 MOV Dl, GRAPH_ADDR
lA64 B8 0300 4805 MOV AX,0300H NORMAL WR I TE, NO ROTATE
lA67 E8 0015 R 4806 CAll OUT_OX SET THE CHI P
lA6A 82 C4 4807 MOV DL, SEQ_AODR
lA6C B8 020F 4808 MOV AX,020FH ENABLE ALL MAPS
lA6F E8 0015 R 4809 CALL OUT_OX SET THE CHI P
lA72 E9 219E R 4810 JMP V_RET
lA7S 4811 GRX_WRT ENOP
4812
4813 SUBTTL
4814
4815 ;----- SET COLOR PALETTE
4816
lA7S 4817 AHB:
4818 ASSUME DS:ABSO
lA75 80 3E 0463 R B4 4819 CMP BYTE PTR AODR_684S,OB4H
lA7A 74 09 48'20 JE M21_B ; CALL VAll 0 ONLY FOR COLOR
lA7C F6 06 0487 R 02 4821 TEST INFO,2 ; SEE I FITS THE OLD COLOR CARD
lA81 74 05 4822 JZ M21_A I F NOT, HANDLE I THERE
lAS3 CO 42 4823 INT 42H ; OLD CODE CALL
lA85 4824 M21_B:
lA85 E9 219E R 4825 JMP V_RET ; BACK TO CALLER
lAS8 4826 M21_A:
lAS8 2B CO 4827 SUB AX,AX
lA8A 8B E8 4828 MOV BP,AX
lA8C C4 3E 04A8 R 4829 LES DI,SAVE_PTR
lA90 83 C7 04 4830 ADD 01,4
lA93 26: C4 30 4831 LES DI,OWORD PTR ES:IDlj
lA96 8C CO 4832 MOV AX,ES
lA98 DB C7 4833 OR AX,OI
lA9A 74 01 4834 JZ NOT4AHB
lA9C 45 4835 INC BP
lA90 4836 NOT4AHB:
lA90 E8 lOCO R 4837 CALL PAL INIT
lAAO OA FF 4838 OR BH,SH
1AA2 75 65 4839 JNZ M20
4840
4841 ; ----- HANDLE BH == 0 HERE
4842 ALPHA MODES => BL == OVERSCAN COLOR
4843 GRAPHICS "'> BL == OVERSCAN AND BACKGROUND COLOR
4844
4845 ;----- MOVE INTENSITY BIT FROM 03 TO 04 FOR COMPATIBILITY
4846
lAA4 8A FB 4847 MOV BH, BL
lAM AD 0466 R 4848 MOV AL, CRT_PALETTE
lAA9 24 EO 4849 AND AL,OEOH
lAAB 80 E3 1 F 4850 AND BL, 01 FH
lAAE OA C3 4851 OR AL,BL
lABO A2 0466 R 4852 MOV CRT_PALETTE,AL
lAB3 8A OF 4853 MOV BL,BH
lABS 80 E7 08 4854 AND BH,08H
lAB8 DO E7 4855 SHL BH,1
lABA 8A E8 4856 MOV CH,AL
lABC 80 E5 EF 4857 AND CH,OEFH
lABF OA ED 4858 OR CH, CH
1AC1 80 E3 OF 4859 AND BL.OFH
lAC4 8A F8 4860 MOV SH,BL
lAC6 DO £3 4861 SHL BL,l
lAC8 80 E3 10 4862 AND Bl,010H
lACB 80 E7 07 4863 AND BH,07H
lACE OA OF 4864 OR BL,BH
4865
lADO AO 0449 R 4866 MOV AL, CRT_MODE
lAD3 3C 03 4867 CMP AL,3
lAD5 76 OE 4868 JBE M21
4869
4870 ; ----- GRAPH I CS MODE DONE HERE (SET PALETTE 0 AND OVERSCAN)
4871
lAD7 B4 00 4872 MOV AH,O
lAD9 8A C3 4873 MOV AL,BL
lADB E8 109F R 4874 CALL PAL_SET
4875
lADE OB ED 4876 OR BP, BP
lAEO 74 03 4877 JZ M21
lAE2 26: 88 10 4878 MOV ES:(DI],BL
4879
4880 ;----- ALPHA MODE DONE HERE (SET OVERSCAN REGISTER)
4881
lAE5 4882 M21:
lAE5 80 3E 0449 R 03 4883 CMP CRT_MODE,3 ; CHECK FOR AN ENHANCED MODE
lAEA 77 05 4884 JA SET OVRSC ; NO CHANCE
lAEC E8 OE9A R 4885 CALL BRST DET ; SEE I F WE ARE ENHANCED
1AEF 72 07 4886 JC SKI P=OVRSC ; THERE I S NO BORDER
lAF1 4887 SET_OVRSC:
1AF1 64 11 4888 MOV AH,OllH ; OVERSCAN REG I STER
1AF3 8A C3 4889 MOV AL,BL
lAF5 E8 lD9F R 4890 CALL PAL_SET ; SET THE BORDER
lAF8 4891 SKIP~OVRSC:
lAF8 OB ED 4892 OR BP, SP
lAFA 74 04 4893 JZ M21Y
lAFC 26: 88 50 10 4894 MOY ES:(DI )(16Dj,BL
lBOO 4895 M21Y:
lBOO 8A DO 4896 MOV BL,CH
1B02 80 E3 20 4897 AND BL,020H
lB05 S1 05 4898 MOV CL,5
1807 02 EB 4899 SHR BL,CL
4900
4901 HANDLE BH = 1 HERE
4902 ALPHA MODES ==> NO EFFECT
4903 GRAPH I CS ==> LOW 81 T OF BL == 0
4904 PALETl E 0 == BACKGROUND
4905 PALETTE 1 == GREEN
4906 PALETTE 2 '" RED
4907 PALETTE 3 '" BROWN
4908 => LOW B IT OF BL == 1
4909 PALETTE 0 == BACKGROUND
4910 PALETTE 1 == CYAN
4911 PALETTE 2 == MAGENTA
4912 PALETTE '3 = WH I TE
4913
4914
1888
5014
5015
e
e k;------PROC----NEAR-------------------------------------
lB88 53 501~ e PUSH BX SAVE BX DURING OPERATION
lB89 50 5017 e PUSH AX WILL SAVE AL DURING OPERATION
5018 e
5019 e ;----- DETERMINE 1ST BYTE IN IDICATED ROW BY MULTIPLYING ROW VALUE BY 40
5020 e ;----- ( LOW BIT OF ROW DETERMINES EVEN/aDO, 80 BYTES/ROW
5021 e
lB8A BO 28 5022 e MOV AL,40
lB8C 52 5023 e PUSH ox SAVE ROW VALUE
lB8D 80 E2 FE 5024 e AND DL,OFEH STR I P OFF ODD/ EVEN BIT
1890 F6 E2 5025 e MUL DL AX HAS ADDRESS OF 1 ST BYTE
5026 e OF INDICATED ROW
lB92 5A 5027 e POP ox RECOVER IT
1893 F6 C2 01 5028 e TEST DL,l TEST FOR EVEN/ODD
1896 74 03 5029 e JZ R4 JUMP I F EVEN ROW
1898 05 2000 5030 e ADD AX,20aOH OFFSET TO LOCATION OF ODD ROWS
lB98 5031 C R4: EVEN_ROW
1B98 88 FO 5032 e MOV SI,AX MOVE POINTER TO SI
1890 58 5033 e POP AX RECOVER AL VALUE
lB9E 88 01 5034 e MOV oX,ex COLUMN VALUE TO D?(
5035 e
5036 e ; ----- DETERM IHE GRAPH I CS MODE CURRENTLY I N EFFECT
5037 e
5038 e ; -SET-UP-;HE -REG i ;TERS-ACCORDING-TO -;HE-MODE---------------------
5039 e
5040 e CH ;; MASK FOR LOW OF COLUMN ADDRESS ( 7/3 FOR HI GH/MED RES)
5131 e
lBFC 5132 C WRITE DOT 2 PROC NEAR
lSFC 80 3£ 0449 R Of 5133 e ~ CMP CRT _MOOE, 0 FH
lCOl 72 00 5134 C JB NO_ADJ2
lC03 E8 14F1 R 5135 C CALL MEM_DET ; BASE CARD
1C06 72 08 5136 C JC NO_AOJ2
lC08 24 85 5137 C AND AL,10000101B ; 85H, XOR C2 CO MASK
lCOA 8A EO 5138 C MOV AH,AL
lCOC DO E4 5139 C SHL AH,l EXPAND CO TO Cl, C2 TO C3
lCOE OA C4 5140 C OR AL,AH BUILD ?(80H) + (0,3,C,F)
lClO 5141 C NO ADJ2:
lC10 50 5142 C - PUSH AX
lCll 8B C2 5143 e MOV AX,OX ROW VALUE
lCB £8 1B60 R 5144 e CALL OOT_SUP_l BX=OFFSET, AL=B IT MASK
lCl6 B6 03 5145 C MOV DH,3
lC1S B2 CE 5146 e MOV OL, GRAPH_AODR GRAPHICS CHIP
lC1A B4 08 5147 C MOV AH,G_BIT_MASK BIT MASK REG I STER
lC1C E8 0015 R 5148 C CALL OUT_OX SET BIT MASK
lCl F 52 5149 e PUSH OX
5150 e SRLOAD ES,OAOOOH REGEN SEGMENT
1C20 BA AOOO 5151 e+ MOV OX,OAOOOH
lC23 8E C2 5152 e+ MOV ES,OX
lC25 5A 5153 C POP OX
1C26 58 5154 C POP AX RECOVER COLOR
1C27 8A E8 5155 C MOV CH,AL SAVE COLOR
1C29 F6 C5 80 5156 C TEST CH,080H SEE IF XOR
1C2C 74 OA 5157 C JZ WD_A NO XOR
lC2E B4 03 5158 C MOV AH,G_OATA_ROT DO XOR
lC30 BO 18 5159 e MOV AL,018H XOR FUNCTt ON
lC32 E8 0015 R 5160 C CALL OUT_OX SET THE REG I STER
lC35 EB 12 90 5161 e JMP WD_B SK I P THE BLANK
lC38 5162 e BLANK THE DOT
lC38 B2 C4 5163 e MOV DL,SE<LAOOR SEQUENCER
lC3A B4 02 5164 e MOV AH,S_MAP MAP MASK
lC3C BO FF 5165 e MOV AL,OfFH ENABLE ALL MAPS
lC3E E8 0015 R 5166 e CALL OUT_OX SET THE REG I STER
lEAE
5622
5623
C
C
------------------------------------------------
CH_GEN:
lEAE 50 5624 C PUSH AX ; SAVE THE I NVOLVEO REGS
lEAF 55 5625 C PUSH 8P
1 ESO 53 5626 C PUSH 8X
1 EBl 51 5627 C PUSH CX
lE82 52 5628 C PUSH OX
lEB3 DO 5629 C PUSH ES
5630 C
5631 C ASSUME OS:ABSO
1 E84 E8 OCFE R 5632 C CALL ODS SET DATA SEGMENT
1 EB7 AO 0449 R 5633 C MOV AL,CRT_MODE GET THE CURRENT MODE
lEBA 50 5634 C PUSH AX SAVE IT
lEBB 3C 07 5635 C CMP AL,7 I S TH I S MONOCHROME
1 EBD 74 07 5636 C JE H14 MONOCHROME VALUES
1 E8F C6 06 0449 R OS 5637 C MOV CRT_MODE,OBH COLOR VALUES
lEC4 EB 05 5638 C JMP SHORT H15 SKI P
1 EC6 5639 C H14:
1 EC6 C6 06 0449 R OC 5640 C MOV CRT_MODE,OCH ; MONOCHROME VALUES
1 ECB 5641 C H15:
1 ECB E8 ODAB R 5642 C CALL SET_REGS
1 ECE E8 OCFE R 5643 C CALL ODS RESET THE DATA SEGMENT
lEDl 58 5644 C POP AX RECOVER OLD MODE VALUE
lED2 A2 0449 R 5645 C MOV CRT_MOOE, AL RETURN TO lOW MEMORY
5646 C
1 ED5 07 5647 C POP ES RESTORE REGS THAT WERE
lED6 5A 5648 C POP OX USED BY THE MODE SET
lE07 59 5649 C POP CX ROUTINES
lE08 5. 5650 C POP 8X
lED9 50 5651 C POP 8P
lEDA 58 5652 C POP AX
5653 C
lEDB OA CO 5654 C OR AL,AL SET FLAGS
1 EDO 74 17 5655 C JZ 00_MAP2 USER SPEC I f I ED FONT
lEDF DE 5656 C PUSH CS SET SEGMENT TO
1 EEO 07 5657 C POP ES THI S MODULE
1 EEl 2B 02 5658 C SU8 OX,OX ZERO OUT START OFFSET
, EEJ B9 0100 5659 C MOV CX,02560 CHAR COUNT (FUll SET)
lEE6 FE C8 5660 C DEC AL WHICH PARAMETER
1 EE8 75 07 5661 C JNZ H7 MUST BE ONE
lEEA B7 OE 5662 C MOV BH,014D BYTES PER CHARACTER
lEEC BO 0000 E 5663 C MOV BP, OFFSET CGMN 8 X 14 TABLE OFFSET
lEEF E8 05 5664 C JMP SHORT DO_MAP2 STORE IT
lEF1 5665 C H7:
lEfl B7 08 5666 C MOV BH,8 8 X 8 FONT
lEF3 BD 0000 E 5667 C MOV BP, offSET CGDDOT ROM 8 X 8 DOUBLE DOT
5668
5669
5670
C
C
C
; ------------------------------------------
ALPHA CHARACTER GENERATOR LOAD
------
e:~E~
20C9 74 03 5973 JE
20CB E9 219E R 5974 JMP INVALID CALL
20CE 5975 ACe2: ; NEW PR I NT SCREEN
5976 SRLOAD DS,O
20CE 2B 02 5977 SU8 DX,DX
2000 8E DA 5978 MOV DS,OX
2002 FA 5979 eLi
2003 C7 06 0014 R 21"7 R 5980 MOV WORD PTR INT5_PTR, OffSET PRINT_SCREEN
2009 8C DE 0016 R 598' MOV WORD PTR I NT5_PTR+2, CS
2000 F8 5982 STI
20DE E9 219E R 5983 JMP V_RET
20E' 5984 ACI"_3:
20£1 8A 3E 0487 R 5985 MOV BH,INFO LOOKING FOR MONOC BIT
20E5 80 E7 02 5986 AND BH,2 ; ISOLATE
20E8 DO EF 5987 SH' BH,l ; ADJUST
5988
20EA AO 0487 R 5989 MOV AL,INFO LOOK I NG FOR MEMORY
20EO 24 60 5990 AND AL.01100000B ; MEMORY BITS
20EF B1 05 5991 MOV CL,5 ; SH I fT COUNT
20Ft 02 E8 5992 SH. AL,CL ; ADJUST MEM VALUE
20F3 8A 08 5993 MOV BL,AL ; RETURN REGISTER
5994
20F5 8A DE 0488 R 5995 MOV CL.INFO_3 FEATURE/SWI TCH
20F9 8A E9 5996 MDV CH,CL DUPLICATE IN CH
20FB 80 E1 OF 5997 AND CL.OFH MASK Off SWITCH VALUE
20FE DO ED 5998 SH' CH,l MOVE fEATURE VALUE
2100 DO ED 5999 SH' CH.l
2102 DO ED 6000 SHR CH,l
2104 DO ED 6001 SHR CH.l
2106 80 E5 OF 6002 AND CH.OfH MASK IT
6003
2109 5F 6004 PDP 01
210A 5E 6005 POP SI
210B 5A 6006 POP DX DISCARD BX
210C 5A 6007 POP ox DISCARD ex
2100 5A 6008 POP ox
210E 1F 6009 POP OS
210F D7 6010 POP ES
2110 50 6011 POP BP
2111 eF 6012 IRET
2112 6013 AH12_X:
2112 E9 219E R 6014 JMP V_RET RETURN TO CALLER
2115 6015 ACT_' :
2115 6016 STR_OUTZ:
2115 E9 219E R 6017 JMP V_RET RETURN TO CALLER
6018
6019 ;---~- WRITE STRING
6020
2118 6021 AH13:
2118 3C 04 6022 eMP AL.04 RANGE CHECK
211A 73 F9 6023 JAE STR_OUTZ I NVALI 0 PARAMETER
211C E3 F7 6024 JCXZ STR_OUTZ
211E 53 6025 PUSH BX SAVE REGISTER
21lF 8A OF 6026 MOV BL.BH GET PAGE TO LOW BYTE
2121 2A FF 6027 SUB BH,BH
2123 01 E3 6028 SAL BX,1 *2 FOR WORD OffSET
2125 8B 87 0450 R 6029 MOV Sl,lBX + OffSET CURSOR_POSN] GET CURSOR POSITION
2129 58 6030 POP BX RESTORE
212A 5. 6031 PUSH SI CURRENT VALUE ON STACK
6032
2128 50 6033 PUSH AX
212C BB 0200 6034 MOV AX,0200H SET THE CURSOR POSITION
212F CD 10 6035 INT 10H
2131 58 6036 POP AX
2132 6031 STR_l :
2132 51 6038 PUSH ex
2133 53 6039 PUSH BX
2134 50 6040 PUSH AX
2135 86 EO 6041 XCHG AH,AL
2137 26: 8A 46 00 6042 MOV AL,ES:[BP] GET THE CHAR TO WR ITE
213B 45 6043 INC 8P
213C 3C OD 60lf.4 eMP AL,ODH CARR I AGE RETURN
213E 74 3D 6045 JE STR_CR_lf
2140 3C OA 6046 CMP AL,OAH LINE FEED
2142 74 39 6047 JE STR_CR_lf
2144 3C 08 6048 CHP AL,D8H BACKSPACE
6149
6150 AT THIS POINT WE KNOW THE COLUMNS/LlNE ARE IN
6151
6152
6153
; 0
~:~ I D~~~~~~, ~~~~X I ~U~~~~~ Cf!t~ ~S I I b~~ JMOri~E STACK
; ----------------~-----------------------------------------------
21CO 8A CC 6154 MOV CL,AH ; WI LL MAKE USE OF ICX] REG TO
21C2 8A 2E 0484 R 6155 HOV CH,ROWS CONTROL ROW &: COLUMNS
21C6 FE C5 6156 INC CH ADJUST
21C8 E8 2220 R 6157 CALL CRLf CAR RETURN Ll NE fEED ROUTI NE
21C8 51 6158 PUSH CX SAVE SCREEN BOUNDS
21CC B4 03 6159 MOV AH,3 WILL NOW READ THE CURSOR.
21CE CD 10 6160 INT 10H AND PRESERVE THE POSITION
2100 59 6161 POP CX RECALL SCREEN BOUNDS
2101 52 6162 PUSH OX RECALL IBH]=VISUAL PAGE
2102 33 02 6163 XOR DX,oX SET CURSOR POS IT I ON TO 10,0 I
6164
6165
6166
6167
6168
2104 6169
2104 B4 02 6170 MOV AH,2 TO INDICATE CURSOR SET REQUEST
2106 CO 10 6171 INT 10H NEW CURSOR POS ESTABL I SHED
2108 8408 6172 MOV AH,8 TO I NO I CATE READ CHARACTER
21DA CD 10 6173 INT 10H CHARACTER NOW IN IALI
210C OA CO 6174 OR AL,AL SEE I F VAll 0 CHAR
1 PAGE,120
2 SUBTTL MONOCHROME CHARACTER GENERATOR
0000 3 COOE SEGMENT PUBL t C
4 PUBLi C CGMN
0000 5 CGMN LABEL BYTE
6 BW 8*14 PATTTERN
0000 00 00 00 00 00 00 7 08 OOOH, OOOH, OOOH, OOOH, OOOH, OOOH, OOOH, OOOH TOP_HALF _00
00 00 8
0008 00 00 00 00 00 00 9 08 OOOH, OOOH, OOOH, OOOH, OOOH, OOOH BOTTOM_HALF 00
OOOE 00 00 7E 81 A5 81 10 08 OOOH,OOOH, 07EH, 081 H, OASH, 081 H, 081H,OBOH TH_01
81 BO
0016
OOlC
99
00
81
00
7E 00 00 00
7E FF DB FF
"
12
13
013
DB
099H,081H,07EH,000H,000H,OOOH ,
000H,000H,07EH,OHH,00BH,OFFH,OFFH,OC3H ;
BT 01
TH::::02
FF C3 14
0024 E7 FF 7E 00 00 00 15 DB OE7H,OFFH,07EH,000H,000H,000H , BT 02
002A 00 00 00 6C FE FE 16 DB 000H,000H,000H,06CH,OFEH,OFEH,OFEH,OFEH ; TH::::03
FE FE 17
0032 7C 38 10 00 00 00 18 DB 07CH, 038H, 01 OH, OOOH, OOOH, OOOH , BT 03
0038 00 00 00 10 38 7C 19 OB OOOH, OOOH, OOOH, 010H, 038H, 07CH, OFEH, 07CH ; TH::::04
FE 7C 20
0040 38 10 00 00 00 00 21 DB 038H,010H,000H,000H,000H,000H , BT 04
0046 00 00 18 3C 3C E7 22 DB OOOH,000H,018H,03CH,03CH,OE7H,0E7H,OE7H ; TH::::05
E7 E7 23
004E 18 18 3C 00 00 00 24 DB 018H,018H,03CIl,000H,000H,000H ; BT_05
0054 00 00 18 3C 7E FF 25 DB OOOH, OOOH, 01 8H, 03CH, 07EH, OF FH, OFFH, 07EH ; TH_06
FF 7E 26
005C 18 18 3C 00 00 00 27 DB 018H,018H,03CH,000H,OOOH,000H , BT_06
0062 00 00 00 00 00 18 28 DB OOOH, OOOH, OOOH, OOOH, OOOH, 018H, 03CH,03CH ; TH_07
3C 3C 29
006A 18 00 00 00 00 00 30 DB 018H,OOOH,000H,000H,000H,OOOH BT 07
0070 FF FF FF FF FF E7 31 DB OfFH, OFFH, OFFH, OFFH, OFFH, OE7H,OC3H,OC3H TH::::08
C3 C3 32
0078 E7 FF FF FF FF FF 33 DB OE7H,OFFH,OFFH,OFFH,OFFH,OFFH BT 08
007E 00 00 00 00 3C 66 34 DB OOOH, OOOH, OOOH, OOOH, 03GH, 066H, 042H, 042H TH::::09
42 42 35
0086 66 3C 00 00 00 00 36 DB 066H, 03CH, OOOH, OOOH, OOOH, OOOH BT 09
008C FF FF FF FF C3 99 37 DB OHH, OFFH, OFFH, OFFH, OC3H, 099H,OBOH,OBDH TH::::OA
130 BO 38
0094 99 C3 FF FF FF FF 39 DB 099H,OG3H,OFFH,OFFH,OFFH,OFFH , BT OA
009A 00 00 1E OE 1A 32 40 DB 000H,000H,01EH,00EH,01AH,032H,078H,OCCH ; TH::::OB
78 CC 41
00A2 CC CC 78 00 00 00 42 DB OCCH, OCCH, 076H, OOOH, OOOH, OOOH BT 013
00A8 00 00 3C 66 66 66 43 DB OOOH, OOOH, 03CH, 066H, 066H, 066H, 03CH, 018H TH::::OC
3C 18 44
OOBO 7E 18 18 00 00 00 45 DB 07EH,018H,018H,000H,00QH,OQOH BT OC
OOB6 00 00 3F 33 3F 30 46 DB OOOH, OOOH, 03FH, 033H, 03FH, 030H, 030H, 030H TH::::OD
30 30 47
OOBE 70 FO EO 00 00 00 48 DB 070H,OFOH,OEOH,OOOH,000H,OOOH , BT 00
OOC4 00 00 7F 63 7F 63 49 DB 000H,000H,07FH,063H,07FH,063H,063H,063H ; TH::::OE
63 63 50
OOCC 67 E7 E6 CO 00 00 51 DB 067H,OE7H,OE6H,OCOH,OOOH,000H , BT_OE
0002 00 00 18 18 DB 3C 52 DB 000H,000H,018H,018H,ODBH,03CH,0E7H,03CH ; TH_OF
E7 3C 53
OODA DB 18 18 00 00 00 54 08 OOBH, 01 8H, 018H, OOOH, OOOH, OOOH
55
OOEO 00 00 80 CO EO F8 56 DB 000H,000H,080H,OCOH,OEOH,OF8H,OFEH,OF8H ; TH_l0
FE F8 57
00E8 EO CO 80 00 00 00 58 DB OEOH, OCOH, 080H, OOOH, OOGH, OOOH BT 10
OOEE 00 00 02 06 OE 3E 59 DB OOOH, OOOH, 002H, 006H, OOEH, 03EH, OFEH,03EH TH::::11
FE 3E 60
OOF6 DE 06 02 00 00 00 61 DB OOEH, 006H, 002H, OOOH, OOGH, OOOH BT 11
OOFC 00 00 18 3C 7E 18 62 DB OOOH, OOOH, 018H,03CH, 07EH, 018H,018H,018H TH::::12
18 18 63
0104 7E 3C 18 00 00 00 64 DB 07EH, 03CH, 018H, OOOH, OOGH, OOOH BT 12
OlOA 00 00 66 66 66 66 65 DB OOOH, OOOH, 066H, 066H, 066H, 066H,066H, 066H TH=-'3
0468
046E
60
00
60
00
FO 00 00 00
7C C6 C6 C6
254
255
O'
O.
060H,060H,OFOH,OOOH,OOOH,000H
000H,OOOH,07CH,OC6H,OC6H,OC6H,OC6H,OD6H
BT 50 P
TH=51 Q
C6 06 256
0476 DE 7C OC OE 00 00 257 O. ODEH,07CH,OOCH,OOEH,OOOH,000H , BT_51 Q
047C 00
7C
00
6C
FC 66 66 66 258 O. OOOH, OOOH, OFCH, 066H, 066H, 066H, 07CH, 06CH ; TH_52 R
259
0484 66 66 E6 00 00 00 260 08 066H,066H,OE6H,OOOH,OOOH,OOOH BT_52 R
048A 00
38
00
DC
7C C6 c6 60 261 O. OOOH,OOOH,07CH,OC6H,OC6H,060H,038H,OOCH TH_53 S
262
0492 C6 C6 7C 00 00 00 263 O. OC6H,OC6H,07CH,000H,OOOH,000H , BT_53 S
0498 00
18
00
18
7E 7E 5A 18 264
265
O' OOOH,OOOH,07EH,07EH,05AH,018H,018H,018H ; TH_54 T
04AO 18 18 3C 00 00 00 266 O. 018H,018H,03CH,OOOH,000H,000H , BT_54 T
04A6 00
C6
00
C6
C6 C6 C6 C6 267 O. 000H,OOOH,oc6H,OC6H,oc6H,oc6H,OC6H,OC6H ; TH_55 U
268
04AE C6 C6 7C 00 00 00 269 O. OC6H,OC6H,07CH,OOOH,OOOH,OOOH BT_55 U
04B4 00
C6
00
C6
C6 C6 C6 C6 270 O. OOOH, OOOH, OC6H, OC6H,OC6H, OC6H, OC6H, OC6H TH_56 V
271
04BC 6c 38 10 00 00 00 272 O' 06CH,038H,010H,OOOH,OOOH,000H , BT_56 V
04C2 00
06
00
06
C6 C6 C6 C6 273
274
O' OOOH,000H,OC6H,OC6H,OC6H,OC6H,OD6H,OD6H ; TH_57 W
04CA
0400
FE
00
7C
00
6C 00 00 00
C6 C6 6C 38
275
276
O.
08
OFEH, 07CH, 06CH, OOOH, DOOH, OOOH , BT 57 W
OOOH, OOOH, OC6H, OC6H, 06CH, 038H, 038H, 038H ; TH=58 X
38 38 277
0408 6C C6 C6 00 00 00 278 08 06CH, OC6H, OC6H, OOOH, OOOH, OOOH , BT _58 X
04DE 00 00 66 66 66 66 279 08 OOOH, OOOH, 066H, 066H, 066H, 066H, 03CH, 018H ; TH_59 y
3C 18 280
04E6 18 18 3C 00 00 00 281 D. 018H,018H,03CH,000H,000H,000H , BT_59 y
04EC 00 00 FE C6 8C 18 282 O. OOOH,000H,OFEH,OC6H,08CH,018H,030H,060H ; TH_5A Z
30 60 283
04F4 C2 C6 FE 00 00 00 284 o. OC2H,OC6H,OFEH,000H,000H,000H BT 5A Z
04FA 00 00 3C 30 30 30 285 o. OOOH, OOOH, 03CH, 030H, 030H, 030H, 030H, 030H TH=5B [
30 30 286
0502 30 30 3C 00 00 00 287 O' 030H, 030H, 03CH, OOOH, OOOH, OOOH BT 58 [
0508 00
38
00
1C
80 CO EO 70 288
289
O' OOOH, OOOH, 080H, OCOH, OEOH, 070H, 038H, OtCH TH=5C
0510
0516
DE
00
06
00
02 00 00 00
3C DC OC OC
290
291
0'
o. 00EH,006H, 002H, OOOH, OOOH, OOOH
000H,OOOH,03CH,OOCH,00CH,00CH,OOCH,OOCH
BT 5C
TH=5D 1
DC DC 292
051E DC DC 3C 00 00 00 293 o. 00cH,aocH,03CH,OOOH,000H,000H BT_50 1
0524 10
00
38
00
6C C6 00 00 294
295
O' 010H, 038H, 06CH, OC6H, OOOH, OOOH, oaoH, OOOH TH_5E
053A
00
00
00
00 00 00 FF 00
298
299
300
O. OOOH, OOOH, OOOH"OOOH, °
FFH, OOOH
0540 30 30 18 00 00 00 301 o. 030H, 030H, 018H, OOOH, OOOH, OOOH, OOOH, OOOH ; TH_60
00 00 302
0548 00 00 00 00 00 00 303 08 OOOH, OOOH, OOOH, OOOH, OOOH, OOOH , BT 60
054E 00 00 00 00 00 78 304 OS OOOH,OOOH, OOOH, OOOH, OOOH, 078H,00CH,07CH ; nC61 LOWER_CASE A
OC 7C 305
0556 CC CC 76 00 00 00 306 O. OCCH,OCCH,076H,000H,OOOH,000H , BT_61 LOWER_CASE A
055C 00 00 EO 60 60 78 307 08 000H,000H,OEOH,060H,060H,078H,06CH,066H ; TH_62 L.C, B
6C 66 308
0564 66 66 7C 00 00 00 309 O' 066H,066H,07CH,000H,OOOH,OOOH , BT_62 L,C. B
056A 00
C6
00 00 00
CO
00 7C 310
311
O' OOOH, OOOH, OOOH, OOOH, OOOH, 07CH, OC6H, OCOH ; TH_63 L, C, C
0572
0578
CO
00
C6 7C 00
00 1C DC
00 00
DC 3C
312
313
O'
o.
OCOH,OC6H, 07CH, OOOH, OOOH, OOOH ,
000H,OOOH,01CH,OOCH,OQCH,03CH,06CH,OCCH ;
BT_63 L. C,
TH_64 L.C.
6C CC 314
0580 CC CC 76 00 00 00 315 o. OCCH,OCCH,076H,000H,000H,000H , BT_64 L,C.
0586 00 00 00 00 00 7C 316 o. OOOH, OOOH, OOOH, OaOH, OOOH, 01CH, OC6H, OFEH ; TH_65 L. c.
C6 FE 317
ggg~:ggg~:g~g~:ggg~:g~g~:ggg~.060H,066H ~~=g~
075C CC CC 76 00 00 00 410 DB
0762 00 00 00 00 3C 66 420 DB ;
60 66 '21
ggg~:g~g~:g~g~:g~g~:ggg=:g~g~.OC6H,OFEH ~ ~~=g~
076A 3C DC 06 3C 00 00 '22 DB
0770 00 10 38 6C 00 7C '23 DB
C6 FE '24
co
ggg~:ggg~:g~g~:ggg~:ggg~:g~g~,OC6H,OFEH ~ ~~=:;
0778 C6 7C 00 00 00 425 DB
077E 00 00 CC CC 00 7C 42. DB
C6 FE 427
0786 co C6 7C 00 00 00 428 DB OCOH,OC6H.07CH,000H,000H,OOOH ; BT_89
078C 00 60 30 18 00 7C 42' DB 000H,060H,030H,018H,OOOH,07CH,OC6H,OFEH ; IH_SA
co FE 430
ggg~:ggg~:g~~~:ggg~:ggg=:g~g=,018H,018H ~ ~~=:~
0794 CO C6 7C 00 00 00 431 DB
079A 00 00 66 66 00 38 432 DB
07A2
18
18
18
18 3C 00 00 00
'33 DB
07Ae 00 18 3C 66 00 38
'34
435 DB g~g=:g~:=:g~g=:ggg=:ggg=:g~g=,018H,018H ; ~~:g~
18 18 43.
g~g=:gJg=:g~g=:g~g=:ggg=:ggg=,018H,018H ~ ~~:gg
07BO 18 18 3C 00 00 00 '37 DB
07B6 00 60 30 18 00 38 '38 DB
18 18 430
g~g=:g~=:g~=:g~g=:g~g=:ggg=,0C6H,OC6H ~~:g~
07BE 18 18 3C 00 00 00 440 DB
07C4 00 C6 C6 10 38 6C 441 DB ;
co C6 442
07CC FE C6 C6 00 00 00 443 DB OFEH, OO6H, OO6H, OOOH, OOOH, OOOH
OB3E 00 00 00 00 00 00 6'6
gg~~:gg~~:g~~~:gg~~:gg~~:g~~~,OOOH,OF7H ~ ~~:g~
DB
OB44 36 36 36 36 36 F1 6'7 DB
00 F1 6'8
gi:~:gi:~: gi~~:gi~~:gi:~;g~~~,OOOH,OFFH ~~=g~
OB4C 36 36 36 36 36 36
OB52 18 18 18 18 18 FF
6"
6'0
DB
DB i
00 FF 6"
OB5A
OB60
00
36 36
00 00 00 00 00
36 36 36 36
6.,
6'2
6 ••
DB
DB
OOOH, OOOH, OOOH, OOOH. OOOH, OOOH
036H, 036H. 036H,036H. 036H,036H.036H, OFFH ; TH_OO
36 FF 6'5
OB68 00 00 00 00 00 00
ggg~:ggg~:ggg~:ggg~:ggg~:g~~~,OOOH, OFFH ~~=g~
646 DB
OB6E 00 00 00 00 00 FF 6'7 DB ;
00 FF 6'8
OB76 18 18 18 18 18 16
gJg~: gJg~: gJg~:gJg~: gJg~:gJg~,OOOH, OFFH ~~:g~
6 •• DB
OB7C 00 00 00 00 00 00 650 DB ;
00 FF 651
gig~: gig~:g~g~:g~g~: g~g~:g~~~,036H. 03FH ~~:g~
OB84 36 36 36 36 36 36 652 DB
OB8A 36 36 36 36 36 36 653 DB ;
36 3F
OB92
OB98
00 00
18 18
00 00 00 00
18 18 18 IF
65.
655
656
DB
DB
OOOH,OOOH~OOOH,OOOH.OOOH.OOOH BT_03
018H,018H,018H,018H.018H,01FH,018H.OlFH ; TH_04
;
18 1F 657
OBAO
OBA6
00 00
00 00
18 1F
00 00 00 00
00 00 00 1F
658
65.
660
DB
DB ggg~:ggg~:ggg~:ggg~:ggg~:g~~~,018H,01FH ; ~~:g;
gJg~:gJg~:gJg~:gJg~: gJg~:gJg~,OOOH, 03FH ~~:g~
OBAE 18 18 18 18 18 18 661 DB
08B4 00 00 00 00 00 00 662 DB ;
00 3F 66'
OBBC 36 36 36 36 36 36 664 DB 036H,036H,036H,036H,036H,036H ; BT_06
OBC2 36 36 36 36 36 36 665 DB 036H,036H.036H,036H.036H,036H,036H,OFfH ; TH_07
36 FF 666
oeCA 36 36 36 36 36 36 667 DB 036H, 036H, 036H,036H, 036H,036H ; 8T_01
0800 18 18 18 18 18 FF 668 DB 018H,018H,018H,018H,018H,OFFH,018H,OFFH ; TH_DB
18 FF 66.
OBD8 18 18 18 18 18 18 670 DB 018H,018H,018H,018H,018H,018H ; BT_DB
OBOE 16 18 18 18 18 18 671 DB 018H,018H,018H,018H,018H,018H,018H,OF8H ; TH_09
18 f8 672
OBE6
OBEC
00 00
00 00
00 00 00 00
00 00 00 00
673
674
DB
DB
OOOH,OOOH~OOOH,OOOH~OOOH,OOOH
OOOH,OOOH~OOOH,OOOH.OOOH,OOOH,OOOH,OlFH·;
; 8T_09
TH_DA
00 1F 675
OBF4
OBFA
18 18
FF fF
FFFF
18 18 18 18
FF FF FF FF
676
677
678
08
DB
018H,018H,018H,018H.018H,018H
OFFH,OFfH,OFFH,OFFH~OFFH,OFFH,OFFH,OFFH ;; TH_DB
BT_OA
1 PAGE,120
2 SUBTTL MONOCHROME CHARACTER GENERATOR - ALPHA SUPPLEMENT
0000 3 CODE SEGMENT PUBL I C
4 PUBL I C CGMN_FOG
0000 5 CGMNJOG LABEL BYTE
6
7 STRUCTURE OF TH 1S FILE
6 DB XXH WHERE xx IS THE HEX CODE FOR THE FOLLOWING CHAR
9 DB [BYTES 0 - 13 OF THAT CHARACTER J
10
11 DB OOH INDICATES NO MORE REPLACEMENTS TO BE DONE
12
13
0000 10 14 DB 010H
0001 00 00 00 00 24 66 15 DB OOOH, OOOH, OOOH, 000H,024H, 066H, OFFH, 066H TH_' 0
FF 66 16
0009 24 00 00 00 00 00 17 DB 024H, OOOH, OOOH, OOOH,OOOH, OOOH , BT_l0
OOOF 22 16 DB 022H ;
0010 00 63 63 63 22 00 19 DB 000H,063H,063H,063H,022H,000H,000H,000H; TH_22 "
00 00 20
0018 00 00 00 00 00 00 21 DB OOOH,OOOH,OOOH,OOOH,OOOH,OOOH BT_22 "
~OlE 2B 22 DB 02BH ,
001F 000000 18 18 18 23 DB 000H,OOOH,OOOH,018H,018H,018H,OFFH,018H ; TH_2B +
FF 18 24
0027 18 18 00 00 00 00 25 DB 018H, 018H, OOOH, OOOH,OOOH, OOOH BT~2B +
0020 20 26 DB 020H
002E 00 00 00 00 00 00 27 DB OOOH,OOOH,OOOH,OOOH,OOOH,OODH,OFFH,OOOH TH_20-
FF 00 26
1 PAGE,120
2 SUBTTl D,OUBlE DOT CHARACTER GENERATOR
0000 3 CODE SEGMENT PUBLIC
4 PUBLI C CGoOOT,INT_1F_l
0000 5 CGODOT LABEL BYTE
6 DOUBLE DOT
0000 00 00 00 00 00 00 7 DB OOOH, OOOH, OOOH,OOOH, OOOH, OOOH, OOOH, OOOH ; 0_00
00 00 8
0008 7E 81 A5 81 BD 99 9 DB 07EH, 081H, DASH, 081 H, OBDH, 099H, 081 H, 07EH ; 0_01
81 7E 10
0010 7E FF DB FF C3 £7 11 08 07EH, OFFH, OOBH, OFFH, OC3H, OE7H, OFFH, 07EH ; 0_02
FF 7E 12
0018 6C FE FE FE 7C 38 13 08 06CH, OFEH, OFEH, OFEH, 07CH, 038H, 010H, OOOH ; 0_o3
10 00 14
0020 10 38 7C FE 7C 38 15 010H, 038H, 07CH, OFEH, 07CH, 036H, 010H, OOOH ; 0_o4
10 00 16
0028 38 7C 38 FE FE 7C 17 08 038H, 07CH, 038H, OFEH, OFEH, 07CH, 038H, 07CH ; o_05
38 7C 18
0030 10 10 38 7C FE 7C 19 08 010H, 01 OH, 038H, 07CH, OFEH, 07CH, 038H, 07CH ; 0_06
38 7C 20
0038 00 00 18 3C 3C 18 21 08 OOOH, OOOH, 018H, 03CH, 03CH, 018H, OOOH, OOOH ; 0_07
00 00 22
0040 FF FF E7 C3 C3 E7 23 08 OFFH, OFFH, 0£7H, OC3H, OC3H, OE7H, OFFH, OFFH ; 0_08
FF FF 24
0048 00 3C 66 42 42 66 25 DB OOOH, 03CH, 066H, 042H,042H,066H, 03CH, OOOH ; o_09
3c 00 26
0050 fF C3 99 Bo BD 99 27 DB OFFH, OC3H, 099H, OBOH,OBOH, 099H, OC3H, OFFH ; O_OA
C3 FF 2B
0058 OF 07 Of 70 CC CC 29 08 OOFH, 007H, OOFH, 07oH, OCCH, DCCH, DCCH, 078H ; O_DB
CC 78 30
0060 3C 66 66 66 3C 18 31 08 03CH, 066H, 066H, 066H, 03CH, 018H, 07EH, 018H ; O_OC
7E 18 32
0068 3F 33 3F 30 30 70 33 DB 03 FH, 033H, 03FH,030H, 030H, 070H, OFOH, OEOH ; 0_00
FO EO 34
0070 7F 63 7F 63 63 67 35 08 07FH, 063H, 07FH, 063H, 063H, 067H, OE6H, OCOH ; O_OE
E6 CO 36
0078 99 5A 3C E7 E7 3C 37 08 099H, OsAH, 03CH, OE7H, OE7H, 03CH, OsAH, 099H ; O_OF
SA 99 38
39
0080 80 EO F8 FE F8 EO 40 DB 080H, OEOH, OF8H,OFEH, OF8H, OEOH, 080H, OOOH ; 0_10
80 00 41
0088 02 DE 3E FE 3E OE 42 DB 002H,OOEH, 03EH,OFEH, 03EH, OO£H, 002H, OOOH ; 0_11
02 00 43
0090 18 3C 7E 18 18 7£ 44 DB 018H, 03CH, 07£H,018H, 018H, 07EH, 03CH, 018H ; 0_12
3C 18 45
0098 66 66 66 66 66 00 46 08 066H, 066H, 066H. 066H, 066H. OOOH, 066H, OOOH ; 0_13
66 00 47
OOAO 7F DB DB 7B 1B lB 48 08 07FH, OOBH, ODBH, 07BH, 01 BH, 01 BH, 01 BH, OOOH ; o_14
lB 00 49
00A8 3E 63 38 6C 6C 38 50 08 03£H,063H, 038H,06CH,06CH,038H, OCCH. 078H ; 0_15
CC 78 51
OOBO 00 00 00 00 7E 7E 52 DB 000H,OOOH,OOOH,OOOH,07EH,07EH,07EH,000H ; 0_16
7E 00 53
00B8 18 3C 7E 18 7E 3C 54 DB 018H,03CH,07EH,018H,07£H,03CH,018H,OFFH ; 0_17
18 FF 55
OOCO 18 3C 7E 18 18 18 56 08 018H,03CH,07EH,018H,018H,018H,018H,OOOH ; 0_18
0150
60
00
00
66 3C FF 3C 66
"
'2
.3
DB
DB
OOOH, OOOH, OOOH, OFCH, OOOH,OOOH,OOOH, OOOH ;
OOOH, OOOH, OOOH, OOOH, OOOH, 030H, 030H, OOOH ;
- 0_20
0_2E
30 00 102
0178 06 DC 1830 60 CO 103 DB 006H, OOCH, 018H, 030H, 060H, OCOH, 080H, OOOH ; I 0_2F
80 00 104
105
0180 7C C6 CE DE F6 E6 106 DB 07CH,OC6H, OCEH, OOEH, OF6H, OE6H, 07CH, OOOH ; o 0_30
7C 00 107
0188 30 70 30 30 30 30 108 DB 030H, 070H, 030H, 030H, 030H, 030H, 0 FCH, OOOH ; 1 0_31
FC 00 10'
0190 78 CC DC 38 60 CC 110 DB 078H, OCCH, OOCH, 038H, 060H, OCCH, OFCH, OOOH : 2 0_32
FC 00 111
0198 78 CC DC 38 DC CC 112 DB 078H, OCCH, OOCH, 038H, OOCH, OCCH, 078H, OOOH : 3 0_33
78 00 113
01AO lC 3C 6C CC FE DC 114 DB 01CH, 03CH, 06CH, OCCH, OFEH, OOCH, 01 EH, OOOH ; 4 0_34
lE 00 115
01A8 FC CO F8 DC DC CC 116 DB OFCH, OCOH, OF8H, OOCH, OOCH, OCCH, 078H, OOOH ; 5 0_35
78 00 117
01BO 38 60 CO F8 CC CC 118 DB 038H, 060H, OCOH, OF8H, OCCH, OCCH, 078H, OOOH ; 6 0_36
01B8
78
FC
30
00
CC
00
DC 18 30 30 "'
120
121
DB OFCH,OCCH, OOCH, 018H, 030H,030H,030H, OOOH ; 7 0_37
01CO 78 CC CC 78 CC CC 122 DB 078H, OCCH, OCCH, 078H, OCCH, OCCH,078H, OOOH ; 8 0_38
78 00 123
01C8 78 CC CC 7C DC 18 124 DB 078H, OCCH, OCCH, 07CH, OOCH, 018H, 070H, OOOH ; 9 0_39
0100
70
00
00
30 30 00 00 30
125
126 DB OOOH, 030H, 030H, OOOH, OOOH, 030H, 030H, OOOH ; , O_3A
30 00 127
0108 00 30 30 00 00 30 128 DB 000H,030H, 030H, OOOH, OOOH, 030H,030H, 060H ; ; 0_38
30 60 12,
OlEO 18 30 60 CO 60 30 130 DB 018H,030H, 060H, OCOH, 060H, 030H, 018H, OOOH ; < 0_3C
18 00 131
01E8 00 00 FC 00 00 FC 132 DB OOOH, OOOH, 0 FCH, OOOH, OOOH, OFCH, OOOH, OOOH ; '" 0_30
00 00 133
OlFO 60 30 180C1830 134 DB 060H,030H, 018H, OOCH, 018H, 030H, 060H, OOOH ; > 0_3E
60 00 135
01 F8 78 CC DC 18 30 00 136 DB 078H,OCCH, OOCH, 018H, 030H, 000H,030H, OOOH ; ? 0_3F
30 00 137
138
0200 7C C6 DE DE DE CO 13' DB 07CH, OC6H, ODEH, OOEH, ODEH, OCOH, 078H, OOOH ; @ 0_40
78 00 140
0208 30 78 CC CC FC CC 141 030H, 078H, OCCH, OCCH, OFCH, OCCH, OCCH, OOOH ; A 0_41
0210
CC
FC
FC
00
66
00
66 7C 66 66
142
143
144
DB ° °
FCH, 066H, 066H, 07CH, 066H, 066H, FCH, OOOH ; 8 0_42
0218 3C 66 CO CO CO 66 145 DB 03CH, 066H, OCOH,OCOH, OCOH, 066H, 03CH, OOOH : C 0_43
3C 00 146
0220 F8 6C 66 66 66 6C 147 DB OF8H, 06CH,066H,066H, 066H, 06CH, OF8H, OOOH ; o 0_44
F8 00 148
0228 FE 62 68 78 68 62 14. DB OFEH,062H,068H, 078H, 068H, 062H, OFEH, OOOH : E 0_45
FE DO 150
0230 FE 62 68 78 68 60 151 DB OFEH, 062H,068H, 078H, 068H, 060H, OFOH, OOOH : F 0_46
FO 00 152
0238 3C 66 CO CO CE 66 153 DB 03CH, 066H,OCOH, OCOH, OCEH, 066H, 03EH, OOOH : G 0_47
3E 00 154
0240 CC CC CC FC CC CC 155 OCCH, OCCH,OCCH, OFCH, OCCH, aCCH, OCCH, OOOH ; H 0_48
CC 00 156
0248 78 30 30 30 30 30 157 DB 078H, 030H,030H,030H, 030H, 030H, 078H, OOOH ; I 0_49
78 00 158
0250 lE DC OC DC CC CC 15. DB 01 EH, OOCH, OOCH, OOCH, OCCH, OCCH, 078H, OOOH ; J 0_4A
78 00 160
0258 E6 66 6C 78 6c 66 161 DB OE6H, 066H, 06CH, 078H, 06CH,066H, OE6H, OOOH ; K 0_4B
E6 00 162
0260 FO 60 60 60 62 66 163 DB OFOH, 060H, 060H, 060H, 062H, 066H, OFEH, OOOH ; L 0_4C
FE 00 164
0268 C6 EE FE FE D6 c6 165 DB OC6H, OEEH, OFEH, OFEH, 006H, OC6H, OC6H, OOOH ; H 0_40
C6 00 166
0270 C6 E6 F6 DE CE C6 167 08 OC6H, OE6H, 0 F6H, OOEH, OCEH, OC6H, OC6H, OOOH ; N 0_4E
C6 00 168
0278 38 6c c6 C6 C6 6C 169 08 038H, 06CH, OC6H, OC6H, OC6H, 06CH, 038H, OOOH ; a 0_4F
38 00 170
171
0280 FC 66 66 7C 60 60 172 DB OFCH, 066H, 066H, 07CH, 060H, 060H, OFOH, OOOH ; PO_50
FO 00 173
0288 78 CC CC CC DC 78 174 DB 078H,OCCH,OCCH,OCCH, OOCH, 078H, 01 CH, OOOH ; Q 0_51
lC 00 175
0290 FC 66 66 7e 6C 66 176 DB OFCH, 066H,066H,07CH, 06CH, 066H,OE6H, OOOH ; R 0_52
E6 00 177
0298 78 CC EO 70 1C CC 178 DB 078H,OCCH,OEOH,070H, 01CH, OCCH, 078H, OOOH ; SO_53
78 00 17'
02AO FC 84 30 30 30 30 180 DB OFCH, OB4H,030H,030H, 030H, 030H,078H, OOOH ; TO_54
78 00 181
02A8 CC CC CC CC CC CC 182 DB OCCH,OCCH,OCCH,OCCH. OCCH, OCCH,OFCH, OOOH ; U 0_55
PAGE,120
SUBTTL END ADDRESS
0000 CODE SEGMENT PUBL I C
PUBU C END_ADDRESS
0000 6~gloOR~~~S LABEL BYTE
0000
END
A compatibility issues 74
configuration switches 80
CRT Controller
Attribute Address Register 56 description 3
Attribute Controller registers 24
description 3 CRT Controller Address
registers 56 Register 24
CRT Controller Overflow
Register 30
Cursor End Register 33
Cursor Location High
B Register 35
Cursor Location Low
Register 35
BIOS Cursor Start Register 32
description 4
vectors with special
meanings 103
BIOS listing 103
Bit Mask Register 54 D
Data Rotate Register 49
character generator
ROM 1
Character Map Select E
Register 21
Clocking Mode Register 19
Color Compare Register 48 Enable Set/Reset Register 47
Color Don't Care Register 53 End Horizontal Blanking
color mapping 10 Register 27
Color Plane Enable End Horizontal Retrace
Register 60 Register 29
Index-l
End Vertical Blanking I
Register 40
feature connector 76
Feature Control Register 14
L
Index-2
o Graphics Controller 45
Sequencer 18
Reset Register 18
Offset Register 38
Overscan Color Register 59
s
p
Sequencer
description 3
Palette Registers 57 registers 18
Preset Row Scan Register 31 Sequencer Address Register 18
programming Set/Reset Register 47
considerations 62 specifications 79
compatibility issues 74 configuration switch
creating a split screen 73 settings 81
creating a 512 character configuration switches 80
set 70 direct drive connector 83
creating an 80 by 43 light pen interface 84
alphanumeric mode 71 system board switches 79
programming registers 62 Start Address High Register 34
RAM loadable character Start Address Low Register 34
generator 69 Start Horizontal Blanking
vertical interrupt feature 72 Register 26
Start Horizontal Retrace Pulse
Register 28
Start Vertical Blanking
Register 39
R support logic 4
Index-3
v Vertical Retrace End
Register 36
Vertical Retrace Start
Vertical Display Enable End Register 36
Register 38 Vertical Total Register 30
vertical interrupt feature 72
Index-4
Personal Computer
Hardware Reference
Library
mM Printer Adapter
6361507
ii
Contents
Description .................................... 1
Programming Considerations ...................... 3
Specifications .................................. 7
Logic Diagrams ................................. 9
iii
iv
Description
The input/ output signals are made available at the back of the
adapter through a right-angle, printed-circuit-board-mounted,
25-pin, D-shell connector. This connector protrudes through the
rear panel of the system unit or expansion unit, where a cable may
be attached.
The output ports may also be read at the card's interface for
diagnostic loop functions. This allows faults to be isolated to the
adapter or the attaching device.
Printer Adapter 1
The following is a block diagram of the Printer Adapter.
8 25-Pin D-Shell
Connector
~U'BUff"8 .Data Latch 8
po
~ Trans- .....
...
8
...
ceiver
r DIR
~ O.C.
Read Drivers SLCTIN
~
A Data
STROBE
Write Data po
Command AUTO
Decoder Write Control
- -
FDXT
Read Status
-INIT
Read
Control
-
A
Bus Control
Buffers Latch
~ Enable
~ ..... Clock r-
5 ERROR
po
4 Enable SLCT
R eset
r r.. ~ Clear PE
ACK
BUSY
2 Printer Adapter
Programming Considerations
Printer Adapter
The instruction captures data from the data bus and is present on
the respective pins. Each of these pins is capable of sourcing 2.6
rnA and sinking 24 rnA.
It is essential that the external device does not try to pull these
lines to ground.
Printer Adapter
Printer Adapter 3
respective pins as shown in the previous figure. If bit 4 is written
as aI, the card will interrupt the system unit's microprocessor on
the condition that pin 10 changes from high to low.
Printer Adapter
Input from address hex 378
Printer Adapter
Input from address hex 379
BitO
Printer Adapter
Input from address hex 37 A
4 Printer Adapter
This instruction causes the data present on pins 1, 14, 16, 17, and
the IRQ bit to be read by the system unit's microprocessor. In
the absence of external drive applied to these pins, data read by
the system unit's microprocessor will match data last written to
hex 3BE in the same bit positions. Notice that data bits 0-2 are
not included. If external drivers are dotted to these pins, that
data will be ORed with data applied to the pins by the hex 3BE
latch.
These pins assume the states shown after a reset from the system
unit's microprocessor.
Printer Adapter 5
6 Printer Adapter
Specifica tions
25-Pin D-Shell
Connector
o
• • 14
• •
• •
• •
• •
• •
• •
•• •
•
•• ••
• • 25
13 •
o
At Standard TTL Levels
Signal Adapter
Name Pin Number
- Strobe 1
+ Data Bit 0 2
+ Data Bit 1 3
+ Data Bit 2 4
+ Data Bit 3 5
+ Data Bit 4 6
+ Data Bit 5 7
+ Data Bit 6 8
Printer + Data Bit 7 9 Printer
- Acknowledge 10 Adapter
+ Busy 11
+ P.End (out of paper) 12
+ Select 13
- Auto Feed 14
- Error 15
- Initialize Printer 16
- Select Input 17
Ground 18-25
Connector Specifications
Printer Adapter 7
8 Printer Adapter
Logic Diagrams
The following page contains the logic diagram for the IBM Printer
Adapter.
Printer Adapter 9
~""
,~ -"--NO ..
---..- oM
~ , !:, '"
."
~LFrE5~J'"
... ~
- -~'
.: "' COXl.""""
.:~~~
.. .-. " ..~
fTTT~ ~
tf
m .. .~
,
ri' ~ .~
E
~
r--- --'" --~-L'.-n-"";·'''' '~
t.
~[Jt
~
, roo '"
.on.
....
~!.D ,r<::."
-~.
....... I.tk,
~:§~
-"
-.~ v ...,..
,,~,~
~,
mM 5-114" Diskette
Drive Adapter
6361505
ii
Contents
Description .................................... 1
Programming Considerations ...................... 3
Digital-Output Register ...................... 3
Floppy Disk Controller ....................... 4
Command Summary ......................... 8
Programming Summary ...................... 17
Interface ..................................... 19
System 110 Channel Interface ................ 19
Drive A and B Interface ..................... 20
Specifications ................................. 23
Logic Diagrams ................................ 25
iii
iv
Description
The IBM 5-1/4" Diskette Drive Adapter fits into one of the
expansion slots in the system unit. It is connected to one or two
diskette drives through an internal, daisy-chained flat cable. The
adapter has a connector at the other end that extends through the
rear panel of the system unit. This connector has signals for two
additional external diskette drives; thus, the 5-1/4 inch diskette
drive adapter can attach four 5-1/4 inch drives - two internal
and two external.
Diskette Adapter 1
Clock
and
Timing
Circuit
1
• Write
. • Write
Precompensate
Circuit ~
Write Data
t'-- .../
I Data Read Data
Data
VCO SYNC· Separator
<}- I--
I-
STD. DATA
~ Buffer
I'r- r-v'
NEC
Floppy
Disk
""
Data Window
V
Step
Direction
Write Enable
f " , ,
~-
Controller
V Head Select
Index
I"" "'-.J Write Protect
./1 '-J Track 0
iRes~t f-- B
Drive A Motor On
Digital
~
f--C
Control Decoder f--D Drive A Select
'1
Port
I-- B
INTR. f-- C
I I-- D
Digital-Output Register
The Digital-Output register (DOR) is an output-only register used
to control drive motors, drive selection, and feature enable. All
bits are cleared by the I/O interface 'reset' line. The bits have the
following functions:
Bit 1 0 Drive
00 0 (A)
o1 1 (B)
10 2 (e)
11 3 (D)
Diskette Adapter 3
Floppy Disk Controller
The floppy disk controller (FDC) contains two registers that may
be accessed by the system unit's microprocessor: a status register
and a data register. The 8-bit main status register contains the
status information of the FDC and may be accessed at any time.
The 8-bit data register (actually consisting of several registers in a
stack with only one register presented to the data bus at a time)
stores data, commands, parameters, and provides floppy disk
drive (FDD) status information. Data bytes are read from or
written to the data register in order to program or obtain results
after a particular command. The main status register can only be
read and is used to facilitate the transfer of data between the
system unit's microprocessor and FDC.
The bits in the main status register (hex 34F) are defined as
follows:
Bit
Number Name Symbol Description
DBO FDD A Busy DAB FDD number 0 is in the Seek mode.
DB1 FDD B Busy DBB FDD number 1 is in the Seek mode.
DB2 FDD C Busy DCB FDD number 2 is in the Seek mode.
DB3 FDD 0 Busy DDB FDD number 3 is in the Seek mode.
DB4 FOC Busy CB A read or write command is in process.
DB5 Non-DMA NDM The FDC is in the non-DMA mode.
Mode
DB6 Data Inputl 010 Indicates direction of data transfer
Output between FDC and processor. If DIO =" 1;'
then transfer is from FDC data register to
the processor. If 010 = "0;' then transfer
is from the processor to FDC data register.
DB7 Request for ROM Indicates data register is ready to send or
Master receive data to or from the processor. Both
bits 010 and ROM should be used to
perform the handshaking functions of
"ready" and "direction" to the processor.
4 Diskette Adapter
unit's microprocessor. Because of this multi-byte interchange of
information between the FDC and the system unit's
microprocessor, it is convenient to consider each command as
consisting of three phases:
Command Phase
The FDC receives all information required to perform a particular
operation from the system unit's microprocessor.
Execution Phase
The FDC performs the operation it was instructed to do.
Result Phase
After completion of the operation, status and other housekeeping
information are made available to the system unit's
microprocessor.
Diskette Adapter 5
Symbol Name Description
6 Diskette Adapter
Symbol Name Description
Diskette Adapter 7
Command Summary
In the following table, 0 indicates "logical 0" for that bit, 1 means
"logical 1," and X means "don't care."
Data Bus
Phase R/W D7 D6 D5 D4 D3 D2 D1 DO Remarks
Read Data
Command W MT MF SK 0 0 1 1 0 Command Codes
W X X X X X HD US1 usa
w C Sector ID information
W H prior to command
W R execution.
W N
W EOT
W GPL
W DTL
Execution Data transfer
between the FDD
and main system.
Result R STO Status information
R ST 1 after command
R ST 2 execution.
R C Sector ID information
R H after command
R R execution.
R N
Read Deleted Data
Command W MT MF SK 0 1 1 0 0 Command Codes
W X X X X X HDUS1USO
W C Sector ID information
W H prior to command
W R execution.
W N
W EOT
W GPL
W DTL
Execution Data transfer
between the FDD
and main system.
Result R STO Status information
R ST 1 after command
R ST 2 execution.
R C Sector ID information
R H after command
R R execution.
R N
8 Diskette Adapter
Data Bus
Phase R/W 07 06 05 04 03 02 01 DO Remarks
Write Data
Command W MT MF 0 a a 1 a 1 Command Codes
W X X X X X HO US1 usa
W C Sector 10 information
W H prior to command
W R execution.
W N
W EOT
W GPL
W OTL
Execution Data transfer
between the main
system and FOO.
Result R ST a Status information
R ST 1 after command
R ST 2 execution.
R C Sector 10 information
R H after command
R R execution.
R N
Write Deleted Data
Command W MT MF a a 1 1a a Command Codes
W X X X X X HO US1 usa
w C Sector 10 information
W H prior to command
W R execution.
W N
W EOT
W GPL
W OTL
Execution Data transfer
between the FOD and
main system.
Result R STa Status 10 information
R ST 1 after command
R ST 2 execution.
R C Sector 10 information
R H after command
R R execution.
R N
Diskette Adapter 9
Oata Bus
Phase R/W 07 06 05 04 03 02 01 00 Remarks
Read a Track
Command W 0 MF SK 0 0 0 1 0 Command Codes
W X X X X X HO US1 usa
w C Sector ID information
W H prior to command
W R execution.
W N
W EOT
W GPL
W DTL
Execution Data transfer
between the FDD
and main system.
FDC reads all of
cylinder's contents
from index hole to
EOT.
Result R STO Status information
R ST 1 after command
R ST 2 execution.
R C Sector ID information
R H after command
R R execution.
R N
Read 10
Command W 0 MF 0 0 1 0 1 0 Command Codes
W X X X X X HD US1 usa
Execution The first correct ID
information on the
cylinder is stored in
data register.
Result R STO Status information
R ST 1 after command
R ST 2 execution.
R C Sector ID information
R H during execution
R R phase.
R N
10 Diskette Adapter
Oata Bus
Phase R/W 07 06 05 04 03 02 01 00 Remarks
Format a Track
Command W 0 MF 0 0 1 1 0 0 Command Codes
W X X X X X HD US1 usa
W N Bytes/Sector
W SC Sector/Track
W GPL Gap 3
W D filler byte.
Execution FDC formats an
entire cylinder.
Result R STO Status information
R ST 1 after command
R ST 2 execution.
R C In this case, the ID
R H information has no
R R meaning.
R N
Scan Equal
Command W MT MF SK 1 0 0 0 1 Command Codes
W X X X X X HD US1 usa
w C Sector ID information
W H prior to command
W R execution.
W N
W EOT
W GPL
W STP
Execution Data compared
between the FDD
and the main system.
Result R STO Status information
R ST 1 after Command
R ST 2 execution.
R C Sector ID information
R H after command
R R execution.
R N
Diskette Adapter 11
Oata Bus
Phase R/W 07 06 05 04 03 02 01 00 Remarks
Scan Low or Equal
Command W MT MF SK 1 1 0 0 1 Command Codes
W X X X X X HD US1 usa
w C Sector 10 information
W H prior to command
W R execution.
W N
W EOT
W GPL
W STP
Execution Data compared
between the FDD
and main system.
Result R STO Status information
R ST 1 after command
R ST 2 execution.
R C Sector 10 information
R H after command
R R execution.
R N
Scan High or Equal
Command W MT MF SK 1 1 1 0 1 Command Codes
W X X X X X HD US1 usa
w C Sector 10 information
W H prior to command
W R execution.
W N
W EOT
W GPL
W STP
Execution Data compared
between the FDD
and main system.
Result R STO Status information
R ST 1 after command
R ST 2 execution.
R C Sector 10 information
R H after command
R R execution.
R N
12 Diskette Adapter
Data Bus
Phase R/W 07 06 05 04 03 02 01 DO Remarks
Recalibrate
Command W 0 0 0 0 0 1 1 1 Command Codes
W X X X X X 0 US1USO
Execution Head retracted to
No Result track 0
Phase
Sense Interrupt Status
Command W 0 0 0 0 1 0 0 0 Command Codes
Result R STO Status information at
R PCN the end of seek
operation about the
FOC
Specify
Command W 0 0 0 0 0 0 1 1 Command Codes
W t--SRT HUT-
W HLT ND
No Result
Phase
Sense Drive Status
Command W 0 0 0 0 0 1 0 0 Command Codes
W X X X X X HO US1 usa
Result R ST 3 Status information
about FDD.
Seek
Command W 0 0 0 0 1 1 1 1 Command Codes
W X X X X X HO US1 usa
w NCN
Execution Head is positioned
over proper cylinder
on diskette.
No Result
Phase
Invalid
Command W Invalid Codes Invalid command
codes (NoOp - FOC
goes into standby
state).
Result R STO ST 0: 80.
Diskette Adapter 13
Bit
No. Name Symbol Description
D7 D7 = 0 and D6 = 0
Interrupt IC Normal termination of command (NT).
Code Command was completed and properly
executed.
D6 D7 = 0 and D6 = 1
Abnormal termination of command (AT).
Execution of command was started, but
was not successfully completed.
D7 = 1 and D6 = 0
Invalid command issue (IC). Command
that was issued was never started.
D7 = 1 and D6 = 1
Abnormal termination because, during
command execution, the ready signal
from FDD changed state.
D5 Seek End SE When the FDC completes the seek
command, this flag is set to 1 (high).
D4 Equipment EC If a fault signal is received from the
Check FDD, or if the track 0 signal fails to occur
after 77 step pulses (recalibrate
command), then this flag is set.
D3 Not Ready NR When the FDD is in the not-ready state
and a read or write command is issued,
this flag is set. If a read or write command
is issued to side 1 of a single-sided drive,
then this flag is set.
D2 Head Address HD This flag is used to indicate the state of
the head at interrupt.
D1 Unit Select 1 US 1 These flags are used to indicate a drive
DO Unit Select 0 usa unit number at interrupt.
14 Diskette Adapter
Bit
No. Name Symbol Description
D7 End of EN When the FDC tries to access a sector
Cylinder beyond the final sector of a cylinder, this
flag is set.
D6 - - Not used. This bit is always 0 (low).
D5 Data Error DE When the FDC detects a CRC error in
either the ID field or the data field, this
flag is set.
D4 Over Run OR If the FDC is not serviced by the main
system during data transfers within a
certain time interval, this flag is set.
D3 - - Not used. This bit is always 0 (low).
D2 No Data ND During execution of a read data, write
deleted data, or scan command, if the
FDC cannot find the sector specified in
the ID register, this flag is set. During
execution of the read ID command, if the
FDC cannot read the ID field without an
error, then this flag is set. During the
execution of the read a cylinder
command, if the starting sector cannot be
found, then this flag is set.
D1 Not Writable NW During execution of a write data, write
deleted data, or format-a-cylinder
command, if the FDC detects a
write-protect signal from the FDD, then
this flag is set.
DO Missing MA If the FDC cannot detect the ID address
Address mark, this flag is set. Also, at the same
Mark time, the MD (missing address mark in
the data field) of status register 2 is set.
Diskette Adapter 15
Bit
No. Name Symbol Description
D7 - - Not used. This bit is always 0 (low).
D6 Control Mark CM During execution of the read data or scan
command, if the FDC encounters a sector
that contains a deleted data address
mark, this flag is set.
D5 Data Error in DD If the FDC detects a CRC error in the data,
Data Field then this flag is set.
16 Diskette Adapter
Bit
No. Name Symbol Description
07 Fault FT This bit is the status of the fault signal
from the FDD.
06 Write WP This bit is the status of the
Protected write-protected signal from the FDD.
05 Ready RY This bit is the status of the ready signal
from the FDD.
04 Track 0 TO This bit is the status of the track 0 signal
from the FDD.
03 Two Side TS This bit is the status of the two-side
signal from the FDD.
02 Head Address HD This bit is the status of the side-select
signal from the FDD.
01 Unit Select 1 US 1 This bit is the status of the unit-select-1
signal from the FDD.
DO Unit Select 0 USO This bit is the status of the unit-select-O
signal from the FDD.
Programming Summary
FDC Data Register I/O Address Hex 3F5
FDC Main Status Register I/O Address Hex 3F4
Digital Output Register I/O Address Hex 3F2
BitO Drive 00: DR #A 10: DR #C
1 Select 01:DR#B 11 : DR #0
2 Not FDC Reset
3 Enable INT & DMA Requests
4 Drive A Motor Enable
5 Drive B Motor Enable
6 Drive C Motor Enable
7 Drive 0 Motor Enable
All bits cleared with channel reset.
OPC Registers
Diskette Adapter 17
FDC Constants (in hex)
N: 02 GPL Format: 05
SC: 08 GPLR/W: 2A
HUT: F HLT: 01
SRT: C (6 ms track-to-track)
Drive Constants
Head Load 35 ms
Head Settle 15 ms
Motor Start 250 ms
Comments
• Head loads with drive select, wait HD load time before R/W.
18 Diskette Adapter
Interface
Diskette Adapter 19
+T/C (Adapter input, load: 4 74LS): This line along with
DACK2 being active indicates that the byte of data for
which the DMA count was initialized is now being
transferred.
20 Diskette Adapter
Adapter Outputs
Diskette Adapter 21
Adapter Inputs
- Write Protect The selected drive must make this line active
if a write-protected diskette is in the drive.
22 Diskette Adapter
Specifications
34- Pin Keyed
Edge Connector
Component
Side
Diskette Adapter 23
37-Pin D-Shell
Connector
o
1 • • 20
19 • 37
o
24 Diskette Adapter
(2) + El'A8LE DRtVE 314
!2) - ENABl.E DAM 314
+",11> 2118
'"
'"
'"
(S) + WRITE DATA
~~~~g~, ~,~il"~
lSI + WRITE ENABlE
(2) _ DRIVE SELECT 3
!2) _ DflIV£SELECT4
(2) _ MOTOftENABl.E3 10 DR[VES3&4 n
(2) _ MOTOR ENABLE 4
NOTES I &2
'"'"
+A9 (2)
I SIGNALS ON DRIVE PINS 10 THRU II> ARE SWAPPED BV THE DRIVE (ABLE
:~ :~ ".
,e,
+AEN
-lOR
(ll
12)
:~
TIO
:~ 8.21lFD
'" :~~ET l!:
14
I')
12
II
'"
,e'
,e,
_ +TC
_ _ +00
+01
(3)
(2)
(2)
II> TO 10
'"
'CO
,"
+02
_ _ _ +03
(2)
(2)
2 ALL DRiVES ARE JUMPERED FOR MULTIPLO OPERAT[ON. HEAD LOAD
WITH DRIVE SELECT AND DRIVE SELECT ViA INPUT PIN 12. TERMINATlNG
,,. .. 04
_ _ _ +05
(2)
(2)
:g~
_ _ +06 (2)
_ _ _ +07 (2)
rn .0'11 ",FO SHOULD BE ADJACENT TO MODU~ES MC ,'161. 1'+.8. 7451'1.lbMHZOSC.
RI'-I.I1C'I0'fI.11{'I02'I,74L5Ibl&74LSI'I1 B.2"Fl)CAPSSHOULD8ENEARAS'i)(lATED~ PltlS '"
_ _ _ OACK2 (3)
[LD ALL SlGtlAL UNES H["HER THAN OR EQUAL TO IMHZ SHOULD BE IIEPT TO THE
SHORTEST 'POSSIBLE LENGTH. THIS IS A PRIMARV DESIGN GOAL
') MAKE NO CONNEClIOt< TO UNUSED PINS ON 1HE VCO. CHARGE PUMP & DATA SEI'!!IRATOR MODULES
b ALL VOLTAGE AND (,ROUtlD eONtiECTIONS TO THE veo. CHARGE PUMP AND ASSOCIATED DISCRETE
COMPONENTS SHOULD 6E SEPARATE FROM OTHER CIRCUITS AND THEN JOINED TO THE OTHER
CiRCUITS AT ONE POINT
K:~'
11, +Ab
(1)
(1)
+A7
+AB
7'+:18,
I,
'"
, 74~~ L
(1) +A9
u"
~'SO»'~'----l1~~:~~,'~"r,'~~~====jt=L~~~-----------
,I
~ ~ rV UZ9
L __ -.JuIS
DRIVE SELECT 3
'"
~ ,"'mJ
----r---;======4::j"tl--' Ag~ ~I;~~~lll
~ ~ g~ :~ ~
(11 +AZ
II 6 U 14
J
Ll--______+-__________--+-lJ:::~,,~l:[).__t-'·'------------MOTOA
UI2 9 1"38-'1
ENABLE 2 (1)
__ ..J U ..
91
L-l-____________________-W===::l,,4=:[)~.lL-----------MOTOR
7'1'18-'118
ENABLE 3 (1)
p, -DA"
(3) Dl.CK< 12 ~ 14i8--I j'
'"'" 'D'
.00 L---t====================~==jt~==~~"=-----------
13
L_---1ulS
MQTORENABLE4 (1)
.02
'" 'D'
'"'"'" 'D'
.",
.""
'"'" .D7 '"
."
'''"""
HO
(1) -IOR
r
IK~~~
MR2 GlI'l
, t2 MHZ (21
~roo--oo2 ,
C::
+WRITE DATA III
D I~(~
+2TRQbNC TR 10 .----- ,
" ~~ R~:
.2 8 <A 7 + DIRECTION III
4 CLK!
~Ol
OSC.
~ ---L: ~-~CLKI
n .. we
CPI Qi :>--N( ~2A
7 .". I CLF 7 14 PO Q~ II = IS CLR ~~A
~D2 Q2~ IrEA
= NOTE 5J 74lS10'l ~ 14LS10"
~OB r-'!---
U2
"' U2 ~D~ ~~NC II IB
YB
,
.-" RD'
WE 2S
74lSIS'> UIO , +WRITE ENABLE III
17 lOX
III +!NOEX
, FRISTP ,7
.. 74LSOB
8 , +STEP III
III + WR'lTE PROTECT ~4 WPITS SEEK "3" 10
HDL~NC ""
, I 74lS0B USO~NC
USI t2t;- N(
~'
1~ FLT/TRO MF .... p-NC
U4
lC~ ~~ , +V FO SYNC (4)
HO 27 4
74LSOB
, ,
~4
+SELECT HEAD I III
(4) SfANDARDOATAiCLK
, 2~ ROO
(4) +OATA WINDOW 22 ROW
j.iPD7f;f)
CONTlJUEO FROM SHEET 4"'
1074LSOB
'"
(1)- OA(K 2 j==============~f5~====~==~==)!8~
9
74lS04
_____--------------------------------~, +DACK & TC 12j
I~ 7'il50B 14LSO'+
U" " DACK (2)
(2) +OMA GATE ~-------------~~~U'
... ....
"STANDARD DATA" GENI!RATOR
...
•.
~
~~. ~
11 J PR Q'
un
1'0Ic~C~ TC~
un
3~5 11
,..3L
.I
u..
.
!"....
Q •
, ,-----'- J •
~4 +STANDAltD DATA 131
. ,.
LS112 13 1/1 La11:t :I LA1" t1lLS112 1/2LS1U
'--( CK1/2
'--< OK ~PCP ,-----'-< OK ~ CO<
-7f-
orL- r -7.t- Q' rEO'-7f- ~ K
~
Q'
I"¥
> '4 a
f
~
I3J+VCOSYNC
. . ,.1 U24
k
+0'
..,
B U20
'co A
..
(3) +500 KHZ
WRIT. CLOCK
L'-!- '01
,co u,a
..• ......
~
......-:c. .
B 10 lCO CONTI. OUT •
• B
.f<
IIC4024
t!!.2C1 oct-!-
...
Xl E• •
@~
U"
~2C2 AI. a GO ' +DATA WINDOW (3)
~2C3
, lit:
. r~
2.15K C17
UF~ '"
'r"
INPUT SELECTOR
4 pu OF 10
. . . . . 1IOTECTOfI
R5
LOOP FILTI!R
--- ~
7
+
(PULLUPI
+ •
mM Fixed Disk
Adapter
6361503
ii
Contents
Description .................................... 1
Fixed Disk Controller ........................ 1
Programming Considerations ...................... 3
Status Register ............................. 3
Sense Bytes ................................ 4
Data Register .............................. 7
Control Byte ............................... 8
Command Summary ........................ 10
Programming Summary ...................... 14
Interface ..................................... 15
Specifications ................................. 17
Logic Diagrams ................................ 19
BIOS Listing .................................. 25
iii
it>
Description
The Fixed Disk Adapter attaches to one or two fixed disk drive
units through an internal, daisy-chained, flat cable (datal control
cable). Each system supports a maximum of one Fixed Disk
Adapter and two fixed disk drives.
The adapter is buffered on the I/O bus and uses the system
board's direct memory access (DMA) for record data transfers.
An interrupt level also is used to indicate operation completion
and status conditions that require microprocessor attention.
The device level control for the Fixed Disk Adapter is contained
on a ROM module on the adapter. A listing of this device level
control can be found in "BIOS Listing" of this section.
Edge
Connector
Data Bus
OB7-DBO
Control Sector
Buffer
a-Bit
Processor
Status Register
At the end of all commands from the system board, the disk
controller sends a completion status byte to the system board.
This byte informs the system unit's microprocessor if an error
occurred during the execution of the command. The following
shows the format of this byte.
~I
6 5 4 3 2
o d o o o e
Bits 7 6 5 4 3 2 1 0
Byte 0 Address Error Type Error Code
Valid I o I I
Byte 1 0 0 d
I Head Number
Byte 2 Cylinder High I Sector Number
Byte 3 Cylinder Low
Remarks
d = drive
0 0 0 1 1 1 Not used.
0 0 1 0 0 0 The drive is still seeking. This status is
reported by the Test Drive Ready command
for an overlap seek condition when the
drive has not completed the seek. No
time-out is measured by the controller for
the seek to complete.
0 1 0 1 1 1 Not used.
0 1 1 0 0 0 Correctable Data Error: The controller
detected a correctable ECC error in the
target field.
0 1 1 0 0 1 Bad Track: The controller detected a bad
track flag during the last operation. No
retries are attempted on this error.
Data Register
The system unit's microprocessor specifies the operation by
sending the 6-byte device control block (DCB) to the controller.
The figure below shows the coniposition of the DCB, and defines
the bytes that make up the DCB.
Bit 7 6 5 4 3 2 1 0
Byte 0 Command Opcode
Class
Byte 1 0 0 d Head Number
Byte 2 Cylinder High
I Sector Number
Byte 3 Cylinder Low
Byte 4 Interleave or Block Count
Byte 5 Control Field
Control Byte
Byte 5 is the control field of the DeB and allows the user to
select options for several types of disk drives. The format of this
byte is as follows:
I I
Bits
7
r
6
a
5
0
4
0
3
0
2
s s ~I
Remarks
r = retries
s = step option
a = retry option on data ECC
error
Bits 5, 4, 3 Set to O.
Bits 2. 1. 0
0 0 0 This drive is [lot specified and defaults to 3 milliseconqs per
steP
0 0 1 N/A
0 1 0 N/A
0 1 1 N/A
1 0 0 200 microseconds per step.
1 0 1 70 microseconds per step (specified by BIOS).
1 1 0 3 milliseconds per step.
1 1 1 3 milliseconds per step.
*Initialize Drive Characteristics: The DBC must be followed by eight additional bytes.
Maximum number of cylinders (2 bytes)
Maximum number of heads (1 byte)
Start reduced write current cylinder (2 bytes)
Start write precompensation cylinder (2 bytes)
Maximum ECC data burst length (1 byte)
DO-D7 Positive 8-bit data bus over which data and status
information is passed between the system board and
the controller.
Pin 20rru!ZlJ!-...'
::::::
"
';~
..........
:::~~
, Pin 1
Pin 2~2~ ,-
Position 5 has No Pin
(for Cable Orientation)
Pin 1
Signal Pin Number
Ground-Odd Numbers 1-33
Reserved 4.16.30.32
- Reduced Write Current 2
- Write Gate 6
- Seek Complete 8
Disk - Track 00 10 Disk
Drive - Write Fault 12 Adapter
Connector - Head"Select 2° 14 Connector
J1 - Head Select 2' 18 J1
-Index 20
- Ready 22
-Step 24
- Drive Select 1 26
- Drive Select 2 28
- Direction In 34
B ~~~ ...=~
4 lS244l=! -RESET
!~~ ~ ~4 ~~ "
5H 6 12 LS321
Al3 EN AB 4 l1F
• :~R 2 6J 11
Tlg '*
1 D1
1o-o,16t~ul
11Y~
A
I 7 :
: '6D2~
6 D6
05 •
AI2-=~.~D ~~.
I I 1511H 1 •
,• A
I"
lC S04
':' 5
, 6 D4
•
lS24 ~ 1~~;,I~I2~I~'~-'-I~'jf~~~ij~~t~~~~~5~~~~~
5
" ~g
D3
D2
A
A
CJCI
....
=
R5D
••
so~2iET:" ~'1'
I DI
m
:ll
A22
A8
A:'
A
AI
17
~
lOJ 38 8 Z
. ,
:: 5
: AI'CE
;
1 0"60004 -'
,:'9R~O 10F 5
"
3
"NTERRUPTEN::Bl:J~~O
OF"
rtrlS04
a
:~; ~~ il~5~'=1t~¥'!G~~~~~'S~DO~~:I~'~o~8:t'~'~K'>"""':-i',f--'=~D •
"05 23 fI.l
:~ A2
A4
11
13
12 3
ITYPI 7 4
~ 6 DO ~O,
11 ':" LS244
LS74 11
12
02 : +DMAENABlE ~3 LSI25
~fl9 ±::i ,
'f;f~,\~~:~
D
~ "~'V1~~II9t=~D~~~~~~~~==~~~'hJ.L ~
.30 AI lS244' I AD 6F ClCl 02" ,·5Dp4lS1.kk,'
A31 I~
lS244 10 19 ~3 5~S041~"D'AI" ::-: A51 4
----- 3 9JQ 6
OR03
12 9K:>"'-1-I\,}---="--i::> 81
~ ~4 Z5-SELECT Cl LS125
~
::R ION;6
1 J't
16 +5V
8H rLSI5~D~I~6~-~"~SE~TID::;:===1111~t11--------------il
1 -OATADUT .50
¥ 74lS688 ~4 rl rs~!IIP 2 - 3 11 -DRIVE TYPE I I~Ol
C>-';=D~=-'------'l-'-SD:-:'-::~;::-8K--8=::;::q--I~~~I~;~AS~'~~~] r~ '~,~. ~ l:~' ~:~'f'l~':S7:-:.N-====--
+ACKNOWlEDGE
A" ,
81' ~lSD' CLYi'
taK-.J;r:pi~'~O~;============:::t;'~~:6==~'~1:J~~6!j=i ~jS:S~~ss~~~~d~
OJ
81'
~
K3lSD41312 5 ~l§
h, '''' __
815 IDA 11
9 g8K LS04 8J lS08 15lS244~ ~501aR50LS74
~
~
,'~_~8~U:S.Y~DI_~o~Di=iA~=S3~~:;~~~~~~~~~~~~~~~~~~~~~~~~~==~~~~I~B~~~4~~'l~:!l==~~I2~D'~~'j
3 + -D + OH T/-FR MH E ii10"''+-I----------='- 4 ITYPI I 11 ~ ',I
Co
t:;j
, -ClBUSY 1 ~ el l3
I •rrn5Vj:~ ~
-EN IN 5 LS32
/il' ,2
-EN HOST •
~'''OUEST
OJ ' 22K 1
~
, , " 3 ~~D~IP~~~'
2 6
-r; ~614 ,2I
lS244 12
>
Co
-EN OUT 1 6J 3
:
12
1314 4
ITYPI
~
....
...
~
~
+;:62~HK 6 J Q I J 0
5V
16
~~K
~~' I
T
8131
~
[ .7
,••t. 1
11118 15144 5
• 1 2530
" 35
R2
.70 NAZ eLK
. 1 12
35 llC 1 +A KNDWLE E
~
>II'-
87
gc
.st. 2 4 IE 3
.51:;>-5 "7 Mst'
11. 21
22 0
Msce
LSI
~
LSI
~-t-- ,1 LSI 23
O.
OJ
3
01 15 lS04 2B 1 n +
••
ill
vee", 11 27
~r-- •
14 vee 35
~ 3.'
GNO=29
'-7 VCC=31.5
GND=20
29
30
01
D
3. GND -15 32
3
16
I .81: 33~1~1:738 40 Bl 00 D5 0302100
~
+A1
All 21
R~+ 11 0
~
~• I•"
~ 7f 3 ~-!::-
~
A5
~ "VA ~
LS3 AS A9
LSI 13 9F 0 !!...!!Z.
~LS257 7 ISUC.1 11 0 2148
02 !l....!!fi.. E"OJD2~
~
~
2732
t:::lsYG PROM 01 ~ ~21~1~
' t -~ I--
4 1H 0-
-;:1l t:! • 17
AD DI ~ ¥,=t oo~
~
• 6 AQ DO
5 ~ CSOE
AD , ~ csiE '·'-P~iiiE I TE N l T BUS 3.1
~12
I' 8ll-
S-
~' 3 LS3Z IOLS
11
9
11
1H
'Y"
rr T EHOUT
1,3
1
- a;P." 00
~LS74'3 12:l_.
11 8 11 10~l 9
lS04 ~3
.51
+SElDR2
SEL~~~3S=t::===iE
-ORASEL
-ORB
-INDEX
11
13
+SELDRT
~14lh~~ATOR
+tNDEX
~:~:.~IS~@~[:====::i±~~ :f- ~
LSI55 1 6
f')c;:¥'--""---------r-:miB"l -HDl
I~---~~ -HDO
-RESET
,,
+WRITEGATE
2B
-READY GiJj:j'·!D~---.......,*-'-~<m-:::T.1.l!-~[;d
03
, 4.6
~
~ WINDOW CLOCK
+NRZ DO DATA
2.6
Q.
t
.
'a 10 MHZ CRVSTAL
5.6
~
+MFMWRO
-MFMWRO
+MFMWRI
-MIIMWRI
.
-INCREASE PRECOMP
-TESTENA L
All +5V
"
Fixed Disk Adapter (Sheet 4 of 6)
WINODWClK
+ DEL DATA
J-'
+5VA
-1
J3-1 TPB
'38
33"
-CLAMP VCO
\'1"" AG5l0pF
9'"
-AM DETECT
'_6
+ RD GATE
-AM RESET
I·~·i
.;,." .Bom '5'
3 >-Wi AM [L:>
5)=:~ D:~~ DD
J4
~1,3.7"1
IK
.48
04.
:;~-~'.~C'~'A~S~'..P',,'C"B._P________________~~
>--RO GATE crr::> ':' TEST CONNECTOR .SO
: :> 10 MHZ CRYSTAL UI:> .51
r-------------.u-----------,
l 3300 TO 202 PACKAGE I
I I
: L.320MP5.0 I
I IQ·OII--t-----~::-:-----.,_--~~ -5VA
I CI G
I
I ~ I
4MHZClDCK
I I
I
I
IL___ ____________________________ J I
~
D +5V6LTS
83.829
rpg TP10
GROUItD
Bl,BID,B31
B9
o +12VOLTS
NOTES:
UNLESS OTHERWISE SPECIFIED:
1. All RESISTOIIS 1/4 W,5'\'1, CARBON FILTER.
2. ALL CAPS +10V DR BREATER+ID%.
3. NO MORE THAN 15 lOADS PER PULLUP NET.
The BIOS Listing for the IBM Fixed Disk Adapter follows.
'"
153 - CONTROLLER I/O PORT
154 > WHEI'i READ FIWM,
000& ."
.0_ HAX]IlE EQU
0002
...
'06
S_HAX_FIlE
ASS\Jt1E
EQU
CS:COOE
0000 207 o.G 0"
0000 55
0001 AA .0.
'08 DB
DB
055H
OUH
I GENERIC BIOS HEADER
."
212 1-----"" -.. -.. ---------------------------------------- ... ----------... -
213 1 FIXED DISK lID SETUP
21_
215 - ESTABLISH TRANSFER VECTORS FOR THE FIXED DISK
216 - PERFORM POWER ON DIAGNOSTICS
217 SHOULD AN ERROR OCCUR" "1701" MESSAGE IS DISPUYED
218
219 1_ -- ------- -- --------------- w _w _______ . ____________ w - - -----------
•• 0
.21 DISK_SETUP PROC FAR
...
0003
0003 EBIE
0005 35303030303539
••• JHP
DB
SHORT L3
'5000059 (C)COPYRIGHT IBM 19B2' I COPYRIGHT NOTICE
20284329434FSO
5952494748542.0
20494240203139
0023
3632
0023 tBCO
..-
••S
"6
l3:
ASSU1E
SUB
DS:Dl.It1MY
AX,AX I ZERO
002:5 8E08 ,.7 MO. DS,AX
...
8"
8"
j
(1
1 BYTE) - MAXIMUM tM1BER OF HEADS
WORD' - STARTING REDUCED WRITE CURRENT
(1 WORO I - STARTING WRITE PRECOMPENSATlON CYL
cn
91.
915 ;----- DRIVE TYPE 03
91.
0417 3201 917 OW 03060
0419 04 918 DB 040
1073 ENDP
1074
1075 ; --- .. -- - ... ------............... -- --- ...... --_ .. _______ "' __ .. ___ _
1076 REAl) SECTOR BUFFER UH = DEH)
1077 i -------- .. ----------------- .. ---------------------
1(178
04F9 1079
04F9 C606420DOE Hl80
04FE C60b46DOOl 1081 MOV CHD_BlOCK+4.1 , ONLY ONE BLOCK
0503 se47 11182 MOV AL.OHA_READ
050,5 E83E 1083 JMP SHORT DMA_OPH
1084 !lUi/_BUFF ENDP
108S
1086 ; .. -------------------------... -_ .. _________________ _
1187 WJfITE SECTOR BUFfER I AH = IFH)
lIJ88 ; ------------------------------------___________ _
1089
0,87 1690
OSI7 C"'428"" 1691
osee C6U46DOOl 1092 MOV CHll_BlDCK+4.1 I ONLY ONE BLOCK
0511 11948 109] MOV AL.DNA_WRITE
osn Eel8 1094 JH" SHaRT DNA_OPH
1096
1 0 97 ; --------- -- --- .. - --------________________ .... ___ .. _ ..
1098 TEST DISK READY (AH = 01 OH)
1 0 99 ; ----------------- --- _ - ---- --- --- - _____ .. ________ _
1110
0515 1101 TST_ROY PROC NEAR
0$15 C:,,6£t20ote 1102 MaV CHO_BlOCKt-O, TST_ROY_C~
05U EBlA 1103 JMP SHORT NOHA_OPN
1104 TST_RDY ENDP
1105
1106 ; --.. -----.. ----------.. ---... ---------- _____ .. _______ _
1107
Il08
RECALIBRATE (AH =
011H)
; ------------- __ "._ .. __ ... ___ ... _______________ .... _____ _
1109
OSlt 1110 HDISK_"ECAL PROC NEAR
D51C C606420001 1111 MOV tHO_BLOCK ,RECA~CHO
0521 EBU 1112 JMP SHORT NDMA_OPN
1113 HDISK_RECAL ENOP
1114
1115 ; -- .. -- .. ----------- .. ,.-- .. -------_________________ .. _____ .. __ _
1116 CONTROLLER RAM DIAGNOSTICS UH 012H) =
1117 ; - .... ---------------------- ______________ .. ______ .. ________ _
1118
0523 1119 PAce NEAR
0523 C60Mt200ED 1120 MOV
0528 EBOC 1l/!:1 JMP
1122 ,NOP
1123
1124 ; - .. ---------- .. ------------------.. ----- .... --- ____ .. _
1125 DRIVE DIAGNOSTICS (AH = 013H)
1126 ; -----------.. ..,.----- .... --- .. ----------- .... -----------
1127
052A 1128 CHK_DRV PROC NEAR
052A C6D6428eE3 1129
aS2:F EB85 1130 JMP
1131 CHK_DRV Et-I>P
1132
1133 J --... --- .......... ---- ....... ---- .. ------ .. - ......... ---.. ------------ .... -----
1134 CONTROLLER INTERNAL DIAGNOSTICS (AH = 014HI
1135 ) ---------.--- ... ------.--- .... ---- .. -- .. ------ ... ---.......... -- .. ----
1136
0531 1137 PROC NEAR
0$31 C6f16421&E4 1138 MOV CMD_BLOCK+O .CNTLR....DIAG_CHD
1139 ENDP
11ItG
1141 i -------....... ----- .. ------------------.. --.. - .. ----------------
1142 SUPPORT ROUTINES
1143 ; - .. ------.------------------------ .. --------------------- ..
ll44
1536 1145 N&lMA_OP'N:
0536 eOll2 1146 HOV AL,02H
1538 E82:700 1147 CALL COMMAND I IS$UE THE COtflAHD
0538 7221 1148 JC GIl
11-530 lun, 1149 JMP SHORT Gl
1227
1228 ; BYTE 2:
1229 BITS 7-5 CYlINDER HIGH
1230 BITS 4-0 SECTOR HUMBER
1231
1232 ; BYTE 3
1233 BITS 7-0 CYLINDER LOW
1234
1235 i ------- ------- - -------------- ------ -------------
1236
0590 1237 ERROR_CHK PROt NEAR
1238 ASSUME ES:OATA
059C A07400 1239 MOY AL,OISK_STATUS I CHECK IF THERE WAS AN ERROR
059F OACO 1240 OR Al,Al
05Al 7501 1241 JNZ G'I
05A3 C3 1242 RET
1243
1244 j----- PERFORM SENSE STATUS
1245
05A4 1246 G21:
05A4 884000 1247 MaY AX,DATA
05A 7 8EtO 1248 MaY ES,AX ESTABLISH SEGMENT
05A9 2BCO 1249 SUB AX,AX
05A6 SSFe 1250 MOY DI,AX
05AO C606420003 1251 MOY CMD_BLOCK+O ,SENSE_tHO
0562 2ACO 1252 SUB Al,Al
0564 E8ABFF 1253 CALL COMMAND i ISSUE SENSE STATUS COMMAND
0587 7223 1254 JC SENSE_ABORT ; CAHNOT RECOVER
0589 B90400 1255 MOY CX,4
osse 12:56 G22 :
05BC E8CBOO 1257 CALL HO_WAIT_REQ
05BF 7220 1258 JC G24
05Cl E8AOOI 1259 CALL PORT_O
05C4 EC 1260 IN Al.OX
05C5 26884542 1261 MaY ES :HO_ERRORt OI] .Al ; STORE AWAY SENSE BYTES
05C9 47 1262 INC or
05CA E8BI01 1263 CAll PORT_l
05CO E2ED 1264 LOOP G22
05CF E88800 1265 CALL HO_WAIT_REQ
0502 7200 1266 JC G24
0504 E09AOl 1267 CALL PORT_O
0507 EC 1268 IN AL.oX
0508 A802 1269 TEST AL.2
050A 740F 1270 JZ STAT_ERR
050e 1271 SENSE_ABORT:
05DC C6067400FF 1272 MOY DISK_STATUS .SENSE_FAIl
05El 1273 G24:
05El F9 1274 STC
05E2 C3 1275 RET
1276 ERROR_CHK ENDP
1277
05E3 1A06 1278 T_O OW TYPE_a
05E5 2706 1279 T_I OW TYPE_I
05E7 6A06 1280 T_' ow TYPE_2
05E9 7706 1281 T_' ow TYPE_3
1282
05EB 1283 STAT_ERR:
05EB 268AIE4200 1284 MOV Bl,ES:HD_ERROR ; GET ERROR BYTE
05FO 8AC3 1285 MaV AliBl
05F2 240F 1286 ANO Al.OFH
05F4 80E330 1287 AND Bl. 00 1100008 ; ISOLATE TYPE
05F7 2AFF 1288 SUB BH.BH
05F9 BI03 1289 MOV Cl.3
05FB 03EB 1290 SHR BX,Cl ; ADJUST
05FD 2EFFA7E305 1291 JMP WORD PTR CS:[BX .. OFFSET T_O I
1292 ASSUME ES:NOTHING
1293
0602 1294 TYPE a_TABLE LABEl BYTE
0602 00204020800020 1295 OB O. BAD_CHTLR .BAO_SEEK • BAO_CHTLR • TIHE_OUT, 0, BAD_CN'lLR
0609 0040 1296 OB o ,BAD_SEEK
0009 1297 TYPEO_LEN EOU $- TYPEO_ TABLE
JI
I BLOCK COUNT OUT OF RANGE
060A 50
0608 Mft200
06DE 3Ce5
1444
1445
1446
1447
1448
PUSH
,",V
C"P
.
1----- HAtilLE READ AND WRITE LONG 15160 BYTE BLOCKS)
AL,ct1D_aLOCK+O
ALoRD_LONG_CHO
I SAVE REGISTER
I GET COMMAND
SHORT J20
1 RESTORE REGISTER
Description .................................... 1
Fixed Disk Function ............................. 1
Task File .................................. 2
Task File Registers .......................... 2
Miscellaneous Information ................... 11
Diskette Function .............................. 11
Diskette Controller ......................... 14
Diskette Controller Commands ............... 16
Controller Commands ...................... 20
Command Status Registers ................... 32
Interfaces .................................... 36
Interface Lines ............................ 37
Logic Diagrams ................................ 41
iii
Notes:
iv
Description
I/O Address
Primary Secondary Read Write
1 FO 170 Data Register Data Register
1 F1 171 Error Register Write Precomp
1 F2 172 Sector Count Sector Count
1 F3 173 Sector Number Sector Number
1 F4 174 Cylinder Low Cylinder Low
1F5 175 Cylinder High Cylinder High
1 F6 176 Drive/Head Drive/Head
1 F7 177 Status Register Command Register
Task File
The data register provides access to the sector buffer for read and
write operations in the PIG mode. This register must not be
accessed unless a Read or Write command is being executed. The
register provides a 16-bit path into the sector buffer for normal
Read and Write commands. When a R/W Long is issued, the 4
ECC bytes are transferred by byte with at least 2 microseconds
between transfers. Data Request (DRQ) must be active before
I I
Error Register
01 No errors
02 Controller error
Operational Mode
Bit 7 Bad Block Detect-This bit indicates that the bad block
mark was detected in the target's ID field. No Read or
Write commands will be executed in any data fields
marked bad.
The target's logical sector number for Read, Write, and Verify
commands is loaded into this register. The starting sector number
is loaded into this register for multi-sector operations.
The target number for Read, Write, Seek, and Verify commands
is loaded into these registers as shown in the following figure. The
cylinder-number registers address up to 1024 cylinders.
Drive/Head Register
Bit 7 Set to 1
Bit 6 Set to 0
Bit 5 Set to 1
Status Register
The controller sets up the status register with the command status
after execution. The program must look at this register to
determine the result of any operation. If the busy bit is set, no
other bits are valid. A read of the status register clears interrupt
aborted.
Command Register
Command Bits
7 6 5 4 3 2 1 0
Restore 0 0 0 1 R3 R2 Rl RO
Seek 0 1 1 1 R3 R2 Rl RO
Read Sector 0 0 1 0 0 0 L T
Write Sector 0 0 1 1 0 0 L T
Format Track 0 1 0 1 0 0 0 0
Read Verify 0 1 0 0 0 0 0 T
Diagnose 1 0 0 1 0 0 0 0
Set Parameters 1 0 0 1 0 0 0 1
Valid Command-Register Commands
R3 R2 R1 RD Stepping Rate
a a a a 35 us
a a a 1 0.5 ms
a a 1 a 1.0 ms
a a 1 1 1.5 ms
a 1 a a 2.0ms
a 1 a 1 2.5 ms
a 1 1 a 3.0ms
a 1 1 1 3.5 ms
1 a a a 4.0ms
1 a a 1 4.5 ms
1 a 1 a 5.0 ms
1 a 1 1 5.5 ms
1 1 a a 6.0 ms
1 1 a 1 6.5 ms
1 1 1 a 7.0 ms
1 1 1 1 7.5 ms
Stepping Rate
The following figure shows the bit definitions for bits Land T.
Bit Definition D 1
L Data Mode Data Only Data Plus 4 Byte ECC
T Retry Mode Retries Enabled Retries Disabled
Land T Bit Definitions
Restore: The controller issues step pulses to the drive until the
Track 000 indicator from the drive is active. If Track 000 is not
active within 1023 steps the error bit in the status register is set
and a Track 000 error is posted in the error register. The implied
seek step rate can be set up using the stepping rate figure on the
Seek: The Seek command moves the R/W heads to the cylinder
specified in the task files. The adapter supports overlapped
seeking on two drives or setup of the buffered seek stepping rate
for the implied seek during a Read/Write command. An interrupt
is generated at the completion of the command.
1. Restore
3. Restore
• ID fields are checked for errors when read from the disk.
• The adapter supports only Eee on data fields and only eRe
on ID fields. The eRe polynomial is X16 + X12 + X5 + 1;
the Eee polynomial is X32 + X28 + X26 + X19 + X17 +
X10 + X6 + X2 + 1. All shift registers are preset to hex F
before calculating the checksums, which begin with the
respective address marks.
Diskette Function
I/O Address
Primary Secondary Read Write
3F2 372 - Digital Output Register
3F4 374 Main Status Register Main Status Register
3F5 375 Diskette Data Register Diskette Data Register
3F6 376 - Fixed Disk Register
3F7 377 Digital Input Register Diskette Control Register
Diskette Function
Bit 7 Reserved
Bit 6 Reserved
Data Rates
The diskette function will support three data rates: 250,000,
300,000 and 500,000 bits per second.
The bits in the status register (hex 34F) are defined as follows:
Bit 3 Reserved
Bit 2 Reserved
Bits 7 - 2 Reserved
Bits 7 - 4 Reserved
Bit 0 Reserved
• Read Data
• Write Data
• Read a Track
• Read ID
• Format a Track
• Scan Equal
• Specify
• Seek
• Invalid.
Symbol Descriptions
signal.
Read Data
07 06 05 04 03 02 01 DO
MT MF SK 0 0 1 1 0
X X X X X HO US1 usa
c
H
R
N
EOT
GPL
OTL
STO
STl
ST2
C
H
R
N
07 06 05 04 03 02 01 DO
MT MF SK 0 1 1 0 0
X X X X X HO US1 usa
c
H
R
N
EOT
GPL
OTL
STO
STl
C
H
R
N
07 06 05 04 03 02 01 DO
MT MF a a a 1 a 1
x X x x X HO US1 usa
c
H
R
N
EaT
GPL
OTL
STO
STl
ST2
C
H
R
N
07 06 05 04 03 02 01 00
MT MF 0 0 1 0 0 1
X X X X X HO US1 USO
C
H
R
N
EOT
GPL
OTL
STO
STl
ST2
C
H
R
N
07 06 05 04 03 02 01 DO
a MF SK a a a 1 a
x x x x X HO US1 usa
c
H
R
N
EaT
GPL
OTL
STO
STl
ST2
C
H
R
N
07 06 05 04 03 02 01 DO
a MF a a 1 a 1 a
x x x x X HO US1 usa
Result Phase: The following bytes are issued by the processor in
the command phase:
STO
STl
ST2
C
H
R
N
Format a Track
07 06 05 04 03 02 01 DO
a MF a a 1 1 a a
x x x x X HO US1 usa
N
SC
GPL
0
STO
STl
ST2
C
H
R
N
Scan Equal
07 06 05 04 03 02 01 DO
MT MF SK 1 0 0 0 1
X X X X X HO US1 usa
c
H
R
N
EOT
GPL
STP
STO
STl
ST2
C
H
R
N
07 06 05 04 03 02 01 DO
MT MF SK 1 1 0 0 1
X X X X X HO US1 usa
c
H
R
N
EOT
GPL
STP
STO
STl
ST2
C
H
R
N
07 06 05 04 03 02 01 00
MT MF SK 1 1 1 a 1
x X x x X HO US1 usa
c
H
R
N
EDT
GPL
STP
STO
STl
ST2
C
H
R
N
Recalibrate
07 06 05 04 03 02 01 00
a a a a 0111
X X X X X a US1 usa
07 06 05 04 03 02 01 00
o 000 100 0
STO
peN
Specify
07 06 05 04 03 02 01 00
o 0 0 0 0 0 1 1
( SRT ) ( HUT
( HLT ) ( NO
07 06 05 04 03 02 01 DO
a a a a a a 1 a
x x x x X HO US1 usa
Result Phase: The following bytes are issued by the controller in
the result phase:
sn
Seek
07 06 05 04 03 02 01 DO
a a a a 1 1 1 1
x x x X X HO US1 usa
NCN
07 06 05 04 03 02 01 00
Invalid Codes
X X X X X HO US1 USO
STO
(Recalibrate Command).
diskette drive.
I/O Address
Primary Secondary Read Write
3F2 372 Digital Output Register
3F4 374 Main Status Register Main Status Register
3F5 375 Diskette Data Register Diskette Data Register
3F6 376 Fixed Disk Register
3F7 377 DiQital Input ReQister Diskette Control ReQister
Diskette Function
I/O Address
Primary Secondary Read Write
1FO 170 Data Register Data Register
1 F1 171 Error Register Write Precomp
1F2 172 Sector Count Sector Count
1F3 173 Sector Number Sector Number
1F4 174 Cylinder Low Cylinder Low
1F5 175 Cylinder High Cylinder High
1F6 176 Drive/Head Register Drive / Head Register
1F7 177 Status Register Command Register
Fixed Disk Function
··..
··..
··.
·.
34
- r---
- Ready 22_
-
- - Step
- Drive Select 1
24
26
-= - Drive Select 2 28
- Reserved 30
Reserved 32
_ - Direction In 34
-
- '---
..
- -
+ MFM Write Data 13
- '----
···....
c:::::Jc:::::::::::J c=J C=:l
···...
c::.::J c:::::J;~c:::::::::::Jc::JCJ
C J== =
c:=::::J c:=::::J ==
c::::::J ~ c::::::J c::==:J c::=::J [=::J c::::J c::J
··..
c.::::::J c=J
CJ~c_~=Jc=J~c:::J
c:::::::::::J c::l [===:J c::::::::J C=::J c:::::J c::J c:::::J c::::J
c:::::J c:::::Jc::Jc:=::J D~ ·
33 34
.
- r---
--
Reduced Write 2
Reserved 4
Drive Select 3 6
- Index 8_
...
- Write Gate
Track 00
24
26 _
..
Write Protect 28_
..
Read Data 30
..
-- Side 1 Select
Diskette Change
32
34 _
- L..-
PUP11\SHT4.5,l}
"
2N'NO&
."
,.
'"
17.8Kn
L - t - - - t - - - ' = + - - - - - . - - - - V A R welK (SHT11
~PINS '.1.'>.1.9.1I.ll.I'5.17,IQ,ZI.2l,2';.27,2CJ.1IIt4D11AREGROUNDONJI&J'>
&
.& ,J1 & Jlt GND PlNS:Z.'I.&.II,IZ,I'>.I&,IQANOZO
utS SDHOf'''''--------+------~'f-l:-»'-+'-,-___1-------,----,-----,----"'O'::++f--f--f--____i
(SHT2IB(R-
22 :~t~-~If-''''---------+------,"'::H:»-i'-'',,----1-------1------~+++--+-------i
(SHT7)WRC:P
(SHT5) AD
~~ ~2~~"--------+------~lrt~~I~-+-------~------~-+-+-+--~
(SHT5IAI 1"5 AI I
SIlIflf-'''''----------'
(SNT51A2
(SHTI) HRST-
(SHTil WR-
; M,~E'-_ ~,,~,,~------~-~-'~.~~"--~,lr~~'~I~,---------l---,-----,--~------+-+__-____i
1
cu 1'J 112
(SHT51 RO-
(IH12) B(S-
18 ~_l::H~~~"'~,,~.='='.~,--------~~LH:_~~~---------,----------+--____i
(IHT3IRAb
(SHYij(SO-
=:-=-
17
9JZ8 DRQH~""'- - - - - - , -
~ 21 :~t~~:;3:SHT21
L0,GND
(SHT2) (St-
LUB-
~
19
CIN(- (SHT3)
:~~
1N0E~
r--+~--'M~f"__-----'''_II TlOlOO
(IHTI)
""
"'" g.; ~; lO WAUP(SHY U) r--+~-~~~~-~-.-,,-.--~"-I~::,O
'""'" Db
'"
CMR- Y (MR- (SHY 3)
""r''''~---~'{><':''----' WF (SHY 6) ""
SBEF(SHTZ)
r--+++11~~~~---~~"j~'"
RDY(SHT&) ,)!!&."
,lEPl-'''L-----''-j'1>""'----1
(SHY 3) HoIHID1-+'--'--------------.--------------=--=-++++t---:c---"
r:Z'J r-·no-, 19 00 'ml"~'---~'1'"[>",.,,,,,-""'-'---Illt DIRECTION IN-
I "" I 18 01 INTRQ'Jb INTliO(SHT2)
YOO ALE II
"'00,
I
I
IL... _ _
""
'"
~10
I
I "'"
17",
"",
"", ='n ::
EARLYZ'J
(SHT 1.1)
EAIILY(SHT1)
JI
~ RESEf-
(SHTI) HRST- 00 12
""
"'"
220
_____
"'"
"'"
"",
"", LATE ~ LATE(SNT1)
(SNTI)P\P)I!I "INT 011'J
'" 1;01
HI" "",
8(5-ZI B(S-(5HT2)
(IHY2)WAl,JP
~~ U1I : :~ ""
"'" ,,'"
,'" ,,' ," ~~ 'J8 :~(IHT1)
7 EA D~ I" 11.112 10 AI B(R- 2 BeR-ISHT2)
(SNTZ) INr::~
~ :~~ ~~:: "'''
"'"
'"
"",
" '
11.1 1"5
"<; ~
~:~ P~ ~I
'"
18 07
,,'
(Sa-(IHTZ) A2(SHT5) (SHT&IIII$T- MIi-
=:~:: :=
! ;:~
8 CS-
(SHYZ) SIlEF
'"
'JO
'JI PI~ P21 12 '"
W, '" NJ(SHTS)
.-----------------------~."~'~"~~-"'----~~~::~
Y PI"5 PU 21
"" n PIt. pn 2'1 ""
'J~ PI1 P2~ ~ (SHY 8) RCLK RCLK
P2"5 !~ (SNT8) RllIITA 'J7 RDATA
."
CORRO(IHTB) (SHT1)WReP Zo;WCLK
Wo/oto; ~~ 'J8
ERROIt(SHTI)
WAUPL
(SHT1)IOI'IlZ (SNT5)
-M1?"
20 21t
RAO I):OE DE 1/07 17 SOBle; (SHT 5)
RAI 6 AI 1/06 16
SDB" (SHT 5)
RA2 7 A2 U~~ I/o~ I~
(SHTS)
lr
RD- ~
IblSA
UI9
~RDA-(SHTJ)
~RDB-(SHT3)
RA1
RA4
8 M 20161 IAl't III
I A4 1101 IJ
SDBI1 (SHT 5)
SDBI2 (SHTS)
SOB II (SHTS)
RA~ A~ 9
~
PAL2 2 1/02 SOBIO (SHTS)
(SHTS) WR- F-- WRA - (SHT 3) RAb 1 Ab 1101 10
f!'1--- WRB - SDBQ (SHTS)
=:!
(SHT 5) WDXFER-
~
(SHT 3)
(~~~C2~ -----:S
LS19l
CI >!-
RA7 4 >7 1/00 II SOBa (SHT 5)
pq
(SHT2) RCS- XCV REN-(SHT 3) OA RAB
RAO 19 A8
:~
11 9 a 7 b ~ 4 1 2
C2 QA RA9
RAI 22 A9 IT
OB A A
U>2 RA2 RAID 21 AIO 12
Oc 9 (SHT 5) WR- - - ' DIR U~~
RA1 LSZ4'1)
0D a
RI R2 + ~V -----'24 (SHT 3) X CVREN-~ EN
[
12
LS191
1'2
,
RAO
RAI
RA2
RA1
r;
AD
2016-1
b AI U~1
7 A2
a A1 1/07
n 17
B B
II 12 B 14 II) 16 17 18
HD7
RA4 RA4 Ib HDb
CI OA I" IICb
4 R. .
OB RA~ 2 A~ I~ HO~
Ub2 ~ RAb I/O~
HD~
Oc
Go
b
11
RA7
RAa
RAb
(SHT 2)
RAb
RA7
, Ab
4 A7
I/O"
1101
11 " HD1
.!2, C2 OA
10 RA9
RAa 19 A8 1/02
9 HD2
OB RA9 22 M 10 HDI
9 RAID I/OI
RAID HDO
RI
Oc
R2
21 AIO
WEOECS
1/00
"
T2 1'2 ~ HDO-HD1
=~:~rr
(SHT2) CHR- (SHTJ) WRA- (SHT 2)(SHT 5)
(SH T3 ) RDA -
1""
ISHT 5) 508;
SDBIf II OBit SEEK (5HT 4)
I I ~====~~------------~--~--------------------t-~~~-----j18 DIR-
L soss IZ DBr; OIR 18
150n 150n
_
,on I
..J U22
lSI4
5086
SOB7 11 ~:;
wO!\
PSQ
PSI
10
12
11 "'-'------'22 WRf DATA-
1 WR
INDEX.-
• • 2
, I •
ISHT 5) rOWB-
(5H1 5) IDRB- 2 RD
If cs
&. GNO
U22
LSIIf (SHT 5)·SAOS ' ClK
AO
1 , 2 (SHT 7) FREP IQ
WRf PROl- 2. 21 WCLK
(SHT 7) FWCLK
U22 n lOX
TRK 0- 2'
, , lS11f
lit WP/TS
'---"q>''-_____--'''-'-1'3 FLT/TKO
U59 20
LSIIf
f----4---------9'-<1,,~·--DC HG ISHT 6)
U22
LSIIt
WDA (SHT 7)
FWE (SHT 7)
L.'::::======= PS
PSOI (SHT
(5HT 7)7)
=w
!.:-'
("':I
0
....
IC
ALE - (SHT 5)
pup 68 (SHT I)
£1 h"
Ell
P;
PRI/SEC
STRAP
(SHT 5) JOWB-
(SHT 5) IOR8-
FAST I/O 16-
a
'=
00
.&;. U"
LSI ..
(SHT3)
(SHT 3)
(SHT 3)
SD81'5
SD6I~
el8
C"
SDI')
5014
5DI~
.,= S===~'~~'=~I2~~~~====~
WC (SHT 3) A4 6 CIS 5DI2
..... A£N ~~~
LDDOR- (SHI6) (SHT 3) SDBII ,,' "4
~: s~o
SOli
~ All .. U60 LOFCR - (SHT 6.7) (SHT 1) SDBID ,,4 SOlO
HDCS- (SHT 5)
'"
A2b~===:=;i;~3~
LDFDR- (SHT 6) (SHT 1)
>
2 IG Wc (SHT 3) 5DO.
rr;=====~
5008
SA')
SA'JA28 1J12
14 2G ,/C (SHT 5) I0R8-
""'l "
~====="t1~~~
SALt A27 ENDIR- (SHT 6)
SA9 A22 £NHDSTAT - (SHT 6) 'WD;(FER- (<;-(7)
~ SA7 A24
IoIAUPL (SHT 2,6)
Irr=;========~Jj
~' FDCS- (SHT 4)
(SHT 2) WAUP
~ (SHT2jSBRG
Q.
~ II LS24'; 9
:~ :~&;~S:~ ~
5OB7
(SHT 1) H07
!il' E (SHT 1) H06 12 8~U4S ~ 8 5086
5007
5006
5A2 A29
~ I~ 8"3
A2 (SHT 2)
(SHT 1) HDS A"3 7 16 Bb A6 4 A04 SODS
SAl A3D AI (SHI2)
A4 6
(SHT 1) 1-(14 14 B4 r=; BS AS S AOS 5004
~ SAoa (SHT 4)
(SHT 1) HO"3 I'> 8') A') ') 50" 14 84 A4 6
=
500"3
Q.
SAO
'"
IOW- 81'3 lS'367
AO (SHT 2)
(SHT I) HD2
(SHT 1) HOI
:~ f*,
87
A6
A7
~
SOB2 1"3 8"3
12 B2 A2 8
A~ 7
A08
SOO2
5001
IOR- 914 18 88 AB 2 II 81
(SHT 1) HOC
~ AI ' Aoq 5000
fWCS- (50- (SHT 2)
(SHT3)IORS- I D1Rm IDIR_
(7-05)
" 'N
~
WR- (SHT 2.3)
~
E RD- (SHT 2,3)
" "
.....
.....
(SHT 6.4) 5000 -SOB7
~ (SHT 6) FDMAEN
~
(SHT 2) HINT
>
Q.
(SHT 6) HOHAEN
~
'=
.....
.,
~
:t==
~ HOEN I (SHU)
:~~N
{SHT 2} HSI -
ISHT 2} HS2 - ~
LSlB ~
I~
NIC~
2 ISHU}
(SHT 2) HS1 -/RWC
(SHl2) WG-
----1
~
•
12
(SHT') LDOOR
R
11
(SHU) OCHG -----.!
G EN
• SOB. ISHT.}
SDB7 (SHT 5)
III 11
(SHT 5) END IR-
~O Q~N/C
U" Q~N/C
'---- f----2 o LS175 OfL---NIC
Q~ HDMAEN (SHTS)
12 0 Q~NIC
~'
o II
(SHT 5) LDFDR-
: 0 ,,-It-- H53 ISHTS)
01-'--- H53-ISHT'}
I U,)8
LSOB
HRST - (SHT 2)
(SHT') MR-
P
.
-
~~ :;;' -;::"
~ ~~ m
0
I i
"~ "'...."
Q)
I Q)
~
,.1 "1"1~~ i
I I
ff ~~
·1 ~
.
....Q)Q.
III
"C
~i~~i~m
;<; ... ;<;:;;,,,,:;;,:;;,:;;,:;;,
«Q)
~~~~~~~1~ >
";:
c
~3
....
Q)
....Q)
NN N
~1 ~ ~
III
C
"C
s:::
III
~
III
C
"C
Q)
><
iL:
~
~ l~
"
~
I~~ ''''
ZZl.lF.I'5Y(ELECTROLYTIO
1/2W
.~
(SHY I) PUPil
"
(SNTI)
TI T2
{SlIT 7)
'"
"'" ~~1 RClK {SIfT 2)
'"
I~;V"~ELECTROLYTlc)
"
210n
11'+ RDATA{SIIT2)
"
ROb
--------l
-- +<;VS(SHT9) I
"
L<
4.7MH
FlD/REF -+---+-''4
--FDCLK (SHT4)
I~ U48 veo (SHT 1)
Description ..................................... 1
Fixed Disk Controller .......................... 1
Programming Considerations ....................... 3
Types of Drives ............................... 3
Status Register ............................... 4
Sense Bytes .................................. 4
Data Register ................................ 7
Programming Summary ........................ 14
Interface ...................................... 15
Connectors ............... ;.................... 17
Logic Diagrams ................................. 19
BIOS Listing ................................... 23
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Index-l
The 20MB Fixed Disk Drive Adapter attaches to one or two fixed
disk drive units through an internal, daisy-chained, flat cable
(datal control cable).
The adapter is buffered on the 110 bus and uses the system
board's direct memory access (DMA) for fixed-disk-drive data
transfers. When the adapter is enabled, an interrupt request
occurs on the IRQ-5 line to the 8259A Interrupt Controller. The
8259A then causes an interrupt hex OD.
The device level control for the Fixed Disk Adapter is contained
on a ROM module on the adapter. A listing of this device level
control can be found in "BIOS Listing" of this section.
Warning: The last cylinder on the fixed disk drive is reserved for
diagnostic use. The diagnostic write test will destroy any data on
this cylinder.
J2
liD
)
SERDES
ECC Interface
Edge liD
Interface J3
Connector
Data Bus
8-Bit
DB7-DBO
-- Sector Buffer
Processor
Types of Drives
The fixed disk drive adapter will accommodate any two of four
different types of drives. The figure below shows the
configuration of the different type drives.
Start of Landing
Type Cylinders Heads Write Pre-Camp Zone
1 306 4 a 306
2 615 4 300 615
13 306 8 128 336
16 612 4 a 663
The figure below shows the switch settings for the above
mentioned drive types. Switches 1 and 2 set the parameters of
Drive 0, and switches 3 and 4 set Drive 1.
Drive a Drive 1
Switch Switch
1 2 3 4
Type 1 On On On On
Type 2 Off On Off On
Type 13 Off Off on Off
Type 16 On Off On Off
I Bit I : I : I : I : I : I : I : I : I
Sense Bytes
If the status register receives an error (bit 1 set), the disk
controller requests four bytes of sense data. The format for the
four bytes is as follows:
Bits 7 6 5 4 3 2 1 0
Byte 0 Address I I
0 Error Type Error Code
Byte 1
Va 1 i d
0 0 d
I
Head Number
Byte 2 Cy 1 i nder High Sector Number
Byte 3 Cylinder Low
Remarks: d = drive
0 1 0 1 1 I Not Used.
Data Register
The system unit's microprocessor specifies the operation by
sending the 6-byte device control block (DCB) to the controller.
The figure below shows the format of the DCB, and defines the
bytes that make up the DeB.
Bits 7 6 5 4 3 2 1 0
Control Byte
Byte 5 is the control field of the DeB and allows the user to
select options for several types of disk drives. The format of this
byte is as follows:
I s;t I : I : I : I : I : I : I : I: I
Bits 2, 1, 0
0 0 0 This drive is not specified and defaults
to 3 mill i seconds per step.
0 0 1 N/A
0 1 0 N/A
0 1 1 N/A
1 0 0 200 microseconds per step.
1 0 1 70 microseconds per step (specified by BIOS).
1 1 0 3 mi 11 iseconds per step.
1 1 1 3 mi 11 iseconds per step.
In i t i a Ii ze Bit 7 6 5 4 3 2 1 0 Bytes 1, 2, 3, 4, 5, =
Drive
Character- Byte 0 0 000 1 1 0 0 don't care.
istics*
(Class 0,
Opcode OC)
Read ECC Bit 76543 2 1 0 Bytes 1, 2, 3, 4, 5, =
Burst Length
(Class 0, Byte 0 o 0 0 0 1 1 0 1 don't care.
Opcode 00)
Read Data Bit 7 6 5 4 3 2 1 0 Bytes 1, 2, 3, 4, 5, =
from Sector
Buffer Byte 0 o0 0 0 1 1 1 0 don't care.
(Class 0,
Opcode OE)
Write Data to Bit 7 6 5 4 3 2 1 0 Bytes 1, 2, 3, 4, 5, =
Sector Buffer
(Class 0, Byte 0 o 000 1 1 1 1 don't care.
Opcode OF)
Dr i ve Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1)
Diagnostic
(Class 7. Byte 0 1 1 1 0 0 0 1 1 r = retries
Opcode 03)
Byte 1 0 0 d x x x x x s = step option
Byte 2 x x x x x x x x x = don't care
Byte 3 x x x x x x x x
Byte 4 x x x x x x x x
Byte 5 r 0 0 o0 s s s
Write Long **
(Class 7. Bit 7 6 543 2 1 0 d = drive (0 or 1)
Opcode 06)
Byte 0 1 1 1 o0 1 1 0 s = step option
Byte 1 0 0 d Head No. s = step option
Byte 2 ch Isector No. ch = cy 1 i nder high
Byte 3 Cyl inder Low s = step option
Byte 4 Block Count
Byte 5 rOO 0 0 s s s
DO-D7 Positive 8-bit data bus over which data and status
information is passed between the system board and
the controller.
Land
At Standard TTL Levels Number
Ground-Odd Numbers 1-33
-Reserved 2, 16, 30, 32
-Head Select 2 4
-Write Gate 6
-Seek Complete 8
-Track 000 10
-Wr i te Fau It 12
-Head Select 0 14
Disk -Head Select 1 18 Disk
Drive Adapter
J1 -Index 20 J1
-Ready 22
-Step 24
-D rive Select 1 26
-Drive Select 2 28
-Drive Select 3 30
-Drive Select 4 32
-D i rect ion In 34
Reserved 3,5,7,9
Key 5
+MFM Wr i te Data 13
-MFM Wr i te Data 14
Fixe d +MFM Read Data 17 Fixed
Disk Disk
Driv e -MFM Read Data 18 Adapt er
J2 0 r J3 J2 or J3
Ground Pins 2,4,6,8,10,11,12,15,
16,19,20
All Other Pins Unused
,-
2
,"'-
IOHHZ
.".
MQ 29
IRQ ~~
DRQ~
IR., ."
'"
ISH. 2. 3)
(SH.2.S) II ~i:
."iI''" 1& PJOR
".
., ....,......
18 PlOW
82 'J6 PRST LS'
(SOCKET>
vee"'6
GND:Z6
A"
AI1
AIS
A"
A"
A ..
AI>
AlB ~.~"--------------------~
AI' rnrr~"------------------~-,
m-
AO
AI
....
.28 "
AV
A26
A2';
A'"
.."
AA
A7
A.
'"All
(SH.2,3) 00
ISH.2.S) 01---
ISH. 2, 3) 1lZ--
~==~~==c===========~
(SH.2.S)
ISH.S)
ISH.S)
(SH.S)
.,--
06--
ISH.S) 07
TA au
(SH.3) AO=====~=============:iI.
(SH.3)
(SH.3)
AI
A2 },
DO (SH.l.S)
(SH.S) ----------------------------i~-------~r_~~~-------C~,,-~.) ~
(SH.4) ~---------------------------__j+-------___1f__t_.."..~
(SH.3) EARlY---------'L>'----'1~""==_'G'"=:_"--t---'
EN HOST ISH. 1)
ISH, 1) BUSY
'"" I I
'" "
WR 22 LSO'f
III " '"
~WR
~(SH,41
~~ AEN
20 BlJSACK
lDRQ 20 17 IOREQ MFH'JTDTA ~b I1FH IoIT DATA (SH.Z)
MIirQ 1'1 16 MREGI WTGTE 37 WRITE GATE (SH.ll
---"
row vcoCLAMP 28 KO CLAMP (SH.4)
TO>
DA~
2
'
I'>
'='
B LDI
NEG PlJI1P ~2
.".....,..
NEG PUMP
(SH.4)
(SH.4)
I5l1J ,., HIrn'IT 2~ iiIinIT
~ ENRO mmmTA 22
(SH.4)
(SH.4)
NRZ RD DATA
39~
OAI 24
DA2
rn>"
14
XENO """'"
LATE 3'+
EARLY
""""
LATE
EARLY
(SH.4)
(SH.2l
(SH_l)
"
~~'~'_£j2 '!MHZ
ISH. 1,2)
ISH.l,2)
ISH. 1,2)
ISH.l,l)
(SH.l)
ISH 1)
ISH.l)
ISH 1)
-- " (SH.Z)
"""
(SH.2l
(SH.2l
- ISH. 1)
I<lAIO
" (SH.2l
tv
...... 20MB Fixed Disk Drive Adapter (Sheet 3 of 4)
tv
tv
+'5VA
"
.OI,..F
~~~~~~~~~-+~~~----~---i,
t:---~~)J!-:"'"'-.---------'lCC CLOCk (SH.3)
LI
'""
4.7,.."1
i=if"GA1N-------'/e
(SH.3)
"
~C;IOPF
'"
(SH.J) veo (LAMP _ _ _ _ _ _ _ _ ~~~/''---"'''L''.y
BD
LS04 S PI RIO
(SH.3) ~ _ _ _ _ _ _ _ _~I{ > . < 2 - - - - - - _ C I : ) 89D~·~I2~V_~~--~---~~~---~---_
"==r-
~~-~---~----LT~---~----
BEAD
IKTVP
~.'
(SH.3) DISABLE AM _ _ _ _ _ _ _ _ _ ~l'L'-
__R"'I~4_ _ _ _ ____{OD R22 .;v
The BIOS Listing for the IBM 20MB Fixed Disk Drive Adapter
follows.
I PAGE 118,121
2 TITLE DISK2 ---- 10/28/85 FIXED DISK BIOS
3
4 ;-- INT 13H -----------------------------
5
6 FIXED DISK I/O INTERFACE
7
8 TH I S I NTERF ACE PROV I DES ACCESS TO F I XED 0 I SKS
9 THROUGH THE IBM F I XED 0 I SK CONTROllER.
10
II ; -- ------- ------------- - - ------------- ------------- ------ - -----
12
13 ; -- ------- - - ------------ - - -------- - ---- -- -- -------- ------- - - -- ---
14 ; THE 81DS ROUT I NES ARE MEANT TO 8E ACCESSED THROUGH
15 ; SOFTWARE INTERRUPTS ONLY. ANY ADDRESSES PRESENT IN
16 THE LISTINGS ARE INCLUDED ONLY FOR COMPLETENESS,
17 NOT FOR REFERENCE. APPL I CAT IONS WH I CH REFERENCE
18 ABSOLUTE ADDRESSES WITH I N THE CODE SEGMENT
19 ; V lOLA TE THE STRUCTURE AND DES I GN OF B [OS.
20 ; -- --
-------- ---- -- - - ---------- ---- - - --------- -------
21
22 INPUT (AH " HEX VALUE)
23
24 (AH)= OOH RESET DISK (DL = 80H,8!HI / DISKETTE
25 (AHi" OIH READ THE STATUS OF THE LAST DISK OPERATION INTO (AU
26 NOTE: DL < 80H - DISKETTE
27 DL > SOH - 0 I SK
28 (AH)= 02H REAO THE DESIRED SECTORS INTO MEMORY
29 (AHI" 03H WRITE THE DESIRED SECTORS FROM MEMORY
30 (AH)" 04H VER I FY THE DES I RED SECTORS
31 (AH)" 05H FORMAT THE OES I RED TRACK
32 (AHI = 06H FORMAT THE DESIRED TRACK AND SET BAD SECTOR FLAGS
33 (AH)= 07H FORMAT THE DRIVE STARTING AT THE DESIRED TRACK
34 (AH)" 08H RETURN THE CURRENT DR [VE PARAMETERS
35
(AHI= 09H [N[TlALIZE DRIVE PAIR CHARACTERISTICS
"
37
38 (AHi" OAH
INTERRUPT 41H POINTS TO DATA BLOCK
READ LONG
39 (AHJ" OBH WR I TE LONG
40 NOTE: READ AND WRITE lONG ENCOMPASS
41 512 BYTES + 4 BYTES OF ECC
42 (AH) " OCH SEEK
43 (AH) " ODH AL TERN ATE DISK RESET (SEE DL I
44 (AH) " OEH READ SECTOR BUFFER
45 (AH) " OFH WR I TE SECTOR BUFFER,
46 (RECOMMENDED PRACT I CE BEFORE FORMATT [NG)
47 (AH) IOH TEST OR I VE READY
48 (AH) IIH RECAL I BRA TE
49 (AH) I2H CONTROLLER RAM 0 [AGNOST I C
50 (AH) I3H DRIVE DIAGNOSTIC
51 (AH) 14H CONTROLLER INTERNAL 0 I AGNOST [C
52
53 REGISTERS USED FOR FIXED DISK OPERATIONS
54
55 (DLI DR[VE NUMBER (80H-87H FOR DISK, VALUE CHECKED)
56 (DHI HEAD NUMBER (0-70 ALLOWED, NOT VALUE CHECKED I
57 (CHI CYLINDER NUMBER (0-10230, NOT VALUE CHECKED) (SEE CU
58 (CLI SECTOR NUMBER ( 1-170, NOT VALUE CHECKED)
59
60 NOTE: HIGH 2 BI TS OF CYL [NDER NUMBER ARE PLACED
61 IN THE HIGH 2 BITS OF THE CL REGISTER
62 (10 BITS TOTAl)
63 (AU NUMBER OF SECTORS (MAXIMUM POSSIBLE RANGE 1-80H,
64 FOR READ/WRITE LONG 1-79H)
65 ( I NTERLEA VE VALI,IE FOR FORMAT I - I 60 I
66 (ES:BXI ADDRESS OF BUFFER FOR READS AND WR [TES,
67 (NOT REQU I RED FOR VER I FY I
68
69 OUTPUT
70 AH " STATUS OF CURRENT OPERATION
71 STATUS BITS ARE DEFINEO IN THE EGlUATES BELOW
72 CY = 0 SUCCESSFUL OPERATION (AH" OOH ON RETURN)
73 CY " I FA[LED OPERATION (AH HAS ERROR REASON)
74
75 NOTE: ERROR IIH [NDICATES THAT THE DATA READ HAD A RECOVERABLE
76 ERROR WHICH WAS CORRECTED BY THE ECC ALGORITHM. THE DATA
77 IS PROBABLY GOOD, HOWEVER THE BIOS ROUT I NE I NO [CA TES AN
78 ERROR TO ALLOW THE CON TROLL [NG PROGRAM A CHANCE TO DEC I DE
79 FOR ITSELF, THE ERROR MAY NOT RECUR IF THE DATA IS
80 REWRITTEN. (ALI CONTAINS THE BURST LENGTH.
81
82 I F DR I VE PARAMETERS WERE REQUESTED,
83
84 DL " NUMBER OF CONSECUTIVE ACKNOWLEDGING DRIVES
85 ATTACHED (0-21 ICONTROlLER CARD ZERO TALLY ONLYI
86 DH " MAX I MUM USEABLE VALUE FOR HEAD NUMBER
87 CH " MAXIMUM USEABLE VALUE FOR CYLINDER NUMBER
88 CL " MAX I MUM USEABLE VALUE FOR SECTOR NUMBER
89 AND CYL I NDER NUMBER H [GH BITS
90
91 IF AN ERROR OCCURS ON READ DRIVE PARAMETERS,
92
93 AH " ERROR CODE (INIT FAILI
94 AL :: CX '" OX " 0 -
95
96 REGISTERS WILL BE PRESERVED EXCEPT WHEN THEY ARE USED TO RETURN
97 INFORMATION.
98
99 NOTE: IF AN ERROR [S REPORTED BY THE D[SK CODE, THE APPROPRIATE
100 ACT I ON I S TO RESET THE 0 [SK, THEN RETRY THE OPERAT I ON.
101
102
103 PAGE
104 ; ----- - - -- ------- - ------- ------- - - ---- - -- - -------- - ------
105 ; ERROR RETURN STATUS (AH):: PH WHEN CY= I
106
107
108 DOFF SENSE FAIL EQU OFFH SENSE OPERAT I ON FA [LED
109 :: OOCC WR I TE-F AUL T EQU OCCH WRITE FAULT ON SELECTED DRIVE
110 OOBB UNDEF-ERR EQU OBSH UNDEF I NED ERROR OCCURRED
I I 1 0080 TIME OUT EQU 080H A TT ACHMENT FA I LED TO RESPOND
112 :: 0040 BAD SEEK EQU 040H SEEK OPERATION FAILED
1 13 0020 BAD-CNTLR EQU 020H CONTROLLER HAS FA [LEO
114 0011 DA TA CORRECTED EQU o 11H ECC CORRECTED DATA ERROR
115 00 I 0 BAD ECC EQU O\OH BAD ECC ON 0 [SK READ
I 16 OOOB BAD-TRACK EQU OOBH BAD TRACK FLAG DETECTED
I 17 0009 DMA -BOUNDARY EQU 009H ATTEMPT TO OMA ACROSS 64K BOUNDARY
I 18 0007 [NIT FAIL EQU 007H DRIVE PARAMETER ACTIVITY FAILED
I 19 0005 BAD RESET EQU 005H RESET FAILED
120 0004 RECaRD NOT FNo EQU 004H REQUESTED SECTOR NOT FOUND
121 0002 BAD ADDR MARK EQU 002H ADDRESS MARK NOT FOUND
122 0001 BAo::::CMo - EQU 00 I H BAD COMMAND PASSED TO 0 I SK I {a
123
124
125 I NTERRUPT AND STATUS AREAS
126
127
;- - - --------- - - - --
- - - --
128 0000 ABSO SEGMENT AT OH
129 0034 ORG 000H·4 F [XED 0 I SK I NTERRUPT VECTOR
130 0034 Ho [SK I NT LABEL DWORO
131 004C ORG o 13H·4 DISK I NTERRUPT VECTOR
132 004C ORG_ VECTOR LABEL DWORD
133 0064 ORG o 19H·4 BOOTSTRAP INTERRUPT VECTOR
134 0064 BOOT _ VEC LABEL oWORD
135 0078 ORG 01 EH·4 DISKETTE PARAMETERS
136 0078 DISKETTE_PARM LABEL DWORD
137 0 I 00 ORG 040H-4 NEW 0 I SKETTE [NTERRUPT VECTOR
138 0100 01 SK_VECTOR LABEL oWORD
139 0104 ORG 041H·4 F I XED 0 [SK PARAMETER VECTOR
140 0 I 04 HF _ TBL_ VEC LABEL DWORD
141 7COO ORG 7COOH BOOTSTRAP LOADER VECTOR
142 7COO BOOT LOCN LABEL FAR
143 7COO ABSO- ENOS
144
145 0000 DATA SEGMENT AT 40H
146
147
006C
006C 1777
ORG
OW , T I MER LOW WORD
148
149
0072
0072 RESET_FLAG
ORG
OW ,
072H
1234H [F KEYBOARD RESET UNDERWAY
150 0074 ORG 074H
151 0074 DISK STATUS DB FIXED DISK STATUS BYTE
152 0075 HF NOM DB COUNT OF FIXED DISK DRIVES
153 0076 CONTROL BYTE DB CONTROL BYTE DR I VE OPT IONS
154 0077 PORT OFF DB PORT OFFSET
155 0078 oATA- ENOS
156
157 0000 CODE SEGMENT
158
159 ; - --- ---- --- - - - - - -------- - - - - -----
160 HARDWARE SPECIFIC VALUES
161 1
162 CONTROLLER I {O PORT
163 > WHEN READ FROM:
164 HF PORT+O READ DATA (FROM CONTROLLER TO CPUI
165 HF-PORT + 1 READ CONTROLLER HARDWARE STATUS
166 - (CONTROLLER TO CPU I
167 HF _PORT+2 READ CONFIGURATION SWITCHES
168 HF PORT + 3 - NOT USED
169 > WHEN WR I TTEN TO:
170 HF PORT+ 0 WR I TE OAT A I FROM CPU TO CONTROLLER I
171 HF-PORT+ I CONTROLLER RESET
172 HF-PORT+2 GENERATE CONTROLLER SELECT PULSE
173 HF-PORT+3 WR I TE PATTERN TO DMA AND INTERRUPT
174 MASK REG! STER
175
176
177
178 CMD BLOCK EQU 8YTE PTR [BP1-B CMO BLOCK HEAD
179 0320 HF PORT EQU 0320H 01 SK PORT
180 0020 INTAOO EQU 020H 8259 PORT
181 0021 INTAO I EQU 021 H 8259 PORT
182 0020 EOI EQU 020H END OF I NTERRUPT COMMAND
183 0008 R I 8USY EQU 00001000B DISK PORT 1 BUSY BIT
184 0004 R I-BUS EQU OOOOOIOOB COMMAND/DATA BIT
185 0002 Rl-IOMOoE EQU 000000 1 DB MODE BIT
1860001 R1::::REQ EQU 0000000 I B REQUEST B[T
187
188 0047 DMA READ EOU 01000111B 1047HI
189 004B DMA-WR [TE EQU 01001011B CHANNEL 3 (04BH)
190 0000 OMA EQU OOOH OMA ADDRESS
191 0082 DMA_H I GH EOU OB2H PORT FOR HIGH 4 BITS OF OMA
192
193 0000 TST ROY CMD EQU 000000008 CNTLR READY { OOHI
194 0001 RECAL CMD EQU 0000000IB RECAL (OIHI
195 0003 SENSE-CMD EQU 00000011 B SENSE 103H)
196 0004 FMToRV CMD EOU 00000 I OOB DRIVE (04Hl
197 0005 CHK TRK CMD EOU 000001018 T CHK ( 05H)
198 0006 FMTTRK CMD EQU 000001108 TRACK 106H)
199 0007 FMTBAO-CMD EQU OOOOOIIIB BAD 107H)
200 0008 READ CMD EQU 0000 I 0008 READ 108H)
20 I OOOA WRITE CMo EQU 000010108 WRITE (OAHI
202 OOOB SEEK CMD EQU OOOOIOIIB SEEK (08H)
203 OOOC I N I T-ORV CMD EOU OOOOIIOOB INIT (OCHI
204 0000 RD ECC CMO EOU 000011018 8URST (DOH)
205 OOOE RD-BUFF CMD EQU 00001110B BUFFR (OEHI
206 OOOF WR-BUFF-CMO EQU 000011118 BUFFR (OFH)
207 OOEO RAM O[AG CMD EOU 1 I 100000B RAM IEOHI
208 00E3 CHK-DRV CMD EQU 11100011 B ORV IE3HI
209 00E4 CNTLR DIAG CMO EQU I I 1001 OOB CNTLR {E4HI
210 00E5 RD LONG CMD EOU I I 100101 B RLONG {E5HI
211 00E6 WR:::LONG:::CMD EQU I I 10011 OB WLONG (E6HI
212
213 OOOB MAX FILE EQU
214 0002 S_MAX FILE EQU
215 PAGE
216 ASSUME CS:CODE,OS:ABSO
217 0000 ORG OH
218 0000 55 DB 055H I GENER [C B I as HEADER
219 0001 AA DB OAAH
220 OOOZ 08 DB 080 ; 4K MODULE
221
222 ; --- - -------- - - - ----- - - - - --- - - - ----- ---- ----- -- - ---
223 ; FIXED DISK I/O SETUP
224 ;
225 ; ESTABl [SH TRANSFER VECTORS FOR THE F I XED 0 I SK
225 PERFORM POWER ON 0 I AGNOSTI CS
227 ; SHOULD AN ERROR OCCUR A "170 I" MESSAGE IS D I SPLA YEO
228 ;
229 ;
230
231 0003 01 SK SETUP FROC FAR
232 0003 E8 35 - JMP SHORT L3
233 0005 35 39 58 37 32 39 DB '59X7291 IC) COPYRIGHT IBM CORP.' COPYR I GHT NOT I CE
234 31 20 Z8 43 29 20
235 43 4F 50 59 52 49
236 47 48 54 20 49 42
237 40 20 20 43 4F 52
238 50 2E
239 0025 2C 31 39 38 32 ZO DB ',1982,1985,'
240 2C 31 39 38 35 2E
241 0031 20 31 30 ZF 32 38 DB , 10/28/85' RELEASE MARKER
242 2F 38 35
243 D03A L3 :
244 003A 28 CO SUB AX ,AX ADDRESS LOW RAM
245 003C 8E 08 MOV OS,AX
240 003E FA CLI
247 003F A I 004C R MOV AX, WORD PTR ORG VECTOR LOAD 0 I SKETTE [P
248 0042 A3 0100 R MOV WORD PTR 01 SK VECTOR,AX STORE AT I NT 40H
249 0045 A I 004E R MOV AX,WORD PTR ORG VECTOR+2 LOAD D [SKETTE CS
250 0048 A3 0102 R MOV WORD PTR DISK VECTOR+2,AX STORE AT INT 40H
251 0048 C7 06 004C R 0251 R MOV WORD PTR ORG VECTOR, OFFSET 0 I SK 10 F I XED 0 [SK HANDLER
252 0051 8C DE 004E R MDV WORD PTR ORG-VECTOR+2,CS AT [NT 13H
253 0055 B8 0755 R MDV AX, OFFSET Hi) I NT F I XED 0 I SK INTERRUPT
254 0058 A3 0034 R MOV WORD PTR HOI SI< INT ,AX HANDLER AT I NT ODH
255 0058 8C OE 0036 R MOV WORD FTR HDISK-INT+2,CS
256 005F C7 06 0064 R 0192 R MOV WORD FTR SOOT VEC,OFFSET BOOT STRAP BOOTSTRAP ROUT[NE AT
257 0065 8C DE 0066 R MOV WORD PTR BOOT-VEC+2,CS - [NT 19H
258 0069 C7 06 0104 R 03FF R MOV WORD PTR HF TeL VEC, OFFSET FO TBL PARAMETER TABLE AT
259 006F 8C DE 0106 R MDV WORD PTR HF=:TBL=:VEC+2,CS - [NT 41H
260 0073 F8 STI
261
252 ASSUME
263 0074 88 ---- R MOV AX,oATA ESTA8L I SH SEGMENT
254 0077 8E 08 MOV OS,AX
265 0079 C6 06 0074 R 00 MOV DISK STATUS,O RESET THE STATUS INDICATOR
266 007E C6 06 0075 R 00 MOV HF NUM,O ZERO COUNT OF DR I YES
267 0083 C6 06 0077 R 00 MOV PORT OFF, 0 ZERO CARD OFFSET
268 0088 B9 0025 MOV CX,25H RETRY COUNT
269 008B L4:
270 0088 E8 0177 R CALL HO RESET 1 RESET CONTROLLER
271 008E 73 05 JNC L 7- -
272 0090 E2 F9 LOOP L4 TRY RESET AGA I N
273 0092 E9 0154 R JMP ERROR_EX
274 0095 L 7:
275 0095 89 000 I MOV CX,l
216 0098 8A 0080 MOV DX,80H
277 0098 B8 1200 MOV AX,I200H CONTROLLER D I AGNOST I CS
278 009E CO 13 INT I3H CHECK THE I NTERNAL RAM
279 OOAO 73 03 JNC P7 BUFFERS
280 00A2 E9 0154 R JMP ERROR_EX
281 00A5 P7 :
282 00A5 88 1400 MOV AX,I400H CONTROLLER D I AGNOST I CS
283 00A8 CO 13 INT I3H I NTERNAL CHECKSUM AND
284 OOAA 73 03 JNC P9 ECC CIRCUITRY TEST.
285 OOAC E9 0154 R JMP ERROR_EX
285 OOAF P9:
287 OOAF C7 06 006C R 0000 MOV TIMER LOW,O ZERO TIMER
288 00B5 81 3E 0072 R 1234 CMP RESET-FLAG, 1234H KEYBOARD RESET
289 00B8 75 06 JNE P8 -
290 OOBO C7 06 006C R 019A MDV TIMER_LOW,410D SKIP WAIT ON RESET
291 00C3 P8:
292 00C3 FA CLI D I SABLE INTERRUPTS
293 00C4 E4 21 IN AL,INTAOI TIMER
294 ODC6 24 FE ANO AL,OFEH ENABLE T [MER
295 00C8 E6 21 OUT INTA01,AL START TIMER
296 OOCA FB ST I I NTERRUPTS ON
297 00C8 P4:
298 00C8 E8 0177 R· CALL HD RESET 1 RESET CONTROLLER
299 OOCE 72 07 JC p(5 -
300 0000 88 1000 MOV AX,IOOOH TEST TO SEE IF THE DRIVE
301 00D3 CD 13 INT I3H [S READY
302 0005 73 OA JNC P2
303 0007 PIO:
304 0007 AI 006C R MDV AX, Tl MER LOW
305 OODA 30 OIBE CMP AX,446D - 25 SECONDS
306 0000 72 EC JB P4
307 OOOF E8 73 JMP SHORT ERROR_EX
308 OOEI P2:
309 OOEI 88 1100 MDV AX,IIOOH RECAL 18RATE THE OR I YE 0
310 00E4 CO 13 INT I3H
311 OOE6 72 6C JC ERROR_EX
312
313 00E8 88 0900 MOV AX,0900H SET DR I VE PARAMETERS
314 O{)EB CD 13 INT I3H FOR DRIVE 0
315 ODED 72 65 JC ERROR_EX
316
317 OOEF 88 C800 MOV AX ,OC800H DNA TO BUFFER
318 00F2 8E CO MDV ES,AX SET SEGMENT
319 00F4 2B 08 SUB BX,ex
320 00F6 88 OFOO MDV AX,OFOOH WR [TE SECTOR BUFFER
321 00F9 CD 13 INT I3H
322 00,F8 72 57 JC ERROR_EX
323
324 OOFO FE 06 0075 R INC HF NUM DR I VE ZERO RESPONDED
325 0101 BA 0213 MDV OX-;213H EXPANS [ON BOX
326 0104 80 00 MOV Al,O
327 0106 EE OUT OX,AL TURN BOX OFF
328 Ol078A0321 MDV DX,321H TEST IF CONTROLLER
OX
NEAR
SAVE REG I STER
409 PAGE
410 ; --- I NT 19 H --- ------- --- ------- ------ -- ----------- ---------
411
412 INTERRUPT 19 800T STRAP LOADER
413
414 THE F I XED 0 I SK B I OS REPLACES THE INTERRUPT 19H BOOT
415 STRAP VECTOR WITH A PO I NTER TO TH I S BOOT ROUT I NE AND
416 RESETS THE DEFAULT DISK AND DISKETTE PARAMETER VECTORS
411
418 THE BOOT BLOCK TO BE READ IN WILL 8E ATTEMPTED FROM
419 CYL I NDER 0 SECTOR 1 OF THE DEV I CE.
420
421 THE BOOTSTRAP SEQUENCE IS:
422 ATTEMPT TO LOAD FROM THE DISKETTE INTO THE BOOT
423 LoCAT I ON (0000: 7COOH) WHERE CONTROL I S TRANSFERRED.
424 IF THE DISKETTE FAILS THE FIXED DISK IS TRIED FOR A
42S VALID BOOTSTRAP 8LOCK. A VALID 800T 8LoCK ON THE
426 F I XED 0 I SK CONS I STS OF THE 8YTES 055H OAAH AS THE
427 LAST TWO 8YTES OF THE 8LOCK.
428 IF THE A80VE FAILS CONTROL IS PASSED TO RESIDENT BASIC
429
430
431
432 0192 BOOT STRAP:
433 - ASSUME OS: ABSO, ES: ABSO
434 0192 2B CO SUB AX,AX
43S 0194 8E 08 NOV DS,AX EST A8L I SH SEGMENT
436 0196 B4 CO NOV AH,OCOH
437 0198 CD 15 IN7 ISH READ CONF I GURAT I ON PARAMETERS
438 IF XT OR PC, I NTERRUPTS ARE 0 I SABLEO
439 RESET PARAMETER VECTORS AT THIS POINT.
440
441 o 19A FA CLI
442 0198 CT 06 0104 R 03FF R MoV WORD PTR HF TBL VEC, OFFSET FD TBL
443 01AI 8C OE 0106 R MOV WORD PTR HF-TBL -VEC+2, CS -
444 0lA5 73 OA JNC HO - - ; JMP I F I NT 15 FUNCT I ON IMPLEMENTED
44S
446 0lA7 C7 06 0078 R 0227 R MOV WORD PTR 0 I SKETTE PARM, OFFSET 0 I SKETTE TBL
447 OIAD 8C OE 001A R MOV WORD PTR DISKETTE:::PARM+2,CS -
448 OIBI HO:
449 0181 FB STI
4S0
4S1 ATTEMPT BOOTSTRAP FROM 01 SKETTE
4S2
4S3 01 B2 2B 02 SUB OX,DX OR I VE ZERO
4S4
4SS ESTABLISH ES:BX POINTER
4S6
4S7 0lB4 8E C2 NOV ES ,OX ESTABLISH SEGMENT
4S8 0186 BB 7COO R NOV BX,OFFSET BooT_LOCN SET BX TO 1COOH
4S9
460 CLEAR BOOT_LOCN
461
462 0189 FC CLO DIRECT I ON FORWARD
463 o IBA 33 CO XOR AX, AX
464 018C 89 0100 NOV CX,256 CLEAR 256 WORDS
46S 018F 88 FB NOV DI,8X POINT TO BOOT LOCATION 8UFFER
466 OICI F3/ A8 REP STOSW ZERO THE BOOT LOCAT I ON BUFFER
467
468 0lC3 89 0004 NOV CX,4 SET RETRY COUNT
469 o IC6 HI: IPL SYSTEM
470 o IC6 51 PUSH CX SAVE RETRY COUNT
471 0lC7 2B CO SUB AX,AX RESET THE 0 I SKETTE
472 0lC9 CD 13 INT 13H FILE 10 CALL
473 OICB 72 08 JC H2 IF ERROR, TRY AGAIN
474
47S OICD B8 0201 NOV AX,020!H READ I N THE SINGLE SECTOR
476 0100 B9 000 I NOV CX,I SECTOR I, TRACK 0
477 0103 CO 13 INT 13H FILE 10 CALL •
478 0105 59 H2: POP CX RECOVER RETRY COUNT
479 0106 73 09 JNC H3 CARRY FLAG SET 8'1' UNSUCCESSFUL READ
480
481 0108 80 FC 80 CNP AH,80H IF TIME OUT, NO RETRY
482 OIOB 74 22 JZ H6 TRY FIXED DISK
483
484 0100 E2 E7 LOOP HI DO I T FOR RETRY TIMES
48S OIOF EB IE JNP SHORT H6 UNABLE TO I PL FROM THE 0 I SKETTE
486
487 OIEI 80 3E 7COO R 06 H3: CMP BYTE PTR BOOT_LOCN,06H CHECK FOR FIRST INSTRUCTION INVALID
488 0lE6 72 30 JB HIO IF 800T NOT VAllO, GO TO BASIC
489
490 INSURE DATA PATTERN FIRST 8 WORDS NOT ALL EQUAL
491
492 0lE8 8F 7COO R NOV 01 ,OFFSET BOOT LoCN ; CHECK DATA PATTERN
493 0lE8 89 0008 NOV CX,8 - ; CHECK THE NEXT 8 WORDS
494 OIEE AI 7COO R NOV AX,WORD PTR BOOT_LOCN ; LOAD THE FIRST WORD
49S
496 OIFI 83 C7 02 H4: AOO 01,2 ; PO I NT TO NEXT WORD
497 0lF4 38 05 CNP AX, (01 J ; CHECK DATA PATTERN FOR A FILL PATTERN
498 01F6 EI F9 LoOPZ H4
499 0lF8 74 28 JZ HIO ; BOOT NOT VALID, GO TO BASIC
SOO o IFA H5:
SOl OIFA EA 7COO ---- R JMP 800T _LOCN
S02
S03 ATTEMPT BOOTSTRAP FROM FIXED DISK
S04
SOS 01 FF H6:
S06 01 FF 28 CO SUB AX, AX RESET D (SKETTE
S07 0201 CD 13 INT 13H
S08 0203 89 0003 MOV CX,3 SET RETRY COUNT
S09 0206 8A 0080 NOV DX,ooaOH FIXED DISK ZERO
SIO 0209 H7 : IPL SYSTEM
SII 0209 51 PUSH SAVE RETRY COUNT
SI2 020A 2B CO SUB AX, AX RESET THE F I XED 0 I SK
SI3 020C CD 13 INT 13H FILE 10 CALL
SI4 020E 72 08 JC H8 IF ERROR, TRY AGAIN
SIS
SI6 ES AND BX ALREADY ESTABLISHED
SI1
SI8 0210 B8 0201 NOV AX, 020 1H READ I N THE SINGLE SECTOR
5>9 0213 89 0001 NOV ex, I SECTOR I, TRACK 0
S20 0216 CD 13 INT 13H FILE 10 CALL
S21 0218 59 H8: POP CX RECOVER RETRY COUNT
S22 0219 12 08 JC H9
.2.
521
.28
53.
0223 E2 E4
;-----
LOOP H1 ;
531 0225
532 0225 CO 18 INT 18H RESIDENT BASIC
533
534 0227 01 SKETTE_ TBL I
.35
536 0227 CF DB 110011 I IB SRT=O, HD UNLOAD=OF - 1 ST SPEC BYTE
537 0228 02 DB 2 HD LOAD= I, MODE=DMA - 2ND SPEC BYTE
538 0229 25 DB 25H MOTOR TIMEOUT AFTER OPERATION
539 022A 02 DB 2 51 2 8YTES PER SECTOR
540 0228 08 DB 8 EOT (LAST SECTOR ON TRACK)
541 022C 2A DB 02AH GAP LENGTH
542 0220 FF DB OFFH DTL
543 022E 50 DB 050H GAP LENGTH FOR FORMAT
544 022F F6 DB OF6H FILL BYTE FOR FORMAT
545
546
0230
0231
19
04
DB 2. HEAD SETTLE T I ME (M I LL I SECONDS)
MOTOR START TIME (118 SECOND)
DB 4
.41
548 ;----- MAKE SURE THAT ALL HOUSEKEEPING IS DONE BEFORE EXIT
'4'
550 0232 D58L PROC NEAR
551 0232 2A CO SUB AL,AL ; RESET I NT IDMA MASK
552 0234 BA 0323 MDV DX,HF _PORT+3 LOAD FOR PORT ADDRESS :3
553 0231 FA eLi 01 SA8LE INTERRUPTS
554 0238 EE DUT DX,AL RESET I NT/DMA MASK CARD a
555 0239 83 C2 04 ADD DX,4
556 023C EE DUT DX,AL RESET INT/DMA MASK CARD 1
557 0230 83 C2 04 ADD DX,4
558 0240 EE DUT aX,AL RESET (NT/DMA MASK CARD 2
559 0241 83 C2 04 ADD OX,4
560 0244 EE DUT DX,AL J RESET INT /DMA MASK CARD :3
'61
562 0245 80 07 MDV AL,07H
563 0247 E6 OA DUT DMA+IO,AL SET DMA MODE TO 0 I SA8LE
564 0249 E4 21 IN AL,INTAOI
565 0248 OC 20 DR AL,020H
566 0240 E6 21 OUT INTAOI,AL oI SABLE I REQ 5
567 024F FB 511 ENABLE INTERRUPTS
568 0250 C3 RET
569 0251 OSBL ENDP
51 •
• 11
512
.13 FIXED DISK BIOS ENTRY POINT
.14
51. ; - --- -- - - -- - ---- - - - - - ------- -- - --------------------------
516
577 0251 DISK 10 PROC FAR
518 - ASSUME OS :DATA,ES:NOTHING
579 0251 80 FA 80 eMP DL,080H TEST FOR FIXED DISK DRIVE
580 0254 73 05 "AE HARD 01 SK YES, HANDLE HERE
581 0256 CO 40 INT 40H - DISKETTE HANDLER
582 0258
583 0258 CA 0002 RET J BACK TO CALLER
.84
585 0258 HARD DISK:
586 0258 FB - STI J ENABLE INTERRUPTS
587 025C OA E4 OR AH,AH
588 025E 75 09 "NZ A3
589 0260 CO 40 INT 40H RESET NEC WHEN AH=O
590 0262 2A E4 SUB AH,AH
591 0264 80 FA 81 e"p DL, (80H+S MAX FILE-I) DL IN LIMITS?
592 0267 77 EF "A RET_2 - -
593 0269 A3:
594 0269 80 FC 08 e"p AH,8 GET PARAMETERS I S A SPEC I AL CASE
595 026C 75 03 "NZ A2
596
597
026E
0271
E9 0380 R
A21 ""P GET_PARM_N
6.,
600 0274 83 EC 08 SUB SP,8 ALLOCATE SPACE FOR THE COMMAND BLOCK
ON THE STACK.
602 0277 53 PUSH BX SAVE REGISTERS DURING OPERATION
603 0278 51 PUSH ex
604 0279 52 PUSH ox
605 027A IE PUSH DS
606 0278 06 PUSH ES
607 02IC 56 PUSH 51
608 0270 57 PUSH DI
609 027E 8E ---- R NOV 51 ,DATA
610 0281 8E DE NOV DS,SI J ESTABLISH DATA SEGMENT
6"
612 0283 E8 0200 R CALL DISK_IO_CONT PERFORM THE OPERATION
613
614 0286 SO PUSH AX
615 0287 E8 0232 R CALL DSBL BE SURE 0 I SABLES OCCURRED
616 028A 88 ---- R MOV AX,DATA
617 0280 8E 08 MOV DS,AX ESTA8L I SH SEGMENT
618 028F 58 POP AX RESTORE THE REGI STERS
619 0290 8A 26 0074 R MOV AH,DISK STATUS GET STATUS FROM OPERATION
620 0294 SF POP DI -
621 0295 5E POP 51
622 0296 07 POP ES
623 0297 IF POP OS
624 029B SA POP OX
625 0299 59 POP ex
626 029A 5B POP BX
621
628 0298 83 C4 08 ADD SP,8 ADJUST FOR THE COMMAND BLOCK.
629 029E 50 POP BP RESTORE 8ASE POINTER
630 029F BO FC 01 eMP AH, I SET THE CARRY FLAG TO INDICATE
631 02A2 FS eMe SUCCESS OR FAILURE
632 02A3 CA 0002 RET THROW AWAY SAVED FLAGS
633 02A6 DISK_IO ENDP
.34 PAGE
635 02A6 MI LA8EL WORD FUNCT [ON TRANSFER TA8LE
636 02A6 032E R OW DISK RESET OOOH
637 02A8 0347 R OW RETURN STATUS 001 H
638 02AA 0350 R OW DISK READ 002H
639 02AC 0359 R OW DISK-WR[TE 003H
640 02AE 0362 R OW 01 SK-VERF 004H
641 0280 0369 R OW FMT TRK DOSH
642 0282 036F R OW FMT-BAD D06H
643 0284 0375 R OW FMT-DRV D07H
644 0286 0326 R OW 8AD-COMMAND OOSH
645 0288 043F R OW [NIT DRV 009H
646 028A 04F4 R OW RD LONG OOAH
647 028C 0501 R OW WR-LONG 008H
648 028E 0515 R OW D 15K SEEK DOCH
649 02CO 032E R OW DISK-RESET OODH
650 02C2 0518 R OW RD 8UFF OOEH
651 02C4 0527 R OW WR-8UFF OOFH
652 02C6 0533 R OW TST ROY OIOH
653 02C8 0539 R OW HOISK RECAL OIIH
654 02CA 053F R OW RAM OTAG QI2H
655 02CC 0545 R OW CHK-DRV o 13H
656 02CE 0548 R OW CNTLR DIAG 014H
657 '" 002A MIL EQU $-M1 -
.58
659 0200 01 SK 10 CONT PROC NEAR
660 0200 80 FC 01 - -CMP AH,OIH RETURN STATUS
661 0203 74 72 JE RETURN_STATUS
•• 2
CONVERT DR I VE NUM8ER TO 0 8ASED RANGE
...
663 0205 80 EA 80 5UB DL ,080H
664 0208 80 FA 08 e"p DL,MAX FILE LEGAL DR I VE TEST
665 0208 73 49 JAE 8AO_COMMAND
..•••,
•• 0
•• 2
PAGE
I NIT I AL I ZE DR I VE CHARACTER I ST I CS
•••
•••
FIXED DISK PARAMETER TABLE
...•••
•••
•• 7
.70
THE TABLE IS COMPOSED OF A BLOCK DEFINED AS:
(I
(I
(I
WORD)
BYTE)
WORD)
-
-
-
MAXIMUM NUMBER OF CYLINDERS
MAXIMUM NUMBER OF HEADS
STARTING REDUCED WRITE CURRENT CYL
.71 (I WORD) - STARTING WRITE PRECOMPENSATION CYL
."
.72
.,.
.7.
II
II
BYTE}
BYTE)
-
-
MAXIMUM ECC DATA BURST LENGTH
CONTROL BYTE IDRIVE STEP OPTION)
.7..77 BIT
BIT
1 DISABLE DISK-ACCESS RETRIES
6 DISABLE ECC RETRIES
..,
.7'
•• 0
•• 2
•••
II
(1
(I
(I
(I
(I
BYTE)
BYTE)
BYTE)
WORD)
BYTEl
BYTE)
-
-
-
-
-
-
STANDARD TIME OUT VALUE (SEE BELOW)
TIME OUT VALUE FOR FORMAT DRIVE
T I ME OUT VALUE FOR CHECK OR I VE
LAND I NG ZONE
SECTORS/TRACK
RESERVED FOR FUTURE USE
•••
••• - TO DYNAMICALLY DEFINE A SET OF PARAMETERS
•••
•• 7
BUILD A TABLE OF VALUES AND PLACE THE
CORRESPONDING VECTOR INTO INTERRUPT 41 •
..•••••••••,
•• 0
NOTE: THE DEFAULT TABLE IS VECTORED
AN INTERRUPT 19H (BOOTSTRAP)
IN FOR
...••••••
•• 2 ON THE CARD SW ITCH SETT I NGS
ON:
DRP/E 0
I
DRIVE I
I
.'7 I -1- -2- I -3- -4-:
•••
•••
OFF I :
• 00
.0..0.
'01
'02
TRANSLATION TABLE
DRIVE 0
1/2
: DRIVE I
3/4
: TABLE ENTRY
'0'
'0. ON ON : ON ON
.0..,0
'07
'0.
ON OFF
OFF ON
OFF OFF
:
:
:
ON OFF
OFF ON
OFF OFF
:
:
:
..
.11
912
.,,.
913 03FF FD_TBL:
.2.'.0
921 0400 II DB 0170 SECTORS/TRACK
928 040E 00 DB 0 RESERVED
;----- OR I VE TABLE I
.31
932 040F 0264 OW 06120 MAX CYL I NDERS
933 0411 04 DB 0.0 MAX HEADS
934 0412 0264 OW 06120 START REDUCED WRITE CURRENT CYL
935 0414 0000 OW 0 START WRITE PRECOMPENSATION CYL
936 0416 OB DB OBH MAX ECC BURST DATA LENGTH
931 0411 05 DB 0000010lB CONTROL BYTE
938 0418 28 DB 028H STANDARD TIME OUT
939 0419 EO DB OEOH T I ME OUT FOR FORMAT DR I VE
940 041A 42 DB 042H T I ME FOR CHECK DR I VE
941 041B 0297 OW 06630 LAND I NG ZONE
942 0410 11 DB 0110 SECTORS/TRACK
943 041E 00 DB 0 RESERVED
•••
••• ;----- DRIVE TABLE 2
•••
947 041F 0267 OW 06150 MAX CYLI NOERS
948 0421 04 DB 0.0 MAX HEADS
949 0422 0267 OW 06150 START REDUCED WRITE CURRENT CYL
950 0424 01 2C OW 03000 START WRITE PRECOMPENSATION CYL
951 0426 OB DB OBH MAX ECC BURST DATA LENGTH
952 0427 05 DB OOOOOIOIB CONTROL BYTE
953 0428 28 DB 028H STANDARD TIME OUT
954 0429 EO DB OEOH TIME OUT FOR FORMAT DRIVE
955 042A 42 DB 042H TIME FOR CHECK DRIVE
956 042B 0267 OW 06150 LAND I NG ZONE
957 0420 It DB 0170 SECTORS/TRACK
..•••,
958 042E 00 DB 0 RESERVED
97.
975 ; ----- - -- ------ ---- - - --------- -------- ----------- -----
976 ; INITIALIZE DRIVE (AH = 09H) :
977
978
979 043F PROC NEAR
980
981 DO OR I VE ZERO
982
983 043F C6 46 F8 OC "OV CMD BLOCK+O, INIT ORV CMD
984 0443 C6 46 F9 00 "OV CMD-BLDCK+I,O - - SET FOR DR I VE 0
985 0447 E8 0458 R CALL INIT DRV R SEND THE PARAMETERS
986 044A 72 08 JC INIT::::DRV::::OUT ERROR?
987
988 DO DRIVE ONE
989
990 044C C6 46 F8 OC "OV CMD 8LOCK+O,INIT DRV CMD
99 I 0450 C6 46 F9 20 "OV CMD-BLOCK+l,OOtOOOOOB SET TO DRIVE I
992 0454 E8 0458 R CALL INIT_DRV_R SEND THE PARAMETERS
993 0457 INIT DRV OUT;
994 0457 C3 - RET EXIT
995 0458 lNIT_ORV
996
997 0458 INIT DRV R PROC NEAR
998 0458 2A CO - SUB AL,AL
999 045A E8 057C R CALL COMMAND I SSUE THE COMMAND
10000450 73 01 JNC BI OX = PORT 0 AFTER CALL
1001 045F C3 RET
\ 002 0460 61 :
1003 0460 8C 09 "OV CX,DS SAVE SEGMENT
1004
1005 ASSUME DS:ABSO
1006 0462 28 CO SUB AX ,AX
1007 0464 8E 08 "OV DS,AX ESTA8L I SH SEGMENT
10080466 C4 IE 0104 R LES 8X ,HF TBL VEC LOAD THE TABLE VECTOR
1009 046A 8E 09 "OV DS,CX- - RESTORE SEGMENT
1010
101 I ASSUME DS:DATA
1012 . - - - - ------ - -- - - ---- - - - - ---- -----
1013 ; DETERMINE PARAMETER TABLE OFFSET
1014 US I NG CONTROLLER PORT TWO AND
1015 DRIVE NUMBER SPECIFIER (0-1)
1016
1017 046C 42 INC OX
1018 0460 42 INC ox ADDRESS PORT 2
1019 046E EC IN AL,DX READ THE SW ITCH SETT I NGS
1020 046F 8A 66 F9 "OV AH ,CMD_BLOCK+ I
1021 047280 E4 20 ANO AH,OOIOOOOOB DRIVE 0 OR I
1022 0475 75 04 JNZ B2
1023 0477 DO E8 SHR AL, I ADJUST
1024 0479 00 E8 SHR AL, I
1025 0478 B2:
1026 0478 24 03 ANO AL,Ol18 ISOLATE
1027 0470 81 04 "OV CL,4
1028 047F 02 EO SHL AL,CL ADJUST
10290481 2A E4 SUB AH,AH
1030 0483 03 08 AOO 8X ,AX
1031 04858409 "OV AH,OOOOl0018 SET MASK FOR DATA MODE CPU TO CARD
1032
1033 SEND DRIVE PARAMETERS MOST SIGNIFICANT BYTE FIRST
1034
10350487 SF 0001 "OV DI, I SEND MS8 OF MAX CYLINDER
1036 048A E8 04E9 R CALL INIT DRV S
1037 0480 72 4C JC 83 - -
1038
1039 048F 8F 0000 "DV PI,O SEND LS8 OF MAX CYL I NDER
1040 0492 E8 04E9 R CALL INIT DRV S
1041 0495 72 44 JC 83 - -
1042
1043 0497 8F 0002 "DV 01,2 SEND THE MAX I MUM HEADS
1044 049A E8 04E9 R CALL INIT DRV S
1045 0490 72 3C JC 83 - -
1046
1047 049F 8F 0004 "OV DI,4 SEND MS8 OF REDUCE WR I TE CURRENT
1048 04A2 E8 04E9 R CALL INIT DRV S CYL I NDER
1049 04A5 72 34 JC 83 - -
t 050
1051 04A7 8F 0003 "OV o [,3 SEND LSB OF REDUCE WRITE CURRENT
1052 04AA E8 04E9 R CALL INIT DRV S CYLINDER
1053 04AD 72 2C JC 83 - -
1054
1055 04AF BF 0006 "OV o [,6 SEND MSB OF WR I TE PRECOMP CYL I NDER
1056 04B2 E8 04E9 R CALL INIT DRV S
1057 0485 72 24 JC 83 - -
\ 058
1059 04B7 SF 0005 "OV DI,5
1060 048A E8 04E9 R CALL INIT DRV S
1061 048072 IC JC B3 - -
1062
1063 04BF 6F 0007 "OV 01,7 SEND ECC BURST LENGTH
1064 04C2 E8 04E9 R CALL [NIT DRV S
1065 04C5 72 14 JC 83 - -
1066
1067 04C7 BF 0008 "OV 01,8 LOAD THE CONTROL BYTE AND PLACE IN
1068 04CA 26: 8A 01 "OV AL, ES: [8X+D I] MEMORY AT 40:76H
1069 04CD A2 0076 R "OV CONTROL_ 8YTE, AL
1070
1071 040026 C9 SUB CX,CX
1072 0402 B4 OF "DV AH,OOOOl1118
10730404 85:
1074 0404 E8 0680 R CALL HD WA IT GO WA I T FOR THE STATE TO HAPPEN
1075 0407 73 09 JNC B6- JMP TO READ THE STATUS 8YTE
1076 0409 E2 F9 LOOP B5 TRY AGAIN
1077 0408 83:
1078 0408 C6 06 0074 R 07 "OV DISK STATUS,INIT_FAIL OPERATION FAILED
1079 04EO F9 STC SET THE ERROR eOND I T I ON
1080 04E I C3 RET
1081 04E2 B6:
1082 04E2 4A OEC DX ADDRESS PORT 0
1083 04E3 EC IN AL,DX READ STATUS BYTE OF THE OPERATION
1084 04E4 24 02 ANO AL,2 MASK ERROR 81T
1085 04E6 75 F3 JNZ 83 ERROR 81T SET?
1086 04E8 C3 RET
1087 04E9 INIT_DRV_R ENDP
1088
1089 SEND THE BYTE OUT TO THE CONTROLLER
\ 090
\09\ 04E9 INIT DRV S PROC NEAR
1092 04E9 E8 0680 R - CALL HD WA I T GO WA I T FOR REQUEST
1093 04EC 12 05 JC D'- AFTER CALL OX = PORT 1
1094 04EE 411. DEC DX ADDRESS PORT 0
1095 04EF 26: MOV AL,ES: [BX+Ol ]
10<;16 04F2 EE OUT aX,AL WRITE THE OATil. TO THE CARD
1097 04F3 01 :
1098 04F3 C3 RET
1099 04F4 lNIT_DRV_S ENDP
1100
1101
I 102 READ LONG (AH = OAHI :
1 103
I 104
1I0504F4 RD_LONG PROC NEAR
1106 04F4 E8 050E R CALL CHK LONG ; CHECK LIM I TS
1101 04F7 12 SF JC GS -
1108 04F9 C6 46 F8 E5 MDV CMD BLOCK+O,RD LONG CMD
I 109 04FO BO 47 MDV AL,DMA READ - -
I I \ 0 04FF EB 50 JMP SHORT - DMA OPN
I I I I 050 I ENDP -
II \2
1113
1114 ,----
;
WR ITE LONG (AH = OBHI :
1115
1116
1111 050 I WR_LONG PROC NEAR
1118 0501 E8 050E R CALL CHK LONG ; CHECK LIM I TS
1 I 19 0504 12 52 JC GS -
1120 0506 C6 46 F8 E6 MOV CMD BLOCK + 0, WR LONG CMD
1 121 05011. 80 4B MDV AL,DMA WRITE - -
I 122 050C E8 50 JMP SHORT - OMA OPN
1123 050E WR_LONG ENOP -
1124
1125 050E CHK LONG PROC NEAR
1126 050E 811. 46 FC - MOV AL,CMD BLOCK+4 LOAD THE NUMBER OF SECTORS
11210511 3C 80 CMP AL,080H COMPARE WITH LIMITS
1128 0513 F5 CMC SET THE COND I T I ON
1129 0514 C3 RET
11300515 CHK_LONG ENDP
::.~~
1133 SEEK IAH = OCH) :
1134
1135
1136 0515 DISK SEEK PROC NEAR
1131 0515 C6 46 F8 OB - MOV CMD BLOCK+O, SEEK CMD
11380519 E8 34 JMP SHORT NOMA OPN-
11390518 01 SK_SEEK ENDP -
1140
1141
1142 READ SECTOR BUFFER (AH = OEHI :
1143
1144
1145 051B RD BUFF PROC NEAR
1146 0518 C6 46 F8 OE - MOV CMO BLOCK+O,RD BUFF CMD
1141 051F C6 46 FC 01 MDV CMD-BLOCK+4,1 - - ONLY ONE BLOCK
1148 0523 BO 41 MDV AL,OMA READ
1149 0525 EB 31 JMP SHORT - DMA_OPN
I 150 0527 RD_BUFF ENDP
1151
1152
1153
1154
,-----
;
WR I TE SECTOR 8UFFER (AH = OFHI
1155
1156 0521 WR BUFF PROC NEAR
11510521 C6 46 F8 OF - MOV CMO BLOCK + 0 • WR BUFF CMD
1158 052B C6 46 Fe 01 MDV CMD-BLOCK+4, 1 - - ONLY ONE BLOCK
1159 052F BO 4B MOV AL,OMA WRITE
1160 0531 EB 28 JMP SHORT - OMA _ OPN
11610533 WR _BUFF ENDP
1162
1163 ._-------------------------------------------------------
1164 ; TEST DISK READY (AH = OIOHI :
1165
1166
1 167 0533 TST ROY PROC NEAR
1168 0533 C6 46 F8 00 - MOV CMD 8LOCK+O, TST ROY CMD
1169 0537 EB 16 JMP SHORT NDMA_OPN -
1110 0539 TST_ROY ENDP
1111
1112 ; --- ------ - ---------- ------------- ----
1113 ; RECAL I BRATE (AH = 011HI :
1114
1175
11760539 HD I SK RECAL PROC NEAR
1111 0539 C6 46 F8 01 - MOV CMD BLOCK+O,RECAL CMD
11180530 EB 10 JMP SHORT NOMA OPN -
1119053F HDISK_RECAL ENDP -
180 PAGE
181 ; - - ---------------- ----------- - ------- - --- - - --- ----------
182 ; CONTROLLER RAM DIAGNOSTICS IAH = 012HI :
183
184
185 053F RAM DIAG PROC NEAR
186 053F C6 46 F8 EO - MOV CMD BLOCK+O,RAM DIAG CMD
181 0543 E8 OA J"P SHORT NOMA OPN -
188 0545 RAM_D I Ar::. ENOP -
189
190
1191 DR I VE 0 I AGNOSTI CS (AH = 013HI :
1192 ; ------ -- ---- ------ - ---------------- --------- ------ - -----
1193
1194 0545 CHK DRV PROC
11950545 C6 46 F8 E3 - MOV
1196 0549 E8 04 J"P
1191 0546 CHK_DRV ENOP
1198
1199 ; --- - -------- ------ --------------------------- ----------
1200 ; CONTROLLER INTERNAL DIAGNOSTICS {AH = 014Hl :
1201
1202
1203 0548 CNTLR DI AG PROC NEAR
1204 0548 C6 46 F8 E4 - MOV CMD BLOCK + 0 ,CNTLR 0 I AG CMO
1205 054F CNTLR_D I AG ENDP --
1206
1201 ; ------- -- ----- ------- ------ - --------- --------- ----- - ----
1208 ; SUPPORT ROUT! NES
1209
1210
1211054F NOMA OPN:
1212 054F BO 02 - MOV AL,02H
1213 0551 E8 057C R CALL COMMAND I S SUE THE COMMAND
1214 0554 72 22 JC Gil
1215 0556 EB 16 J"P SHORT G3
1216 0558 G8:
12110558 C6 06 0074 R 09 "OY
1218 0550 C3 RET
1219 055E OMA OPN:
1220 055E E8 06A5 R - CALL OMA SETUP SET UP FOR OMA OPERAT I ON
1221 0561 72 F5 JC G8 -
1222 0563 BO 03 "OY AL,03H
1223 0565 E8 051C R CALL COMMAND I SSUE THE COMMAND
1224 0568 12 OE JC Gil
1225 056A BO 03 "OY AL,03H
1226 056C E6 OA OUT DMA+l0,AL INITIALIZE THE DISK CHANNEL
1227 056E G3:
1228 056E FA CLI NO INTERRUPTS
1229 056F E4 21 IN AL,INTAOI READ THE MASK
1230 0511 24 OF AND AL,ODFH ENABLE IRQ-5
1231 0513 E6 21 OUT INTA01,AL WR I TE THE MASK OUT
1232 0515 E8 0700 R CALL WAIT_INT PROCEDURE DOES ST I
1233 0518 Gil:
1234 0518 E8 05AD R CALL ERROR_CHK SEE I F THERE I S AN ERROR
1235 051B C3 RET EXIT
1236
1237 ; --------- --------- ----------------- - -------------------
1238 ; COMMAND
1239 ; INPUT TH I S ROUT I NE OUTPUTS THE COMMAND BLOCK
1240
1241 AL = CONTROLLER DMA/INTERRUPT REGISTER MASK
1242
1243
1244
1245 051C COMMAND PROC NEAR
1246 051C E8 0160 R CALL PORT 0 GET THE BASE ADDRESS
1241 051F 42 INC OX -
1248 0580 42 INC OX ADDRESS PORT 2
12490581 EE OUT DX,AL I SSUE CONTROLLER SELECT PULSE
1250 0582 42 INC OX ADDRESS PORT 3
1251 0583 2B C9 SUB CX,CX WA IT COUNT
1252 0585 EE OUT DX,AL WRITE DMA MASK REGISTER
1253 0586 4A DEC OX
1254 0581 4A DEC OX ADDRESS PORT 1
1255 0588 WAIT BUSY:
1256 0588 EC - IN AL,DX READ THE HARDWARE STATUS
1251 0589 24 OF AND AL,OFH
1258 0586 3C 00 C"P AL,Rl BUSY OR RI BUS OR Rl REQ ; CHECK FOR BUSY,COMMAND
1259 0580 14 09 JE CI - - -; AND REQUEST BITS
1260 058F E2 F1 LOOP WA I T BUSY KEEP TRY I NG
1261 0591 C6 06 0014 R 80 "OY 01 SK::::STATUS, T I ME_OUT
1262 0596 F9 STC SET THE ERROR CONo I T I ON
1263 0597 C3 RET ERROR RETURN
1264 0598 CI:
1265 0598 B9 0006 "OY CX,6 SET FOR 6 BYTES OF COMMAND
1266 0598 4A DEC OX ADDRESS PORT 0
1261 059C 88 F5 "OY SI,BP SAVE THE BASE POINTER
1268 059E 83 ED 08 SUB BP,8 SET FIRST BYTE OF COMMAND BLOCK
1269 05AI FA CLI NO I NTERRUPTS I N COMMAND SEQUENCE
1210 05A2 CM3:
1271 05A2 8A 46 00 "OY AL, {BP] GET A COMMAND BYTE
1212 05A5 EE OUT DX,AL ALLOW AT LEAST 2us BETWEEN EACH BYTE
1213 05A6 45 INC BP ON SEND I NG THE COMMAND SEQUENCE.
1274 05A1 E2 F9 LOOP C"3 DO MORE
1215 05A9 88 EE "OY BP,SI RESTORE THE BASE POINTER
1216 05A8 F8 STI I NTERRUPTS BACK ON
1211 05AC C3 RET
1218 05AD COMMAND ENDP
1219 PAGE
1280
1281
:
;
-- - -- -- -- - -- - -- -- -- ----- - - -- --- --- - -- -- - - -- - --- - ---- ---
1282 ; SENSE STATUS BYTES
1283 ; BYTE 0
1284 ; BIT 1 ADDRESS VALID, WHEN SET
1285 ; B[T 6 SPARE, SET TO ZERO
1286 ; BITS 5-4 ERROR TYPE
1281 ; BITS 3-0 ERROR CODE
1288 ;
1289 ; BYTE 1
1290 BITS 7-6 ZERO
1291 ; 81T 5 DRIVE (0-1)
1292 ; B[TS 4-0 HEAD NUMBER
1293 ;
1294 ; BYTE 2
1295 ; 81TS 1-5 CYL! NDER HIGH
1296 ; BITS 4-0 SECTOR NUMBER
1291 ;
1298 ; BYTE 3
1299 ; B[TS 1-0 CYLI NOER LOW
1300 ;
1301 i - ---- - - ---------- ----- ----------- ----------------------
1302
1303 05AD ERROR CHK PROC NEAR
1304 05AD AO 0074 R - MOV AL,DISK STATUS ; CHECK IF THERE WAS AN ERROR
1305 0580 OA CO OR AL,AL - ; ANYTHING IN AL?
13060582 15 01 JNZ 021
1301 0584 C3 RET
1308
1309 .-------------- ---- --------------
t 31 0 ; PERFORM SENSE STATUS
1311
1312 SENSE STATUS CAN BE ISSUED MULTIPLE
1313 TIMES
13140585 G21 :
13150585 C6 46 F8 03 MDV CMD BLOCK+O, SENSE CMO
13160569 2A CO SUB AL,AL - WRITE ZERO IN INT/OMA MASK
13110568 E8 051C R CALL COMMAND [SSUE SENSE STATUS COMMAND
1318 058E 1226 JC 024 CANNOT RECOVER-EX I T WITH COMMAND
1319 ERROR
1320 05CO 28 FF SUB DI,OI SET [NDEX PO I NTER TO ZERO
1321 05C2 89 0004 MDV CX,4 READ FOUR BYTES
1322 05C5 84 DB MDV AH,OOOOIOIIB SET MASK FOR DATA MODE CARD TO CPU
1323 05C7 G22:
1324 05C1 E8 0680 R CALL HO WA I T GO WAIT FOR DATA INPUT STATE
1325 05CA 72 lA JC G24
1326 05CC 4A DEC OX ADDRESS PORT 0
1327 05CD EC IN AL,DX READ THE DATA BYTE
1328 05CE 88 43 F8 MDV [OI+CMD BLDCK],AL STORE AWAY SENSE BYTES
1329 0501 47 INC 01 - NEXT DATA LOCAT[ON
t 330 0502 E2 F3 LOOP 022 LOOP TILL ALL FOUR READ.
1331 0504 B4 OF MDV AH,OOOO! II IB SET THE MASK FOR STATUS MODE
1332 0506 E8 0680 R CALL HD WAIT GO WAIT FOR STATUS STATE
1333 0509 12 DB JC G24
1334 05DB 4A DEC OX ADDRESS PORT 0
1335 05DC EC IN AL,OX READ THE STATUS BYTE
1336 0500 A8 02 TEST AL,2 SENSE OPERATION FAIL?
1331 05DF 14 OF JZ STAT_ERR GO GET THE ERROR.
1338
1339 05E 1 C6 06 0074 R FF MDV DISK_STATUS. SENSE_FA I L SET SENSE OPERAT[ON FAIL
1340 05E6 G24:
1341 05E6 F9 STC
1342 05E7 C3 RET
1343 05E8 ERROR_CHK ENDP
1344
1345 05E8 061E R T_O OW TYPE 0 ERROR TYPE .JUMP T A8LE
1346 05EA 062B R OW TYPE-I
1341 05EC 0660 R OW TYPE-2
1348 OSEE 061A R ow TYPE::)
1349
1350 05FO STAT ERR:
1351 05FO 8A 5E F8 - MOV BL,CMD BLOCK+O GET ERROR BYTE
1352 05F3 8A C3 MDV AL,BL -
1353 05F5 24 OF AND AL,OFH
1354 05F7 80 E3 30 AND BL,00110000B ISOLATE THE TYPE OF ERROR
1355 05FA 2A FF SUB BH,BH
1356 05FC BI 03 MDV Cl,3
1351 05FE 03 EB SHR BX, CL ; AD.JUST
13580600 2E: FF A1 05E8 R JMP WORD PTR CS:{8X + OFFSET T_O)
1359
1360 0605 TYPEO TABLE LABEL BYTE
1361 0605 00 20 40 CC 80 00 - DB 0, BAD _ CNTLR ,BAD_SEEK, WR I TE_F AUL T , T [ME_OUT. 0 ,BAD_CNTLR
1362 20
1363 060C 00 40 DB o ,BAD SEEK
1364 = 0009 TYPEO_LEN EQU - S-TYPEO_TABLE
1365
1366 060E TYPE 1 TABLE LABEL BYTE
1361 060E 04 10 02 00 04 - DB RECORD NOT FND. BAD ECC, BAD ADDR MARK. 0, RECORD NOT FNO
1368061340 00 00 II DB DB BAD SEEK ,0-;-0 ,DATA C:ORRECTED,BAO-TRACK --
1369 = OOOA TYPE I_LEN EQU- S-TYPEI_TABLE -
1310
1371 0618 TYPE2 TABLE LABEL BYTE
1372 0618 01 02 01 - DB BAD CMO ,BAD ADDR MARK ,BAD CMD
1313 = 0003 TYPE2_LEN EQU- S-TYPE2_TABLE -
1374
1315 061B TYPE3 TABLE LABEL BYTE
- DB
1316 061B 20 20
1371= 0003 TYPE3_LEN ~~~_CNTL~~ ~~~E~~~~~L~AD _ ECC
1318 PAGE
1319 TYPE 0 ERROR
1380
1381 ablE
1382 ablE BB 0605 R MOV eX,OFFSET TYPED TABLE
1383 Ob21 3C 09 eMp AL,TYPEO LEN - CHECK I F ERROR I S OEF I NED
1384 0623 13 62 "AE UNDEF ERR L
1385 0625 2E: 01 XLAT CS:TYPEO TABLE T ABLE LOOKUP
! 386 Ob21 A2 0014 R MOV 01 SK_STATUS,AL SET ERROR CODE
1381 062A C3 RET
1388
1389 :------ TYPE I ERROR
t 390
1391 062B TYPE_l :
1392 Ob2B BB ObOE R MOV BX,OFFSET TYPE I_TABLE
1393 Ob2E 8B CB MOV CX,AX
1394 0630 3C OA eMP AL, TYPE 1 LEN CHECK I F ERROR IS OEF I NED
1395 0632
139b Ob34
13 53
2E: 01
"AE
XLAT
UNOEF ERR L
CS:TYPEI TABLE T ABLE LOOKUP
1391 Ob36 A2 0014 R MOV DISK STATUS,AL SET ERROR CODE
1398 0639 80 E 1 08 AND CL,OSH CORRECTED ECC
1399 063C 80 F9 OB eMP CL ,08H
1400 Ob3F 15 29 "NZ G30
140 I
1402 OBTAIN ECC ERROR BURST LENGTH
1403
1404 0641 C6 46 F8 00 MOV ~~~ A~LOCK + 0 ,RD _ ECC _ CMO
1405 Ob45 2A CO SUB
1406 0641 E8 051C R CALL COMMAND I SSUE THE COMMAND
1401 064A 12 IE X G30
1408 064C B4 OB MOV AH,OOOOI01IB SET MASK FOR DATA INPUT CARD TO CPU
1409 Ob4E E8 06BO R CALL HD WAI T GO WAIT FOR THE INPUT STATE
1410 0651
1411 0653
12
4A
17 "e
DEC
GiO
OX ADDRESS PORT 0
1412 Ob54 EC IN AL,OX READ THE LENGTH OF THE ERROR
1413 0655 8A C8 MOV CL,AL CORRECTED AND SAVE IN CL
1414 0657 B4 OF MOV AH,OOOOIIIIB SET MASK FOR STATUS STATE
14150659 E8 0680 R CALL HD WAI T GO WAIT FOR STATUS STATE
1416 065C
1417 Ob5£
72
4A
OC "e
DEC
G30
OX ADDRESS PORT 0
1418 065F £C IN AL.DX READ THE STATUS BYTE
14190660 A8 02 TEST AL,2 ERROR BIT SEn
1420 0662
1421 0664
14
C6
Ob
06 0074 R 20
"Z
MOV
G30
01 SK_ST ATUS, BAD_CNTLR
1422 Ob69 F9 STG
1423 066A G30 :
1424 066A 8A Cl MOV AL,CL
1425 066C C3 RET
1426
1427 TYPE 2 ERROR
1428
1429 0660
1430 0660 BB 0618 R MOV BX, OFFSET TYPE2 TABLE
1431 Ob70 3C 03 eMp AL. TYPE2 LEN - CHECK I F ERROR I S DEF I NED
1432 0672 13 13 "AE UNDEF ERR L
1433 0674 2£: 07 XLAT CS :TYPE2 TABLE TABLE LOOKUP
1434 0676 A2 0074 R "OV DISK_STATUS,AL SET ERROR CODE
1435 0679 C3 RET
1436
1437 TYPE 3 ERROR
143B
1439 061A
1440 067A BB 061B R MOV BX, OFFSET TYPE3 TABLE
1441 0670 3C 03 eMp AL, TYPE3 LEN - CHECK I F ERROR I S OEF I NED
1442 067F 13 06 "AE UNDEF ERR L
1443 0681 2E: 07 XLAT CS: TYPE3 TABLE T ABLE LOOKUP
1444 0683 A2 0074 R "OV 01 SK_STATUS,AL SET ERROR CODE
1445 0686 C3 RET
1446
1447 0687 UNDEF ERR L:
1448 Ob87 C6 Ob 0074 R BB - MOV DISK_STATUS, UNDEF _ERR
1449 068C C3 RET
1450
1451 .- - - - - -- - - - - - - -- - - - - -- - - - - -- - - - - - - --
- - -
1452 ; ON ENTRY AH CONTA I NS THE CONTROLLER BUS STATUS DECODE :
1453
1454 .; - MASK USED TO CHECK THE HARDWARE STATUS. :
- - - - - - - -- - - - - - - - -- - - - -- - - - -- - - - - -- - - - - - - - - -- -- - - - - - ---
-
1455 Ob80 HD_WAIT PROC NEAR
1456 0680 51 PUSH CX SAVE CX
1451 068E 2B C9 SUB CX, CX SET THE LOOP COUNT
1458 0690
1459 0690 E8 0760 R CALL PORT 0
1460 0693 42 INC OX - PORT 1 ADDRESS
1461 0694 £C IN AL,DX READ-THE HARDWARE STATUS
1462 0695 24 OF AND AL,OOOOIIIIB CLEAR UPPER NIBBLE OF HARDWARE STATUS
1463 0697 3A C4 eMp AL,AH CHECK THE STATE WITH THE MASK
1464 0699
\ 465 069B
74
E2
08
F3
"Z
LOOP
L2
LI
.)MP t F o. K Wt TH CARRY CLEARED
TRY AGAIN
1466 0690 C6 06 0074 R 80 "OV o t SK_ST ATUS. T I ME_OUT
1467 06A2 F9 STe SET ERROR CONO I T I ON
1468 06A3 L2:
1469 06A3 59 ex RESTORE CX
1470 06A4 C3
1471 06A5
1472 PAGE
1413 ; -------------- -----------------------------
1474 DMA SETUP
1475 ; - THIS ROUTfNE SETS UP FOR DMA OPERATIONS.
1476 INPUT
1477 (ALl =
MODE BYTE FOR THE DMA
1478 (ES:BX) =
ADDRESS TO READ/WRITE THE DATA
1479 OUTPUT
1480 ; (AX' DESTROYED
148 I ; ----------- - -------------------------------------------
1482
1483 06A5 DMA SETUP PROC NEAR
1484 06A5 80 7E FC 81 - CMP CMO BLOCK +4,81 H BLOCK COUNT OUT OF RANGE
1485 06A9 72 02 JB JI -
1486
1487 06AB F9 STC SET THE ERROR COND I T I ON
1488 06AC C3 RET
1489
1490 D6AD ,)1:
1491 06AD FA CLI NO MORE INTERRUPTS
1492 D6AE E6 DC OUT DMA+12,AL SET THE FIRSTfLAST FIF
1493 06BO BI 04 MOY CL,4 SH 1FT COUNT
1494 0682 E6 08 OUT OMA+ I I,AL OUTPUT THE MODE 8YTE
1495 0684 8C CO MOY AX,ES GET THE ES VALUE
1496 D6B6 D3 CO ROL AX,CL ROTATE LEFT
1497 06B8 8A E8 MOY CH,AL GET HIGHEST NIBBLE OF ES TO CH
1498 068A 24 FO AND AL,OFOH ZERO THE LOW NIBBLE FROM SEGMENT
1499 D6BC 03 C3 ADD AX,BX TEST FOR CARRY FROM ADD I T I ON
1500 D6BE 80 05 00 AOC CH,O CARRY MEANS HIGH 4 B[TS MUST BE [NC
1501
1502 06CI 88 FO MDY S[ ,AX SAVE START ADDRESS
1503 06C3 E6 06 OUT DMA+6,AL OUTPUT LOW ADDRESS
1504 06C5 8A C4 MOY AL,AH
1505 06C7 E6 06 OUT DMA+6,AL OUTPUT HIGH ADDRESS
1506 06C9 8A C5 MOY AL,CH GET HIGH 4 BITS
1507 06CS 24 OF AND AL,OFH
1508 06CO E6 82 OUT DMA_HIGH,AL OUTPUT THE HIGH 4 BITS TO PAGE REG
1509
1510 ;------ DETERMINE COUNT
1511
1512 06CF 8A 66 FC MOY AH,CMD BLOCK+4 RECOVER BLOCK COUNT
t 513 0602 DO E4 SHL AH, I - , MULTIPLY BY 512 BYTES PER SECTOR
1514 0604 32 CO XOR AL,AL ; CLEAR LOW BYTE
1515060648 DEC AX AND DECREMENT VALUE BY ONE
t 516
1517 HANDLE READ AND WRITE LONG (5160 BYTE BLOCKS)
1518
15190607 80 7E F8 E5 CMP CMD BLDCK+O,RD LONG CMD
1520 06DB 74 06 JE ADD4 --
1521
1522 0600 80 7E F8 E6 CMP
1523 06El 75 OF JNE
1524 06E3 ADD4:
1525 06E3 88 0204 MOY AX,516D ONE BLOCK (512) PLUS 4 BYTES ECC
1526 06E6 53 PUSH BX
1527 06E7 2A FF SUB BH,8H
1528 06E9 8A 5E FC MOY BL,CMD BLOCK+4
1529 D6EC 52 PUSH OX -
1530 D6ED F7 E3 MUL BX BLOCK COUNT TIMES 516
1531 06EF 5A POP OX
1532 06FO 58 POP BX
1533 D6FI 48 DEC AX ADJUST
1534 06F2 ,)20:
1535 06F2 86 C8 MOY CX,AX SAVE COUNT VALUE
1536 06F4 E6 07 OUT OMA+7,AL LOW BYTE OF COUNT
1537 OoF6 8A C4 MOY AL,AH
1538 06F8 E6 07 OUT DMA+7,AL HIGH BYTE OF COUNT
1539 06FA F8 ST I INTERRUPT 5 BACK ON
1540 06FB 88 C6 MOY AX,51 RECOVER ADDRESS VALUE
1541 06FD 03 Cl ADO AX,CX ADD, TEST FOR 64K OVERFLOW
1542 06FF C3 RET RETURN TO CALLER,
1543 CY SET BY ABOVE I F ERROR
1544 0700 DMA_SETUP ENDP
1545
1546
1541
:
PAGE
-;~ ~ ~-~~~--- - - - -- -- ---- -----------
1548 ; - THIS ROUTINE WAITS FOR THE FIXED DISK
1549 ; CONTROLLER TO SIGNAL THAT AN INTERRUPT
1550 ; HA S OCCURRED.
155 I
1552
1553 0700 WAIT INT PROC NEAR
1554 - ASSUME DS:ABSO
1555 0700 FB STI TURN ON INTERRUPTS
1556 0101 8C DB MO' BX,DS SAVE OS
1551 0103 2B CO SUB AX,AX
1558 0705 8E 08 MO' OS,AX EST ABL I SH SEGMENT
1559 0701 C4 36 0104 R LES SI,HF_TBL_VEC LOAD THE TABLE VECTOR
1560
1561 ASSUME OS: DATA, ES: NOTH I NG
1562 070B 8E DB MO' DS,BX RESTORE OS
1563
1564 ; -- SET TIMEOUT VALUES
1565
1566 0700 2A FF SUB SH,BH
1561 010F 26: 8A 5C 09 MO' BL ,BYTE PTR ES: [S[] (9) LOAD THE STANDARD T I ME OUT
1568 0113 8A 66 F8 MO' AH,CMD BLOCK+O
1569 0716 80 FC 04 eMP AH,FMTDRV_CMD
1510 0719 15 06 JNZ 05
1511
1512 071B 26: 8A 5C OA MO' BL,BYTE PTR ES:[S[)[OAH] LOAD THE FORMAT DR I VE
1513 071F EB 09 JMP SHORT O. T[ME OUT VALUE
15740721 80 FC E3 W5: CMP AH,CHK_DRV_CMD
1575 0724 75 04 JNZ O.
1576
1577 0726 26: 8A 5C OB MO' BL,BYTE PTR ES:[SI)[OBH) ; LOAD THE CHECK DR I VE
1578 07211. W4: CLEAR ~Y Tl ME OUT VALUE
1579 072A F8 eLC
1580 072B B8 9000 MO' AX,9000H DEV I CE WA I T INTERRUPT
1581 072E CO 15 INT 15H
1582 0730 FB ST I ENABLE [NTERRUPTS FOR PC AND
1583 XT MACH I NES.
1584 0131 2B C9 SUB CX,CX SET THE LOOP COUNT
1585
1586 WA [T FOR 1NTERRUPT
1587
1588 0733 WI:
1589 0733 E8 0160 R CALL PORT 0
1590 0736 42 INC ox - PORT I ADDRESS
1591 0131 EC IN AL,OX READ-THE HARDWARE STATUS
1592 0138 11.8 20 TEST AL,020H 0[0 I NTERRUPT OCCUR
1593 07311. 15 Oil. JNZ 02 .JUMP [F YES
1594
1595 013C E2 F5 LOOP 01 INNER LOOP
1596 013E 4B DEC BX
1591 073F 75 F2 JNZ 01 OUTER LOOP
1598
1599 0741 C6 06 0074 R 80 MOV DISK STATUS,TIME_OUT
1600 0746 W2:
1601 0746 411. DEC ox ADDRESS PORT 0
1602 0747 EC IN AL,DX READ THE STATUS BYTE
1603 0748 24 02 AND AL,2 ISOLATE THE ERROR B[T
1604 074A 08 06 0074 R OR DISK STATUS,AL SAVE I N THE STATUS
1605 074E 83 C2 03 ADO DX,3- PORT 3 ADDRESS
1606 0151 32 CO XOR AL,AL ZERO-
1607 0753 EE OUT OX,AL RESET I NTERRUPT MASK
1608 0754 C3 RET
1609
1610 0755 ENDP
1611
1612 ;--- HD INT
1613
1614 FIXED DISK INTERRUPT ODH ROUTINE IRQ-5
1615
1616
1617
1618 0155 PRoe NEAR
16190755 50 PUSH AX SAVE WORK REGISTER
1620 0156 BO 01 MOV AL,07H SET OMA MODE TO 0 I SABLE
1621 0158 E6 OA OUT DMA+IO,AL
1622 01511. FA eLi NO INTERRUPTS
1623 075B E4 21 IN AL,INTAOI LOAD THE I NTERRUPT ENABLE MASK
1624 0150 OC 20 OR AL,020H TURN OFF FIXED DISK IRQ-5
1625 015F E6 21 OUT INTAOI,AL REPLACE THE MA SK
1626 0761 BO 20 MOV AL,EOI LOAD THE END OF INTERRUPT MASK
1627 0763 E6 20 OUT [NTAOO,AL CLEAR THE ACT [VE I NTERRUPT LEVEL
1628 0165 FB STI I NTERRUPTS BACK ON
1629076688 9100 MOV AX,9100H DEV ICE POST
1630 0169 CO 15 INT 15H INTERRUPT
1631 016B 58 POP AX RESTORE AX
1632 016C CF IRET
16330160 ENDP
1634
1635
1636
: -~~~~~---------------- - -------- ---------
1631 GENERATE PROPER PORT VALUE
1638 BASED ON THE PORT OFFSET
1639
1640
1641 0160 PORT_O PROe NEAR
1642 0760 BA 0320 MOV OX,HF PORT BASE VALUE
1643 0170 02 16 0011 R ADO OL,PORT_OFF ADD [N OFFSET VALUE (00,04,08,OC)
1644 0174 C3 RET
1645 0175 PORT_O ENOP
1646
1647 0775 END ADDRESS LABEL BYTE
1648 0175 CODE ENDS
1649 END
~
addresses, port 14 fixed disk controller 1
fixed disk drive types 3
[!J
BIOS listings 23
block diagram 2 interface 15
interface signals
AEN 15
AO-AI9 15
-DACK 3 16
DO-D7 15
command summary 10 DRQ 3 15
connectors 17 -lOR 15
control byte 8 -lOW 15
controller, fixed disk 1 IRQ 5 15
RESET 15
[EJ
data register 7
description 1 logic diagrams 19
[!]
error tables 5
mM Asynchronous
Communications
Adapter
6361501
ii
Contents
Description .................................... 1
Programming Considerations ...................... 3
Modes Of Operation ......................... 3
Line-Control Register ........................ 5
Programmable Baud-Rate Generator ............ 7
Line Status Register (LSR) ................... 10
Interrupt Identification Register (IIR) .......... 12
Interrupt Enable Register .................... 14
Modem Control Register .................... 15
Modem Status Register ...................... 16
Receiver Buffer Register ..................... 18
Transmitter Holding Register ................. 19
Selecting the Interface Format and Adapter Address 20
Interrupts ................................ 21
Interface ..................................... 23
Voltage Interchange Information .............. 24
INS8250 Functional Pin Description ........... 25
Specifications ................................. 31
Logic Diagrams ................................ 33
iii
jv
Description
Asynchronous Adapter 1
• Modern control functions:
EIA
Receivers
Current Loop
25-Pin D-Sheli
Connector
2 Asynchronous Adapter
Programming Considerations
Modes Of Operation
The different modes of operation are selected by programming
the 8250 Asynchronous Communications Element. This is done
by selecting the I/O address (hex 3F8 to 3FF primary, and hex
2F8 to 2FF secondary) and writing data out to the adapter.
Address bits AO, Al, and A2, select the different registers that
define the modes of operation. Also, bit 7-the divisor latch
access bit (DLAB)-of the line-control register is used to select
certain registers.
Primary Alternate
Adapter Adapter Register Selected DLAB State
110 Decodes
Asynchronous Adapter 3
Hex Addresses 3F8 to 3FF AND 2F8 TO iFF
A9 A8 A7 A6 A5 A4 A3 A2 A1 AO DLAB Register
1 1/0 1 1 1 1 1 x x x
0 0 0 0 Receive Buffer (read).
Transmit
Holding Reg. (write)
0 0 1 0 Interrupt Enable
0 1 0 x Interrupt Identification
0 1 1 x Line Control
1 0 0 x Modem Control
1 0 1 x Line Status
1 1 0 x Modem Status
1 1 1 x None
0 0 0 1 Divisor Latch (LSB)
0 0 1 1 Divisor Latch (MSB)
Note: Bit 8 will be logical 1 for the adapter designated as primary or a logical 0
for the adapter designated as alternate (as defined by the address jumper
module on the adapter).
A2, A 1 and AO bits are "don't cares" and are used to select the different
register of the communications chip.
Address Bits
INS8250
The INS8250 has a number of accessible registers. The system
programmer may access or control any of the INS8250 registers
through the system unit's microprocessor. These registers are
used to control INS8250 operations and to transmit and receive
data. The following figure provides a listing and description of
the accessible registers.
4 Asynchronous Adapter
Register/Signal Reset Control Reset State
Interrupt Enable Register Master Reset All bits Low (0-3 Forced and
4-7 Permanent).
Interrupt Identification Master Reset Bit 0 is High, Bits 1 and 2 Low
Register Bits 3-7 are Permanently Low
Line Control Register Master Reset All Bits Low
Modem Control Register Master Reset All Bits Low
Line Status Register Master Reset Except Bits 5 and 6 are High
Modem Status Register Master Reset Bits 0-3 Low
Bits 4-7 - Input Signal
SOUT Master Reset High
INTRPT (RCVR Errors) Read LSR/MR Low
INTRPT (RCVR Data Ready) Read RBR/MR Low
INTRPT (RCVR Data Ready) Read IIRI Low
Write THR/MR
INTRPT (Modem Status Read MSR/MR Low
Changes)
OUT2 Master Reset High
RTS Master Reset High
DTR Master Reset High
OUT 1 Master Reset High
Line-Control Register
The system programmer specifies the format of the asynchronous
data communications exchange through the line-control register.
In addition to controlling the format, the programmer may
retrieve the contents of the line-control register for inspection.
This feature simplifies system programming and eliminates the
need for separate storage in system memory of the line
characteristics.
Asynchronous Adapter 5
The contents of the line-control register are as follows:
Bit 7 6 5 4 3 2 1 a
~
Word Length Select Bit a (WLSO)
Word Length Select Bit 1 (WLS1)
Number of Stop Bits (STB)
Parity Enable (PEN)
Even Parity Select (EPS)
Stick Parity
Set Break
Divisor Latch Access Bit (DLAB)
Bits 0 and 1: These two bits specify the number of bits in each
transmitted or received serial character. The encoding of bits 0
and 1 is as follows:
Bit 3: This bit is the parity enable bit. When bit 3 is a logical 1, a
parity bit is generated (transmit data) or checked (receive data)
between the last data word bit and stop bit of the serial data.
(The parity bit is used to produce an even or odd number of l's
when the data word bits and the parity bit are summed.)
6 Asynchronous Adapter
Bit 4: This bit is the even parity select bit. When bit 3 is a logical
1 and bit 4 is a logical 0, an odd number of logical 1's is
transmitted or checked in the data word bits and parity bit. When
bit 3 is a logical 1 and bit 4 is a logical 1, an even number of bits
is transmitted or checked.
Bit 5: This bit is the stick parity bit. When bit 3 is a logical 1 and
bit 5 is a logical 1, the parity bit is transmitted and then detected
by the receiver as a logical 0 if bit 4 is a logical 1, or as a logical 1
if bit 4 is a logical O.
Bit 6: This bit is the set break control bit. When bit 6 is a logical
1, the serial output (SOUT) is forced to the spacing (logical 0)
state and remains there regardless of other transmitter activity.
The set break is disabled by setting bit 6 to a logical O. This
feature enables the system unit's microprocessor to alert a
terminal in a computer communications system.
Bit 7: This bit is the divisor latch access bit (DLAB). It must be
set high (logical 1) to access the divisor latches of the baud-rate
generator during a read or write operation. It must be set low
(logical 0) to access the receiver buffer, the transmitter holding
register, or the interrupt enable register.
Asynchronous Adapter 7
Hex Address 3F8 DLAB = 1
Bit 7 6 5 4 3 2 o
BitO
Bit 1
Bit 2
Bit 3
Bit4
Bit 5
Bit 6
Bit 7
8 Asynchronous Adapter
The following figure illustrates the use of the baud-rate generator
with a frequency of 1.8432 MHz. For baud rates of 9600 and
below, the error obtained is minimal.
Asynchronous Adapter 9
Line Status Register (LSR)
This 8-bit register provides status information to the system unit's
microprocessor concerning the data transfer. The contents of the
line status register are indicated and described in the following
figure.
L:
Bit 7 6 5 4 3 2 o
Bit 0: This bit is the receiver data ready (DR) indicator. Bit 0 is
set to logical 1 whenever a complete incoming character has been
received and transferred into the receiver buffer register. Bit 0
may be reset to a logical 0 either by the system unit's
microprocessor reading the data in the receiver buffer register or
by writing logical 0 into it from the system unit's microprocessor.
Bit 1: This bit is the overrun error (OE) indicator. Bit 1 indicates
that data in the receiver buffer register was not read by the
system unit's microprocessor before the next character was
transferred into the receiver buffer register, thereby destroying
the previous character. The DE indicator is reset whenever the
system unit's microprocessor reads the contents of the line status
register.
Bit 2: This bit is the parity error (PE) indicator. Bit 2 indicates
that the received data character does not have the correct even or
odd parity, as selected by the even-parity select bit. The PE bit is
10 Asynchronous Adapter
set to logical 1 upon detection of a parity error and is reset to
logical 0 whenever the system unit's microprocessor reads the
contents of the line status register.
Bit 3: This bit is the framing error (FE) indicator. Bit 3 indicates
that the received character did not have a valid stop bit. Bit 3 is
set to logical 1 whenever the stop bit following the last data bit or
parity is detected as a zero bit (spacing level).
Bit 4: This bit is the break interrupt (BI) indicator. Bit 4 is set to
logical 1 whenever the received data input is held in the spacing
(logical 0) state for longer than a full-word transmission time
(that is, the total time of start bit + data bits + parity + stop
bits).
Asynchronous Adapter 11
Interrupt Identification Register (IIR)
The INS8250 has an on-chip interrupt capability that allows for
complete flexibility in interfacing to all the popular
microprocessors presently available. In order to provide minimum
software overhead during data character transfers, the INS8250
prioritizes interrupts into four levels: receiver line status (priority
1), received data ready (priority 2), transmitter holding register
empty (priority 3), and modem status (priority 4).
II I~~0 If 'O<o,,"p,"oodlO9
Interrupt ID Bit (0)
Interrupt ID Bit (1)
=0
' - - - - - - - -... = 0
' - - - - - - - - -...... = 0
' - - - - - - - - - - -... = 0
' - - - - - - - - - - - -........ = 0
12 Asynchronous Adapter
Bits 1 and 2: These two bits of the IIR are used to identify the
highest priority interrupt pending, as indicated in the "Interrupt
Control Functions" table.
Bits 3 through 7: These five bits of the IIR are always logical O.
Interrupt ID
Register Interrupt Set and Reset Functions
Priority Interrupt Interrupt Interrupt
Bit 2 Bit 1 Bit 0 Level Type Source Reset Control
0 0 1 - None None -
Asynchronous Adapter 13
Interrupt Enable Register
This 8-bit register enables the four types of interrupt of the
INS8250 to separately activate the chip interrupt (INTRPT)
output signal. It is possible to totally disable the interrupt system
by resetting bits 0 through 3 of the interrupt enable register.
Similarly, by setting the appropriate bits of this register to logical
1, selected interrupts can be enabled. Disabling the interrupt
system inhibits the interrupt identification register and the active
(high) INTRPT output from the chip. All other system functions
operate in their normal manner, including the setting of the line
status and modem status registers. The contents of the interrupt
enable register are indicated and described in the following figure.
Bit 7 6 5 4 3 2 1 0
L: 1 = Enable Data
Available Interrupt
1 = Enable Tx Holding Register
Empty Interrupt
1 = Enable Receive Line
Status Interrupt
1 = Enable Modem Status
Interrupt
=0
=0
=0
=0
14 Asynchronous Adapter
Bit 3: This bit enables the modem-status interrupt when set to
logical 1.
Bit 7 6 5 4 3 2 0
Bit 0: This bit controls the data terminal ready (-DTR) output.
When bit 0 is set to a high level, the -DTR output is forced to an
active low. When bit 0 is reset to low level, the -DTR output is
forced high.
Bit 1: This bit controls the request to send (-RTS) output. Bit 1
affects the -RTS output in a manner identical to that described
above for bit O.
Asynchronous Adapter 15
Bit 3: This bit controls the output 2 (-OUT 2) signal, which is an
auxiliary user-designated output. Bit 3 affects the -OUT 2 output
in a manner identical to that described above for bit O.
16 Asynchronous Adapter
input from the modem changes state. They are reset to logical 0
whenever the system unit's microprocessor reads the modem
status register.
Bit 7 6 543 2 o
Bit 0: This bit is the delta clear to send (DCTS) indicator. Bit 0
indicates that the -CTS input to the chip has changed state since
the last time it was read by the system unit's microprocessor.
Bit 1: This bit is the delta data set ready (DDSR) indicator. Bit 1
indicates that the -DSR input to the chip has changed state since
the last time it was read by the system unit's microprocessor.
Bit 2: This bit is the trailing edge of the ring indicator (TERI)
detector. Bit 2 indicates that the -RI input to the chip has changed
from an on (logical 1) to an off (logical 0) condition.
Bit 3: This bit is the delta received line signal detector (DRLSD)
indicator. Bit 3 indicates that the -RLSD input to the chip has
changed state.
Asynchronous Adapter 17
Bit 4: This bit is the complement of the clear to send (-CTS)
input. If bit 4 (LOOP) of the modem control register (MCR) is
set to logicall, the bit is equivalent to RTS in the MCR.
Bit 5: This bit is the complement of the data set ready (-DSR)
input. If bit 4 of the MCR is set to logicall, the bit is equivalent
to DTR in the MCR.
Bit 6: This bit is the complement of the ring indicator (-RI) input.
If bit 4 of the MCR is set to logical l, the bit is equivalent to
OUT 1 in the MCR.
Bit 7: This bit is the complement of the received line signal detect
(-RLSD) input. If bit 4 of the MCR is set to logicall, the bit is
equivalent to OUT 2 of the MCR.
Bit 7 6 5 4 3 2 0
Data Bit 0
Data Bit 1
Data Bit 2
Data Bit 3
Data Bit 4
' - - - - - - - - - _ DataBit5
Data Bit 6
L--_ _ _ _ _ _ _ _ _~ Data Bit 7
Bit 0 is the least-significant bit and is the first bit serially received.
18 Asynchronous Adapter
Transmitter Holding Register
The transmitter holding register contains the character to be
serially transmitted and is defined as follows:
LS
Bit 7 6 5 4 3 2 o
I L Data Bit 0
L----: Data Bit 1
Data Bit 2
Data Bit 3
' - - - - - - - - - . Data Bit 4
L - -_ _ _ _ _ _ _ Data Bit 5
L -_ _ _ _ _ _ _ _- - . Data Bit 6
Asynchronous Adapter 19
Selecting the Interface Format and Adapter
Address
The voltage or current-loop interface and adapter address are
selected by plugging in programmed shunt modules with the
locator dots up or down. See the following figure for the
configurations.
D
D
o
D
Current Loop
Interface Socket
Dot Down
20 Asynchronous Adapter
If the adapter is to be installed in expansion slot 8 of an IBM
Personal Computer XT or IBM Portable Personal Computer, a
jumper is required on connector J 13.
Interrupts
One interrupt line is provided to the system. This interrupt is
IRQ4 for a primary adapter, or IRQ3 for an alternate adapter,
and is positive active. To allow the communications adapter to
send interrupts to the system, bit 3 of the modem control register
must be set to 1 (high). At this point, any interrupts allowed by
the interrupt enable register will cause an interrupt.
DO 01 02 03 05 06 07
Asynchronous Adapter 21
22 Asynchronous Adapter
Interface
+5 Vdc
I
T,,".m;' C;,"";, ~ 49.9 Ohm
~~~ '----------t.:~ Pin 9
Tx Data _ _ _ _~~v~hm _ Pin 11
+5 Vdc
IReceive Circuit
5.6 k-Ohm
OPTO Isolator
Pin 25
Asynchronous Adapter 23
The voltage interface is a serial interface. It supports certain data
and control signals, as follows:
Invalid Levels
+ 15 Vdc
On Function
+3Vdc
-3Vdc
Off Function
-15 Vdc
Invalid Levels
24 Asynchronous Adapter
point, is more negative than -3 Vdc with respect to signal ground.
The signal will be considered in the spacing condition when the
voltage is more positive than + 3 V dc with respect to signal
ground. The region between +3 Vdc and -3 Vdc is defined as the
transition region, and considered an invalid level. The voltage
that is more negative than -15 V dc or more positive than + 15
V dc will also be considered an invalid level.
Input Signals
Chip Select (CSO, CS1, -CS2), Pins 12-14: When CSO and CSI
are high and -CS2 is low, the chip is selected. Chip selection is
complete when the decoded chip select signal is latched with an
active (low) address strobe (-ADS) input. This enables
communications between the INS8250 and the system unit's
microprocessor.
Asynchronous Adapter 25
Data Input Strobe (DISTR, -DISTR), Pins 22 and 21: When
DISTR is high or -DISTR is low while the chip is selected, it
allows the system unit's microprocessor to read status information
or data from a selected register of the INS8250.
Address Strobe (-ADS), Pin 25: When low, provides latching for
the register select (AO, AI, A2) and chip select (CSO, CSI, -CS2)
signals.
Register Select (AO, AI, A2), Pins 26-28: These three inputs are
used during a read or write operation to select an INS8250
register to read or write to as indicated in the following table.
Note that the state of the divisor latch access bit (DLAB), which
is the most significant bit of the line-control register, affects the
selection of certain INS8250 registers. The DLAB must be set
high by the system software to access the baud-rate generator
divisor latches.
26 Asynchronous Adapter
DLAB A2 Al AO Register
0 0 0 0 Receiver Buffer (Read), Transmitter
Holding Register (Write)
0 0 0 1 Interrupt Enable
X 0 1 0 Interrupt Identification (Read Only)
X 0 1 1 Line Control
X 1 0 0 Modem Control
X 1 0 1 Line Status
X 1 1 0 Modem Control Status
X 1 1 1 None
1 0 0 0 Divisor Latch (Least Significant Bit)
1 0 0 1 Divisor Latch (Most Significant Bit)
Master Reset (MR), Pin 35: When high, clears all registers
(except the receiver buffer, transmitter holding, and divisor
latches), and the control logic of the INS8250. Also, the state of
various output signals (SOUT, INTRPT, -OUT 1, -OUT 2, -RTS,
-DTR) are affected by an active MR input. Refer to the
"Asynchronous Communications Reset Functions" table.
Serial Input (SIN), Pin 10: Serial data input from the
communications link (peripheral device, modem, or data set).
Data Set Ready (-DSR), Pin 37: When low, indicates that the
modem or data set is ready to establish the communications link
and transfer data with the INS8250. The -DSR signal is a
modem-control function input whose condition can be tested by
Asynchronous Adapter 27
the system unit's microprocessor by reading bit 5 (DSR) of the
modem status register. Bit 1 (DDSR) of the modem status
register indicates whether the -DSR input has changed since the
previous reading of the modem status register.
Ring Indicator (-RI), Pin 39: When low, indicates that a telephone
ringing signal has been received by the modem or data set. The
-RI signal is a modem-control function input whose condition can
be tested by the system unit's microprocessor by reading bit 6
(RI) of the modem status register. Bit 2 (TERI) of the modem
status register indicates whether the -RI input has changed from a
low to high state since the previous reading of the modem status
register.
28 Asynchronous Adapter
Output Signals
Data Terminal Ready (-DTR), Pin 33: When low, informs the
modem or data set that the INS8250 is ready to communicate.
The -DTR output signal can be set to an active low by
programming bit 0 (DTR) of the modem control register to a high
level. The -DTR signal is set high upon a master reset operation.
Request to Send (-RTS), Pin 32: When low, informs the modem
or data set that the INS8250 is ready to transmit data. The -RTS
output signal can be set to an active low by programming bit 1
(RTS) of the modem control register to a high level. The -RTS
signal is set high upon a master reset operation.
Chip Select Out (CSOUT), Pin 24: When high, indicates that the
chip has been selected by active CSO, CS1, and -CS2 inputs. No
data transfer can be initiated until the CSOUT signal is a logical
1.
Driver Disable (DDIS), Pin 23: Goes low whenever the system
unit's microprocessor is reading data from the INS8250. A
high-level DDIS output can be used to disable an external
transceiver (if used between the system unit's microprocessor and
the INS8250 on the D7-DO data bus) at all times, except when
the system unit's microprocessor is reading data.
Asynchronous Adapter 29
Interrupt (INTRPT), Pin 30: Goes high whenever anyone of the
following interrupt types has an active high condition and is
enabled through the interrupt enable register: receiver error flag,
received data available, transmitter holding register empty, or
modem status. The INTRPT signal is reset low upon the
appropriate interrupt service or a master reset operation.
30 Asynchronous Adapter
Specifications
Asynchronous Adapter 31
25-Pin D-Shell connector
o
13 • • 25
• •
• •
• •
• •
• •
• •
• •
• •
• •
• •
• • 14
•
0
Description Pin
NC 1
Transmitted Data 2
Received Data 3
Request to Send 4
Clear to Send 5
Data Set Ready 6
Signal Ground 7
Received Line Signal Detector 8
+ Transmit Current Loop Data 9
NC 10
- Transmit Current Loop Data 11
NC 12 Asynch ronous
External NC 13 Commu nications
Device NC 14 Adapter
NC 15 (RS-23 2C)
NC 16
NC 17
+ Receive Current Loop Data 18
NC 19
Data Terminal Ready 20
NC 21
Ring Indicator 22
NC 23
NC 24
- Receive Current Loop Return 25
Connector Specifications
32 Asynchronous Adapter
~~~~ 1~, 1" 1&3 1C4
BD1~ I:1D.D"F •. D47p F 1·047vF 1·047"F Ull
:~~ +12VDC
Its 1&6 -:- azso
B07 -12VOC
I·~"F l047 J.I~
BOZ RESET 35 MR
,., DO 2
LS245
18
• "" " ,
DO DO DO
ADa
"" 3 17
""
AD7 lHTRPT 3
ADfi
AD5
03
D4
5 D3
fi D4" 03 :4 D3
D4
'04 osos 7 os 04 13
os
'03
'"
D7
8
1~
os
H7
1 DlR Ul
05 12
~~ 11
I os
D7
ill
CS OUT 24
ODlS 23
Ne
Ne
8 U8 9 DlSTR 29 Ne
iOii ,LS DOSTR
ill 33
81' U3 OISTR
iOw
813
'A32
31
, 28 AD
Al 27
'29
Al'
".,N " "" RTS 32
-ENABLE
U2
"3
38
RECEIVE DATA
c
chip select (CSO, CSl, -CS2) 26
chip select (CSO, CSl, CS2) 25
chip select out (CSOUT) 29
clear to send (-CTS) 27
clear to send (CTS) 27
CTS (clear to send) 27
current-loop interface 20, 23
Index-l
D
F
FE (framing error) 11
framing error (FE) 11
Index-2
I
Index-3
L
o
OE (overrun error) 10
output signals 29
-BAUDOUT (baud out) 29
-DTR (data terminal ready) 15,29
-OUT 1 (output 1) 15,29
-OUT 2 (output 2) 16,29
-RTS (request to send) 15, 29
CSOUT (chip select out) 29
DDIS (driver disable) 29
SOUT (serial output) 7,16,30
output 1 (-OUT 1) 15,29
output 2 (-OUT 2) 16,29
overrun error (OE) 10
Index-4
p
R
received line signal detect (-RLSD) 18,28
receiver buffer register 18
receiver clock (RCLK) 27
register select (AO, AI, A2) 3,26
request to send (-RTS) 15,29
ring indicator (-RI) 28
s
selecting the adapter address 20
selecting the interface format and Adapter Address 20
serial input (SIN) 16, 27
serial output (SOUT) 7, 16, 30
specifications 31
Index-5
T
v
voltage interchange information 24
voltage interface 24
Index-6
--- -
-
----- -
---
-
-----
---
-
---
---
,-
Personal Computer
Hardware Reference
Library
SeriaVParallel Adapter
Contents
Description .................................... 1
Serial Portion of the Adapter .................. 1
Parallel Portion of the Adapter ................ 20
Specifications ............................. 25
Logic Diagrams ................................ 27
iii
Notes:
iv
Description
Address
Address
Chip Select
.... Controller
Decode
Register - Asynchronous
Communications
Bus Select
Chip
Data Bus ...
Interrupt ...
I Oscillator
1.8432 MHz
I -.. ~
EIA
..
Receivers
- g·Pin
Connector
- EIA
Drivers
-
Serial Portion Block Diagram
The serial portion of the adapter has a controller that provides the
following functions:
Port 2
DO 01 02 03 04 05 06 07
~~~~~~~~
Marking Start I Parity Stop
Bit IIIIIIII Bit Bit
Input Signals
Output Signals
lS
Bit 7 6 5 4 3 2 1 0
IL Data BitO
L=--: Data Bit 1
Data Bit 2
Data Bit 3
L--_ _ _ _~ Data Bit 4
Bit 0 is the least-significant bit and the first bit sent serially.
lS
Bit 7 6 5 4 3 2 1 0
I L Data BitO
~DataBit1
Data Bit 2
Data Bit 3
' - - - - - -. . Data Bit 4
' - - - - - - -. . Data Bit 5
'--------~ Data Bit 6
'---------~ Data Bit 7
Bit 0 is the least-significant bit and the first bit received serially.
lS
Bit 7 6 5 4 3 2 1 0
I LBitO
~Bit1
Bit 2
Bit 3
' - - - - - -. . Bit 4
'-------~ Bit 5
'--------~ Bit 6
'---------~ Bit 7
Bit 7 6 5 4 3 2 1 0
~
1~BitO
L..==Bit1
Bit 2
Bit 3
' - - - - - - - - Bit 4
' - - - - - - - - Bit 5
L -_ _ _ _ _ _ _ Bit 6
L -_ _ _ _ _ _ _ _ Bit 7
Bit 7 6 5
III
4 3 2 1 0
~ ~ "oc""oo""",,,""'. "',,'""
Transmitler-H oldi ng- Register-Empty
Receiver-Line-Status Interrupt
Modem-Status Interrupt
• =0
=0
=0
=0
Bit 7 6 5 4 3 2 1 0
L ~
III~ 0Interrupt
;"""""" eo",;""
ID Bit 0
Interrupt ID Bit 1
=0
L - - - - -... =o
~----------~=O
L...-_ _ _ _ _ _ _. . =0
' - - - - - - - - -.. =0
Bits 1-2 These two bits identify the pending interrupt that has
the highest priority, as shown in the following figure:
Interrupt
10 Interrupt Set And Reset Functions
Register
0 0 0 - None None -
Interrupt Priority
Bit 7 6 5 4 3 2 1 0
Bit 7 6 5 4 3 2 1 0
IIIL--=:
1- ~ D." T'~;'" RM~
Request to Send
Out 1
Out2
' - - - - - - . - Loop
' - - - - - - - . - =0
' - - - - - - - _ =0
' - - - - - - - - - =0
Bit 7 6 5 4 3 2 1 0
~
I L Data Ready
L-==. Overrun Error
Parity Error
Framing Error
I-.-_ _ _ _~ Break Interrupt
1-.-_ _ _ _ _. . Transmitter Holding Register Empty
°
whenever a control input from the modem changes state. They
are reset to logical whenever the processor reads this register.
Bit 7 6 5 4 3 2 1 0
I ~I
L~ 0.'" c,." " Seo'
L==:. Delta Data Set Ready
Trailing Edge Ring Indicator
Delta Data Carrier Detect
' - - - - - - - - Clear to Send
' - - - - - - - _ Data Set Ready
L..-_ _ _ _ _ _... Ring Indicator
- Carrier Detect 1 -
Receive Data 2
Transmit Data 3
Data Terminal Ready 4
Exter nal Signal Ground 5 Ser ial
Devie e Par allel
Data Set Ready 6 Ada pter
Request To Send 7
Clear To Send 8
Ring Indicator 9
- -
BuHer
Address
Bus .
Address
Decode .. Control
Signals
.. Interrupt
Data Data
Data
Bus
.. ,..... Output
BuHer 25-Pln 0
I--
~
Wrap
BuHer ~
- Connector
Control
Output
-.. . Control Wrap
and ~
~ BuHer Signal Input
Printer Application
The following discusses the use of the parallel portion of the
adapter to connect to a parallel printer. Hexadecimal addresses in
this section begin with an X, which is replaced with a 3 to indicate
port 1, or a 2 to indicate port 2.
Bit 2 Unused.
Bit 1 Unused.
Bit 0 Unused.
o
~ 0
o
o 0
13 ~ 0 25
- -Strobe 1
-
Data Bit 0 2
Data Bit 1 3
Data Bit 2 4
Data Bit 3 5
Data Bit 4 6
Data Bit 5 7
Data Bit 6 8
Data Bit 7 9 Seri al
Exte rnal
-ACK 10 Parallel
Devic e
Ada pter
-BUSY 11
PE 12
SLCT 13
-AUTO FEED XT 14
-ERROR 15
-INIT 16
-SLCT IN 17
Ground 18·25
- ----
August 31, 1984
24 Personal Computer AT Serial/Parallel Adapter
Specifications
The following figures list characteristics of the output driver.
Function Condition
Voltage Function
Above +15 Vdc Invalid
+3 Vdc to +15 Vdc On
-3 Vdc to +3 Vdc Invalid
-3 Vdc to -15 Vdc Off
Below -15Vdc Invalid
....'"=
(SHT3)
....tH r---
4'11 AI
~AZ
AO AD
AI
(SHT2.3)
(SHT2,3)
....
~
I,C
.,."
mAO
Alb AI)
'i~
,IS
7 g UI'!
(SHT3)
OCI
..... All) A&
.,.. A7
... B
'I lit
01
01
lit
Iii
- ENABLE Sat 1/0
- NAB PAR
(SHT3)
(SHT21
~:~ 02~
..'"~ I
~I7
I£=i" ."~NA:
~,
= .,.A9
P~~NIC
8 Net N"'~N/(
i All AEt.!
~ 1Jijr.=a
.g=
.00
~l\
.
LSm ll
(SHT2,3)
'01
~t"{
(SHT2,3)
~~
,,
'02 (SHT2.3)
:~~
(SHT2.3)
(SHT2,3)
=
.... --{MtB2')
AOIj~ ,
..
(SHT3) '0' (SHT2.3)
(SHT3) ~82lf AO' ' B07
(SHT2,3)
~ (SHT21 ~B21 A02 "' L!A ,"
(SHT2.3)
('~
>-
0-3
~ '---
00
~
LSOLt
I l/fso,+
i1
"DR
(SHT2,3)
:3. (SHT21
~
'1=
BI'J row
BOl RESET II UI"1
LSO'"
10
LSO,",
--
RESET
(SHT2,3)
(SHT2)
-
=
~
>
i"
809
~:~
:~
ell ++;21 fC
+ IOJlUF
LSOLt
VOLTAGE AND
,
....
BOI GNO GNO BUSES
..
~ }
B11~
I
+ el2 v
~
810 6ND
1107 -12
lo.OJ,t.F .0It7/.1F "
.OIt7"F
-
....,
~
Serial/Printer Adapter (Sheet 1 of 3)
'LSI,),)
~
QC ------;;;; ~
(SHTll -ENA8LEPARALLELllO I') 2C ~~~~NIC
"C (SHTll AD
(SHT 1)
:~ 2G 2n~
~ (SHT 1) Al , ~ UIZ :~? &RPB
~
(SHTll BIDR I IC IY2 5RPC
P2
Lk~f-'!-NIC 2'i~
=
e.
(3. (13 -(20
(9X).OO22/J,F
f-
.~
~ 01 J
f-
f-
i=
ClJ <1<1 (Ii (IiClo1ClJ(18l201
a JIm'.
:~ID
~
JQ ~
80"
I
U19
(BX)27R
, ""
2
10 rr I f=
f-
'-----
, DATA a
DATA I
~
17 2A1f
2 IAI
ZYIf '3
IVt 18
'.0
.01
, DATA 2
'D2~~
\i!j' ,.
4
...
6 lA, IY'3 14
~ :~2D ZQlc 14
4 DATA '3 I') 2A, zn 'i 80'
:::~7D 7Q
'0 12
Ii ,
7 10
0
DATA If II 2AI 2Yt 9 B.4
> ~60
BD'7'i 3D
fiG
3Q 9
0
"•
12
7
B
DATA II)
DATA 6
1'3 2A2
If tA2
2Y2
IV2 16
7 B.'
BOO
-3 ~ ~~K ItQ
B
• DATA 7 8 IAIf
tIt ~
IYIf 12 807
r.n
~
~iSE
~-
UIS
/
r---RNI4.7KR--___. ,
+5V
-
U9
:3.
e. '2
LL 0
4
13 UII 12
270 I
~ -STROBE ~12'i
.........
UI
,
~
(SHT 1)
(SHT 1)
(SHTll
BOO
BDI
BD2
.00
.01
:g~:~ ~6D
BOO
~
10 IQ 2
oa l [lUll
01)
10
I f-w-
14
-ERROR
Auro Fa Xl
~
42G 2Y'14-
eW2D ~ 1~410 1
(SHT 1) B.'
0
~
-INIT
B04 BD'
2Y2~
-um~~ ~.
(SHT 1) 10 CIA;
:~~: ( I
-~
B.'
V V ~IAI
~
(SHTll
(SHT 1)
(SHT 1)
BOO
B.7 .07 L ~
BD'iIIfO
flt--
eLK
ZQ'5
';Q
~Qf-!--
13 UI,)
0';
12 ~
I---rr-
-SLCT IN
+SLCT I
9 Ulb
r.:s:.04
8
L-~172A1+
:~~ ~:~ ~
IY4 IZ
ZY3 9
(SHT 1)
RESET I r---l. ~~( ~ , f---rT- +BUSY V
LS04
l----tf 2AZ
I'; ZAI
In:~
IY2
~
'::JP~
+PE
.... -.!L-
~
... ~ -ACK
LS04
~
>
IUlb Z
10
+ IRQ EN
=
9 UI 8
....=
~
(SHT 1)
PARA 8
~;.~K
'~
[Il .5 IZ UI II
(SHTll
IRGS
2 7
4.7K 3 R" 4
LSIZ';
....W (SHTll
(SHTll
IRQ7 , 0 ,
~
BA8
(SHTll
....
~
~
QC
~ Serial/Printer Adapter (Sheet 2 of 3)
~~ __________________________________________________________________~______________________________~I~ ~HT1)
(SHT1) ..!A!!!..____________+--4~
~~-+----------------------------------------------------------------~-------------------------------21~R.~"~(SHT1)
(SHT 1) .!!'A"'.'-------______-"-i-~
:~~~~~
ISHT 1)
m-
BD4 '?zZLZQ:ZLZ22ZQ:ZQ:Z22Zz:::L':ZZ:z:::L':Z~
DDIS 21
N/C'"
H/C
H/C
... ~-:;;U2",O;-"'''''
RTSr~~---------------2t-~~
sarr~'~'----------------~-i--,
H' ~-:;;U2.,,..----~_r~
(SHT 1) - ENABLE SER IIO H/C
H/C-r-""L-/
RECEIVE DATA
mMBinary
Synchronous
Communications
Adapter
6361499
ii
Contents
Description .................................... 1
Programming Considerations ...................... 3
Typical Programming Sequence ................ 3
USART Programming ........................ 5
Interface ...................................... 9
Specifications ................................. 11
Logic Diagrams ................................ 13
iii
iv
Description
Timer
EIA
~ Drivers/
8253
Receivers
,-- Data
Syste m Comm unications
Bus Equipm ent
'I ,-'I
~
Data
I
Bus Z~ 14-- I I
I I :;:; USART
I I
I I Control v: I I
I
I I
I ~ t-: 8251A_
I
I
I
I
I
E=
I I v:f-- I I
I I v:; Programmable I
I I
I
L.J
Address
~n
~
''';ph",'
Interface
L.J
I
~
[;j r-----
[;j
= 14--- L-
'////////;) 8255A5
BSC Adapter 1
2 BSe Adapter
Programming Considerations
Bit 4 of the PPI's port B brings the USART reset pin high, holds
it, then drops it. This resets the internal registers of the USART.
Bse Adapter 3
The PPI's port assignments are as follows:
Bit 7 6 5 4 3 2 1 0
II~
o = Ring Indicate is on from Interface
o = Data Carrier Defect is on from Interface
Oscillating = Transmit Clock Active
o = Clear-to-Send is on from Interface
Oscillating = Receive Clock Active
1 = TxRDY Active
1 = Timer 2 Output Active
1 = Timer 1 Output Active
Bit 7 6 5 4 3 2 1 0
II~~
o = Turn on Data Signal Rate Selector
o = Turn on Select Standby
o = Turn on Test
1 = Not Used
1 = Reset 8251A
1 = Gate Timer 2
1 = Gate Timer 1
1 = Gate Timers 1 and 2 to Interrupt Level 4
Bit 7 6 5 4 3 2 1 0
II~~
1 = Gate Internal Clock (Output Bit)
1 = Gate External Clock (Output Bit)
1 = Electronic Wrap (Output Bit)
o = Enable Timer 1 and 2, Interrupt 6 and
Receive Interrupt 3
Oscillating = Receive Data (Input Bit)
Oscillating = Timer 0 Output (Input Bit)
o = Test Indicate Active (Input Bit)
o = BSC Adapter
4 BSe Adapter
interrupt-level 4 and, being programmed to terminal-count values,
provide the desired time delay before generating a level-4
interrupt. These interrupts signal the system that a predetermined
amount of time has elapsed without a TxRDY (level 4) or an
RxRDY (level 3) interrupt being sent to the system unit.
USART Programming
After the support devices on the BSC adapter are programmed,
the USAR T is loaded with a set of control words that defines the
communication environment. The control words consist of mode
instructions and command instructions.
BSC Adapter 5
The following represents a typical data block and shows the mode
instruction and command instruction.
3A8C/D = 0
I
~ Data
I
~
3A8Cio = 1 ~~ Data
~
3A9 c/o = 1 Command Instruction
• Interrupt level 4
Transmit
Timer 1
Timer 2
• Interrupt level 3
- Receive
6 BSC Adapter
The following are device addresses.
Hex Address
Device Register Name Function
Primary Alternate
Bse Adapter 7
8 BSC Adapter
Interface
+15 Vdc - - - - - - - - - - - ,
Active/Data ~ 0
+5 Vdc
+5 Vdc
I nval id Level
-5 Vdc
-5 Vdc
Inactive/Data = 1
-15 Vdc
+25Vdc .----------~
Active/Data ~ 0
+3 Vdc
+3 Vdc
I nvalid Level
-3 Vdc
-3 Vdc
I nactive/Data ~ 1
-25 Vdc
BSC Adapter 9
Pins 11, 18, and 25 on the interface connector are not
standardized by the EIA. These lines are designated as 'select
standby,' 'test,' and 'test indicate.' 'Select standby' is used to
support the switched network backup facility of a modem that
provides this option. 'Test' and 'test indicate' support a modem
wrap function on modems designated for business-machine,
controlled-modem wraps.
10 BSe Adapter
Specific a tions
25-Pin D-Shell
Connector
o
13
•• • 25
•• •
• ••
•• •
•
• •
•
• •
• 14
Connector Specifications
Bse Adapter 11
12 BSC Adapter
Logic Diagrams
3D
lOR
8255 PCI 10DEI CLOCI
""
+5 VOLTS
+A3 28
+A4 "21 21
+A5
+ ..
-IB03
" ""
+A1
+IR04
""
24 DATA SET
+.. AO-Al
+A9
23 " READY
""
21
21
CLEAR TO SEND
20
20
. RECEIVE DATA
"
18
18
IRO 4 CARRIER DETECT
11
11
18
"
15
15
RillS lID.
14
-lOR + RESET
-lOW
"
13
13
12
12
+1£111
10
'.0
+00
10
+12 VOLTS
+01
+D2
-12 VOLTS
+03
+04 J'
13 +5V
+D5 25 TEST liD
12
+08 24 SELECT STAY
+5 JOLTS
+01 23 RATE SElECT
+flESET 10 +--~--~----~--~--"3
22 RIIIG Ilia
T T i-T B2a
1••• =T
GND 1
BOARD TO CARD
CDIINECTOR
1C1
T 2C1=T
f--+---~----~--~-BO'
1&2 1BC2
+--+----+----+--+--13'
1L _,
rrn-_
+'"----11:r-,,-,---,.. ,, ,,
L'
,.,,----"I>'-=,,"-,---801/831 l ~-1-- J
14
" ----<..->----101 _1""'1.
Ell CARD TO
CABLE CO••ECTOR
-'"
Bse Adapter 13
Binary Synchronous Communications Adapter (Sheet 2 of 2)
14 BSe Adapter
II~UL&ROIIIID
BSC Adapter 15
16 BSe Adapter
----
-- ----
- - --- Personal Computer
--_.-
- - ---
- ---
-- Hardware Reference
Library
mM Synchronous Data
Link Control (SDLC)
Communications
Adapter
6361497
ii
Contents
Description .................................... 1
8273 SDLC Protocol Controller ................ 2
8255A-5 Programmable Peripheral Interface ...... 2
8253-5 Programmable Interval Timer ............ 4
Programming Considerations ...................... 5
Initializing the Adapter (Typical Sequence) ....... 5
8253-5 Programmable Interval Timer ............ 5
Address and Interrupt Information .............. 6
Interface ...................................... 7
Specifications .................................. 9
Logic Diagrams ................................ 11
iii
iv
Description
Data
Bus
Buffer
System EIA
Drivers DCE
Bus
Receivers
Address
Address Decode Modem
Logic Status
' - - - - - - + I Controller Change
Logic
Bit 7 6 5 4 3 2 1 0
~
0= Ring Indicator is on from Interface
0= Data Carrier Detect is on from Interface
Oscillating = Transmit Clock Active
0= Clear to Send is on from Interface
Oscillating = Receive Clock Active
1 = Modem Status Changed
1 = Timer 2 Output Active
1 = Timer 1 Output Active
Bit 7 6 5 4 3 2 1 0
~
0= Turn On Data Signal Rate Select at
Modem Interface
0= Turn On Select Standby at Modem
Interface
0= Turn On Test
1 = Reset Modem Status Changed Logic
1 = Reset 8273
1 = Gate Timer 2
1 = Gate Timer 1
1 = Enable Level 4 Interrupt
Bit 7 6 5 4 3 2 1 0
*Port C is defined for internal control and gating functions. It has three input
and four output bits. The four output bits are defined during initialization, but
only three are used.
The counter modes are set up by selecting the address for the
PIT's counter-mode register and by writing the control word for
each individual counter to the device separately.
Interrupt Information
Drivers Receivers
+15VdC~ + 25 Vdc
+5Vdc ~ + 3 Vdc
Invalid Level
- 5 Vdc - 3 Vdc
~
-15VdC~
Inactive Level: Data =1
L-25VdO
Additional lines used but not standardized by the ErA are pins 11,
18, and 25. These lines are designated as 'select standby,' 'test,'
and 'test indicate,' respectively. 'Select standby' supports the
switched network backup facility of a modem that has this option.
'Test' and 'test indicate' support a modem-wrap function for
modems that are designed for business-machine controlled
modem-wraps. Two jumpers on the adapter (PI and P2) connect
'test' and 'test indicate' to the interface.
0
Signal Name - Description Pin
No Connection 1
Transmitted Data 2
Received Data 3
Request to Send 4
Clear to Send 5
Data Set Ready 6
Signal Ground 7
Received Line Signal Detector 8
No Connection 9
No Connection 10 Synchronous
External Select Standby* 11 Data Lin k
Device No Connection 12 Control
Commu nications
No Connection 13
Adapter
No Connection 14
Transmitter Signal Element Timing 15
No Connection 16
Receiver Signal Element Timing 17
Test (IBM Modems Only)* 18
No Connection 19
Data Terminal Ready 20
No Connection 21
Ring Indicator 22
Data Signal Rate Selector 23
No Connection 24
Test Indicate (IBM Modems Only)* 25
Connector Specifications
SDLC Communications Adapter 9
10 SOLC Communications Adapter
Logic Diagrams
The following pages contain the logic diagrams for the IBM
Synchronous Data Link Control (SDLC) Adapter.
(1221 +
(UJI ...
(1241 ...
(115) ...
(All) +
(1211+?'=====8~:
(Ani
(Ani
(1271
+
+
+
(1141 -
(1131-
(Ull+ Ad
"" ..
OUT 11255 PA7
,+11
+·AO 31 GATE 2 8255 P85
OUT l8255·PAI
ti3t1i.., I. . I.e.... l . .::!
£129M! f T·0471f________
00 31
..
OS r--1255 PCO InERIAI. ClOCK
3D GATE 0+5 VOLlI TIE UP
0
".~
OSC 3D .-1255 PCI IODEM ClOCK
OUT 0 8255 PCS
t'"
("'l
+A2
+5YDLTS
+A' "2B 2B
ose ClOCK ";'12
r:
.-
ClIO
ClK ,
ca'f-- -
eA -+-----+-~1
T
I ::
elK!
.,.-1-
i~
10-11 REC
("':) +A4 27 1C' 20'
.273 'I.- r--
...
IDW
= -'" ==It"=·=f~I~============:~
27
+A5
" • 253
El'
~
ID'
,." ,.
0 AI--
8255
9 +AB ~
101- f-;;.--
9 -1803
= L- L-1--1
+A7 24 INt-D7 DATA
+1804 24 _Illl BUS a::EC ~~ f-!!l!-
e, IHtDEIRECEilECLOCI
~
2. +AB
23
23
lOW OS ~ ~ TRAIIISIIlr DATA
r> +A8
J
22
~
RTS REUUEsr TO SEND
o·....
Q; 22
I r .. 10\:=
'T'
..
DATA -TEIiMINAl READY
21
21 AD-AI
lOW
.SR • L e'
REC e---- DATA SET READY
=
OTS
10. ClEAR TO SEIID
til CLOCK REC OAT
~Iglol--- f-- .---- RECElIE OAU
" "
AD-AI DACKI DR ,---- CARRIER DETECT
> 78
~~ L ElREC' RIIIGINO.
=-
~
-lOW
"
13
13
13
J1
DR01 L...,-
,---- f--
12 25 TEST IND
+AUI
12 12
24
1804
IB03 L'255 Pl7
• ,~
A
L
I--
'REC
1A f - -
~
SELECT STAY ~
10 23 RATE SELECT
10 ~-
G••
+00
+ 12VDLTS
10
22 1U1I811110 8253 OUT 1
8253 OUT 2
D ~:~I-
... ~I--- !giol:= hL f--
." h0r-
+01
+02
21
2D
CARRIER DETECT
DATA TERM ROY
BSRCHANIE
eTS CHAIBE "3~
PC4 REe DATA
_ A I:=- REC
'----
I~,
-1210LTS StGNALOND
+03 + RESET
+04
"
18
DATA SEL ROY
TEST
1ST
'DR ,AD '"
CARRIER DEI
RING 110
ClEAR TO SEND mw PAS TEST '10
+05 17 RECEIYECLOCII. 'loA
78
REO~EST TO SEND AD-AI PC2
DR. I---- RATE SELECT
+00
+5YDLTS
+07
RECEIIE DATA
TRANSMIT ClOCK
cs 'BO
PI, >- f-iii-
... I---- SELECT STAND BY
..
15
+ RESET
, 14
TRAISMIT 01 TA
~
PI. If-iii-f<&- TEST
-lOc.!"'!.
BOARD TO CARn Ell CARD TO 4,:_---_IIOOEI SlGIIAL GROUND
CO••ECTOR CABLE CONNECTOR SOLC Communications Adapter (Sheet 2 of 2)
------
-
-----
-
--
-
-
-----
- _
- -
- ---
---
.-
Personal Computer
Hardware Reference
Library
mM Cluster Adapter
6361495
ii
Contents
Description. ................................... 1
8031 Microcomputer ........................ 5
Cluster Adapter I/O Register Definitions ....... 12
Programming Considerations ..................... 18
Interface ..................................... 83
System Processor I/O Interface ............... 83
Cluster Adapter Switch Settings ............... 84
System Processor Memory Interface ............ 90
System Processor Interrupt Interface ........... 90
8255 Programmable Peripheral Interface (PPI) ... 91
Cluster Bus Interface ....................... 94
Specifications ................................. 96
Logic Diagrams ................................ 97
iii
iv
Description
75D 75D
Resistor Resistor
CLUSTER EXAMPLE
Cluster Adapter 1
microseconds (p,s), thereby forcing a carrier sense transition
(On-to-Off). The station can then calculate its access-window
wait time.
2 Cluster Adapter
The following is a block diagram of the Cluster Adapter:
T
Cluster
Serial
Interface
I
Data
BK ROM/4K RAM
Address
CRC
H/W
-
~
Data Buffer PO P2 P3
8255 8031 8088 ROM
PB PA PC P1 8K
J I
I Switches
Addr I
I Register
Status I
Processor
Interface
I
Cluster Adapter 3
DANGER
TO HELP PROTECT FROM LIGHTNING AND
OTHER SOURCES OF ELECTRICAL SHOCK, IBM
REQUIRES THAT THE COAXIAL CABLE
SHIELDING BE GROUNDED, AND NEITHER THE
FRAME NOR COVERS OF THE IBM PERSONAL
COMPUTER CAN BE USED AS THE GROUNDING
POINT.
4 Cluster Adapter
8031 Microcomputer
The 8031 Microcomputer is the controlling processor for the
Cluster Adapter. The 8031 has an 8K x 8-bit ROM, and a 4K x
8-bit static RAM.
• A processor
• 32 I/O lines
Cluster Adapter 5
8031 Ports
6 Cluster Adapter
The following is a summary of the 8031 port signals:
Cluster Adapter 7
Serial Transmission and Control Lines
8 Cluster Adapter
The memory control lines are:
8K X 8-Bit ROM
The 8K x 8-bit ROM contains the 8031 code necessary for
hardware initialization and the data link control program
(DLCP). The DLCP is the lowest level of software for the
Cluster Adapter. The DLCP resides in the 8K by 8-bit ROM on
the Cluster Adapter, which is accessible by the 8031
Microcomputer.
Cluster Adapter 9
The following is the 8031 memory map:
10 Cluster Adapter
The 2653 is programmed by the 8031 in the automatic mode to
generate the American National Standards Institute (ANSI)
CRC-16 values. Two 8-bit characters are read from the 2653
character register into the Block Check Character (BCC)
generation unit to calculate the 16-bit check character.
Cluster Adapter 11
Cluster Adapter 110 Register Definitions
The following defines the Cluster Adapter I/O registers:
I/O Address
Adapter (Hex) Device
Adapter 1 0790 Adapter Status Reg ister
0791 Adapter Command/Data (Output)
Adapter Result/Data (Input)
0792 Adapter Interrupt Register
0793 Adapter Reset Control
Adapter 2 0890 Adapter Status Register
0891 Adapter Command/Data (Output)
Adapter Result/Data (Input)
0892 Adapter Interrupt Register
0893 Adapter Reset Control
Adapter 3 1390 Adapter Status Register
1391 Adapter Command/Data (Output)
Adapter Result/Data (Input)
1392 Adapter Interrupt Register
1393 Adapter Reset Control
Adapter 4 2390 Adapter Status Register
2391 Adapter Command/Data (Output)
Adapter Result/Data (Input)
2392 Adapter Interrupt Register
2393 Adapter Reset Control
12 Cluster Adapter
Adapter Status Register
The adapter status is provided to the system data bus by a
74LS373 transparent latch.
The status bits are latched during the active read time to preserve
the integrity of the data. When the outputs are disabled and the
latch-enable input to the latch goes high at the end of the read
cycle, the outputs of the transparent latch again monitor the
inputs in real time.
Cluster Adapter 13
Definition of Bits at Port 0791
(for Adapter 1)
(Command or Parameters for 8031)
Bit Definition
7 Command or Data Bit 7
6 Command or Data Bit 6
5 Command or Data Bit 5
4 Command or Data Bit 4
3 Command or Data Bit 3
2 Command or Data Bit 2
1 Command or Data Bit 1
0 Command or Data Bit 0
14 Cluster Adapter
Definition of Bits at Port 0792 (for Adapter 1)
Bit Definitions
7-2 Not used.
1 Received Frame(s) Available. One or more information frames have
been received and may be read using either the BIOS Receive
Frame or Receive Virtual 1/0 Frame command (1 = active).
0 Cluster BIOS Command Complete. The Cluster BIOS command
intiated with the Initiate Transmit bit set is complete. The result
must be obtained by issuing the same Cluster BIOS command with
the Finish Transmit bit set (1 = active).
Note: Any output to the reset register will also disable the adapter from
generating interrupts.
Cluster Adapter 15
Cluster Adapter Interrupts
The Cluster Adapter may be set (one jumper selectable) to allow
interrupts on either interrupt-level 3 or interrupt-level 7. An
adapter error detected by diagnostic tests is reported if the
interrupt jumper is missing. The received frames must be
available or the Transmit operation complete (if initiated by a
Transmit command with the Initiate Transmit bit set).
16 Cluster Adapter
3. To avoid resetting the adapter, data bit 0 must be set to a 0
when an output is sent to the adapter's reset register.
Cluster Adapter 17
Programming Considerations
18 Cluster Adapter
The following functions are implemented in the DLCP to
interface with the higher layer communication program and to
ensure reliable data transfer between stations on the bus:
Cluster Adapter 19
Higher Layer Communication Program BIOS
Interface
When the Power switch is set to On, the hex 5A software
interrupt vector is set to the address of the Cluster Adapter BIOS
by the adapter's self-test diagnostic code.
Notes:
20 Cluster Adapter
The format of the LCB is shown below:
Notes:
3. For the length and address fields, the word values are ordered
least-significant byte first.
Cluster Adapter 21
The contents of buffer 1 and buffer 2 together form the
information field of the frame. For example, buffer 1 can be used
to store header bytes while buffer 2 can be used to store the
actual data to be transferred.
Frame Transmission
Transmit or Transmit Virtual Information frames are sent by the
DLCP to complete the corresponding DLCP BIOS commands. The
DLCP on its own initiative transmits various frames. The
following response frames are issued in response to a received
frame:
22 Cluster Adapter
The following control frame is transmitted by the DLCP when the
Power switch is set to On or at initialization:
Cluster Adapter 23
Frame Format
The basic unit of information transmitted is a frame. The
On-to-Off transition of the 'carrier sense' signal identifies the
beginning of a frame, and the Off-to-On transition identifies the
end. A frame consists of fixed control fields and an optional
variable length information field. The following shows the format
of a frame:
Frame Format
24 Cluster Adapter
Control Field Format
Cluster Adapter 25
The following types of frames are used by the DLCP:
Virtual Disk (hex 82) Identifies that this frame contains a data
block and was transmitted as a result of the source
station issuing a Transmit Virtual Frame DLCP
command. One buffer is reserved for this frame.
Information (hex 83) Signifies the frame contains a data block and
was transmitted as a result of the source station
issuing a Transmit Frame DLCP command. There is a
first-in-first-out (FIFO) buffer set aside for this
frame.
Not Connected (hex 16) Indicates that the receiving station is not
connected to the sending station.
Frame Reject (hex 17) Sent by the receiving station when it has
received an information frame or a virtual disk frame
and the DLCP does not have buffer space available to
store the frame.
Bad Error (hex 18) Sent by the receiving station to indicate that a
frame is out of sequence.
26 Cluster Adapter
Are You There? (hex lA) Sent to each station to poll for status in
the cluster. Each station that is on sends a response
to this query. An Acknowledge response frame is sent
by stations that are initialized. A Frame Reject
response is sent by stations that are not initialized.
Cluster Adapter 27
Byte Count - The byte count is the number of information bytes
to be transmitted. If the frame is a control frame, the byte count
is zero. There are two bytes allocated for the byte count.
Information Field
28 Cluster Adapter
Cluster Access Protocol
Collision avoidance is used with the Cluster Adapter. To avoid
collisions, each station waits a different amount of time after
'carrier sense' goes inactive before transmitting.
Stations get access to the cluster by timing from the end of the
current transmission (-Carrier Sense On-to-Off transition) until
its transmit time is reached, and then it may transmit. See also
"Collision Avoidance (Medium or High Activity)" on page 30.
2. Transmit Window.
Cluster Adapter 29
Collision Avoidance (Medium or High Activity)
Carrier
Sense
On
Off l 1..._ _ _ _ _ _ _ _ __
Synchronized On----------~L_
Transmit Off
Period
Transmit On -------I
Window Off
Slot 2
30 Cluster Adapter
Collision Avoidance (Medium or High Activity)
TR= Time allocated for a receiver to start transmitting a
response.
T1 = Time delay for 1st Transmit Access Window.
T2 = Time delay for 2nd Transmit Access Window.
Notes:
A station must see its Transmit Window flag change from Off to
On before it is permitted to transmit. The case where it does not
see the change is covered in the next section.
If cluster activity is light (1480 f.LS average access time since the
previous transmission on the cluster) enough that the
Synchronized Transmit Period (STP) flag is reset, then
synchronization needs to be re-established to avoid collisions.
Cluster Adapter 31
The method used to re-establish synchronization is to transmit all
l's in the cluster for approximately 150 p,s and then to time the
carrier sense On-to-Off condition to this station's transmit slot
time. (See also "Collision Avoidance (Light Activity)" on page
33).
Transmit
Data ~ ---lI---------rulf··lJlJ
AlIl's Transmit Frame
~~f~
Carrier
Sense I
~ TR -11 I 2 I ... I 641
\-T1 -1
t- T2 -----I
r- T64 --------I
On
Synchronized
Transmit Off L
Period
On
Transmit Off
Window
Slot 2
32 Cluster Adapter
Collision Avoidance (Light Activity)
TR= Time allocated for a receiver to start transmitting a
response.
T1 = Time delay for 1st Transmit Access Window.
T2 = Time delay for 2nd Transmit Access Window.
Frame Reception
The leading edge of the 'carrier sense' signal is used to interrupt
the 8031 Microcomputer. The 8031 interrupt service routine
updates its Transmit Window Token to the value transmitted with
the frame, and also sets the timer 0 counter to the calculated
Transmit Access Window based on the new token value. If the
frame is not addressed to this station, the DLCP ignores the rest
of the frame and leaves the interrupt routine.
If the DLCP can accept the frame, a check is made that a receive
buffer is available. If a buffer cannot be obtained, a frame- reject
control frame is sent back to the transmitting station. This
indicates that the frame cannot be accepted at this time and
another attempt should be made. If the frame is received
Cluster Adapter 33
correctly, DLCP transmits an Acknowledge frame to the
transmitting station and return the control to the interrupted 8031
program.
34 Cluster Adapter
After correctly receiving a control frame or an information frame,
the receiving station sends a response frame. If all receive buffers
are in use, a Frame Reject response frame is transmitted. If the
frame is out of sequence, a Bad Error response frame is
transmitted.
Cluster Adapter 35
The bits for each Cluster Status Table byte are designated in the
following chart:
Bit 6, 5 - Response ID
Bit 6 Bit 5
RB1 RBO Type of Response
0 0 Acknowledge
0 1 Frame Reject
1 0 Not Connected
36 Cluster Adapter
Bit 4 - Pending (P) is set to 1 by the transmitting station to
indicate that it is waiting for an acknowledge frame
from the destination station, and is reset by the
interrupt handler when a response is received or upon
a time-out.
Remote IPL
A vector is established at bootstrap vector INT hex 19 to the
Remote System Reset Program Loader for the cluster, which is
located in adapter 1's ROM. The original contents of the
bootstrap vector are stored at vector INT hex SB. The disk server
station address is stored at the least-significant byte of vector INT
hex El. The number of the adapter from which to IPL is stored
at the word corresponding to the segment at vector INT hex El.
Cluster Adapter 37
The following actions are performed by the Remote System Reset
Program Loader:
38 Cluster Adapter
6. An acknowledge information frame is expected with the
following data:
Cluster Adapter 39
8. The disk server sends a response containing the next data
block. The response has the following form:
40 Cluster Adapter
The received program code is inserted in memory starting at
location hex 07CO:0000 and continuing upward. The end of
the program code is determined when a frame is received that
does not contain 512 bytes of program code.
9. The above two steps are repeated until the end of the program
code is received. The user timer-interrupt vector is restored
and control passes to the loaded program by a jump to hex
07CO:0000.
Notes:
Cluster Adapter 41
DLCP BIOS Commands
The DLCP BIOS commands are issued by the higher layer
communication program to send and receive information through
the cluster. The following are the DLCP BIOS commands:
42 Cluster Adapter
DLCP Return Codes
The following table indicates the Return Codes that are defined
for the cluster DLCP:
Cluster Adapter 43
Cluster Initialization (DLCP) = Hex 00
Function: This command initializes the DLCP and also transmits
an initializing frame to inform others in the cluster. If
another station in the cluster has the same address as
this station, it sends a response frame indicating
duplicate station address, and the return code is hex
32. The Initialization Control Block (ICB) must be
built by the calling program with the initialization
values indicated by the following:
Return Code Definition
44 Cluster Adapter
Initialization Control Block (lCB)
The calling program must set the buffer 1 address field in the
LCB to the address of an initialization control block (ICB). The
figure below shows the composition and bytes that make up the
ICB:
Cluster Adapter 45
Byte 0 - Bits 7,6,5,4, and 3 are reserved and must be set to O.
46 Cluster Adapter
Byte 1 - This byte indicates the number of large buffers
allocated in the 8031 RAM for incoming frames.
Byte 3 - This byte indicates the large buffer size (each unit
represents 8 bytes). Six bytes of the large buffer are
reserved for control information.
Byte 4- This byte indicates the small buffer size (each unit
represents 1 byte). Six bytes of the small buffer are
reserved for control information.
Cluster Adapter 47
Byte 9 - The value of this byte times 2 equals the delay in p,s
after the start of a transmit frame before the first
byte (destination) is transmitted.
Byte 10 - The value of this byte times 2 equals the delay in p,s
between the control field and data field of a frame.
Byte 13 - The value of this byte times 16.7 equals the number
of seconds allowed for any command in progress to
finish before the 8031 indicates error hex 3C to the
Cluster Adapter BIOS code.
48 Cluster Adapter
Receive Virtual Frame = Hex 01
Function: This command is used to retrieve a data frame sent by
the disk server (using Transmit Virtual Frame).
Notes:
1. There is only one virtual frame buffer for this type of data
frame.
Cluster Adapter 49
Link Control Block (LCB)
Field Value at Entry Value at Exit
Destination Don't Care Destination
Source Don't Care Source
Command = 01 (Hex) Frame Control
Buffer 1 Length Length of Calling Length of Received Data if
Program's Buffer 1 Less Tha n Buffer 1 Le ngth
Buffer 1 Address Points to Calling Unchanged
Program's Buffer 1
Buffer 2 Length Length of Ca II i ng Length of Received Data
Program's Buffer 2 Placed in This Buffer
Buffer 2 Address Points to Calling Unchanged
Program's Buffer 2
Return Code Don't Care Set to Return Code
Cluster Status Don't Care Frame Sequence
Select Adapter = 0 for Adapter 1 Unchanged
= 1 for Adapter 2
= 2 for Adapter 3
= 3 for Adapter 4
50 Cluster Adapter
Receive Frame (from FIFO queue) = Hex 02
Function: This command is used to retrieve a data frame sent
from another station (using Transmit Frame) from the
First-In-First-Out (FIFO) queue.
The FIFO queue can contain four full size frames and
10 small frames.
Cluster Adapter 51
Link Control Block (LCB)
Field Value at Entry Value at Exit
Desti nation Don't Care Destination
Source Don't Care Source
Command = 02 (Hex) Frame Control
Buffer 1 Length Length of Calling Length of Received Data if
Program's Buffer 1 Less Than Buffer 1 Length
Buffer 1 Address Points to Calling Unchanged
Program's Buffer 1
Buffer 2 Length Length of Calling Length of Received Data
Program's Buffer 2 Placed in This Buffer
Buffer 2 Address Points to Calling Unchanged
Program's Buffer 2
Return Code Don't Care Set to Return Code
CI uster Status Don't Care Frame Sequence
Select Adapter = 0 for Adapter 1 Unchanged
= 1 for Adapter 2
= 2 for Adapter 3
= 3 for Adapter 4
52 Cluster Adapter
Transmit Frame = Hex 03
Function: This command is used to transmit a data frame to
another station where it can be retrieved by using the
Receive Frame command.
Cluster Adapter 53
Link Control Block (LCB)
Field Value at Entry Value at Exit
Destination Destination Unchanged
Source Don't Care Unchanged
Command =03 (Hex) Unchanged
Buffer 1 Length Length of Calling Unchanged
Program's Buffer 1
Buffer 1 Address Points to Calling Unchanged
Program's Buffer 1
Buffer 2 Length Length of Calling Unchanged
Program's Buffer 2
Buffer 2 Address Points to Calling Unchanged
Program's Buffer 2
Return Code Don't Care Set to Return Code
CI uster Status Don't Care Unchanged
Select Adapter = 0 for Adapter 1 Unchanged
= 1 for Adapter 2
= 2 for Adapter 3
= 3 for Adapter 4
54 Cluster Adapter
Display Cluster Status = Hex 05
Function: This command is used to determine and then display
the cluster status. The On/Off status of 64 stations is
displayed. Stations that have the Power switch set to
On are displayed in reverse video. Your station is
displayed in reverse video and blinking. If another
station in the cluster has the same address as your
station, a long beep sounds. Only those stations that
are initialized can be displayed.
Cluster Adapter 55
Link Control Block (LCB)
Field Value at Entry Value at Exit
Destination Type of Status Unchanged
Source Don't Care Unchanged
Command = 05 (Hex) Unchanged
Buffer 1 Length Number of Stations Unchanged
to Display
Buffer 1 Address Don't Care Unchanged
Buffer 2 Length Don't Care Unchanged
Buffer 2 Address Don't Care Unchanged
Return Code Don't Care Set to Return Code
Cluster Status Don't Care Extended Return Code on
Error
Select Adapter = 0 for Adapter 1 Unchanged
= 1 for Adapter 2
= 2 for Adapter 3
= 3 for Adapter 4
56 Cluster Adapter
This page explains the cluster status that may appear on your
screen.
Cluster Adapter 57
Cluster Status = Hex 06
Function: This command determines the stations' OnlOff
status. The status bytes are stored in buffer 1 (as
determined by the buffer 1 pointer in the LCB). The
first byte's least-significant bit is the status of station
O. Bit 1 represents station 1. The least-significant bit
of the second byte is the status of station 8, and so on.
The number of stations checked is a parameter of this
command. Only those stations that are initialized are
reported.
Notes:
58 Cluster Adapter
Link Control Block (LCB)
Field Value at Entry Value at Exit
Destination Type of Status Unchanged
Source Don't Care Unchanged
Command = 06 (Hex) Unchanged
Buffer 1 Length N umber of Stations Unchanged
to Check
Buffer 1 Address Points to Calling Unchanged
Program's Buffer 1
Buffer 2 Length Don't Care Unchanged
Buffer 2 Address Don't Care Unchanged
Return Code Don't Care Set to Return Code
Cluster Status Don't Care Extended Return Code
on Error
Select Adapter = 0 for Adapter 1 Unchanged
= 1 for Adapter 2
= 2 for Adapter 3
= 3 for Adapter 4
Cluster Adapter 59
Status - Hex 07
Status = Hex 07
60 Cluster Adapter
Transmit Broadcast Frame = Hex 08
Function: This command is used to transmit a data frame to
another station where it can be retrieved by using the
Receive Frame command. No acknowledgment to the
frame is sent by the receiving stations.
Cluster Adapter 61
Link Control Block (LCB)
Field Value at Entry Value at Exit
Destination Destination Unchanged
Source Don't Care Unchanged
Command = 08 (Hex) Unchanged
Buffer 1 Length Length of Calling Unchanged
Program's Buffer 1
Buffer 1 Address Points to Calling Unchanged
Program's Buffer 1
Buffer 2 Length Length of Calling Unchanged
Program's Buffer 2
Buffer 2 Address Points to Calling Unchanged
Program's Buffer 2
Return Code Don't Care Set to Return Code
Cluster Status Don't Care Unchanged
Select Adapter = 0 for Adapter 1 Unchanged
= 1 for Adapter 2
= 2 for Adapter 3
= 3 for Adapter 4
62 Cluster Adapter
Transmit Virtual Frame = Hex 09
Function: This command is used to transmit a data frame
containing sector information from the disk server
station. The information can be retrieved only by
using the Receive Virtual Frame command.
Cluster Adapter 63
link Control Block (LCB)
Field Value at Entry Value at Exit
Destination Desti nation Unchanged
Source Don't Care Unchanged
Command = 09 (Hex) Unchanged
Buffer 1 Length Length of Calling Unchanged
Program's Buffer 1
Buffer 1 Address Points to Calling Unchanged
Program's Buffer 1
Buffer 2 Length Length of Calling Unchanged
Program's Buffer 2
B uffe r 2 Add ress Points to Calling Unchanged
Program's Buffer 2
Return Code Don't Care Set to Return Code
Cluster Status Don't Care Unchanged
Select Adapter = 0 for Adapter 1 Unchanged
= 1 for Adapter 2
= 2 for Adapter 3
= 3 for Adapter 4
64 Cluster Adapter
Stop DLCP = Hex OA
Function: This command is used to temporarily inhibit the
DLCP from receiving or transmitting frames. Issue a
Start DLCP command to leave the stopped state.
Cluster Adapter 65
Read Station Address = Hex OB
Function: This command is used to return the address and state
of the remote IPL switch of this station.
Return Code Definition
66 Cluster Adapter
Set Multicast Address = Hex OC
Function: This command is used to set the desired multicast
address. The multicast address is a variation of the
broadcast address (hex FF). More than one station
may be assigned the same multicast address. A
default value of hex FF is set when a cluster
Initialization command is issued to the DLCP. A
frame sent, using the Transmit Broadcast Frame
command (8), to the group multicast address is
received by all stations that share the multicast
address.
Return Code Definition
Cluster Adapter 67
Check Inside DLCP Flag = Hex on
Function: This command is used to return an indication that a
DLCP command is already in progress. This
command is necessary orily for programs that call
DLCP from inside an interrupt routine. If a DLCP
command is already in progress, the interrupt routine
should return to the interrupted program to allow the
current DLCP command to finish.
Return Code Definition
68 Cluster Adapter
Read IPL Switch = Hex OE
Function: This command is used to read the state of the Remote
IPL switch on the requesting station.
Cluster Adapter 69
Start DLCP = Hex OF
Function: This command is used to release the DLCP from the
stopped state. It enables the DLCP to receive and
transmit frames.
Return Code Definition
70 Cluster Adapter
Dump Statistics = Hex 10
Function: This command is used to transfer the current
communication statistics block from the adapter.
Cluster Adapter 71
Communication Statistics Block (CSB)
Byte Definition
0 Number of Times No Response Received (LSB)
1 Number of Times No Response Received (MSB)
2 Number of Times Frame Rejects Received
3 Number of Control Frames Correctly Received (LSB)
4 Number of Control Frames Correctly Received (MSB)
5 Number of Data Frames Correctly Received (LSB)
6 Number of Data Frames Correctly Received (MSB)
7 Number of Control Frames with CRC Error
8 Number of Data Frames with CRC Error
9 Number of Duplicate Frames Received
10 Number of Received Frames That Were Rejected
11 Number of Transmit Collisions
72 Cluster Adapter
Diagnostic Function 1 = Hex 11
Function: This command is used to run an internal diagnostic
test.
Cluster Adapter 73
Link Control Block (LCB)
Field Value at Entry Value at Exit
Destination Test Number ** Unchanged
Source Don't Care Unchanged
Command = 11 (Hex) Unchanged
Buffer 1 Length Don't Care Unchanged
Buffer 1 Address Don't Care Unchanged
Buffer 2 Length Don't Care Unchanged
Buffer 2 Address Don't Care Unchanged
Return Code Don't Care Set to Return Code
Cluster Status Don't Care Extended Return Code
Select Adapter = 0 for Adapter 1 Unchanged
= 1 for Adapter 2
= 2 for Adapter 3
= 3 for Adapter 4
74 Cluster Adapter
Diagnostic Function 2 = Hex 12
Function: This command is used to transfer data to the adapter's
RAM from a buffer in system memory. The data in
buffer 1 is transferred to the address specified by
buffer 2 in the 8031 address space.
Cluster Adapter 75
Diagnostic Function 3 = Hex 13
Function: This command is used to transfer data from the
adapter's RAM to a buffer in system memory. The
data is transferred starting at the address specified by
the buffer 2 address (offset) in 8031 memory to
buffer 1 in the main system's memory.
76 Cluster Adapter
Diagnostic Function 4 = Hex 14
Function: This command is used to transfer data to the 8031 's
internal RAM from a buffer in system memory. The
data in buffer 1 is transferred to the address specified
by buffer 2 address in 8031 memory.
Cluster Adapter 77
Diagnostic Function 5 = Hex 15
Function: This command is used to transfer data from the
8031 's internal RAM to a buffer in system memory.
The data is transferred starting at the address
specified by buffer 2 address (offset) in 8031 memory
to buffer 1 in the main system's memory.
78 Cluster Adapter
Diagnostic Function 6 = Hex 16
Function: This command is used to execute an 8031 program at
the address specified by the buffer 2 address field. A
"Call" is made to that address and it is expected that
the called program sets the 8031 accumulator to a
return code value before returning. This return code
is placed in the Cluster Status field if non-zero.
Cluster Adapter 79
Diagnostic Function 7 = Hex 17
Function: This command is used to transmit any type of frame
to another station. For example, a control frame may
be sent to another station.
80 Cluster Adapter
Special Transmit Mode Command Bits
The three most-significant bits in the command field of the LCB
have the following meanings for transmit commands:
Notes:
1. These special transmit command bits are valid only for the
following DLCP BIOS commands:
Cluster Adapter 81
82 Cluster Adapter
Interface
Notes:
1. When more than one address select switch is On, the Cluster
Adapter decodes and responds to all I/O addresses selected.
2. Cluster Adapter 1 is the only adapter that decodes and
responds to all memory addresses; therefore, if more than one
Cluster Adapter is set as number 1 (Cl), undesirable results
occur.
3. If a Cluster Adapter does not have a select switch set to On, it
does not respond.
Cluster Adapter 83
Cluster Adapter Switch Settings
Cluster Adapter addresses and functions can be selected by two
eight-switch dual in-line package (DIP) switch blocks. The
following shows the switch assignments:
Notes:
84 Cluster Adapter
The following shows the station-address switch settings on switch
block 1.
Notes:
1. Bit switches 7 and 8 are not appl icable to the station address.
2. "On" represents the closed/on position.
3. "Off" represents the open/off position.
Cluster Adapter 85
Switch Block 1 Switch Settings
Station SW 1 SW2 SW3 SW4 SW5 SW6
15 On On On On Off Off
16 Off Off Off Off On Off
17 On Off Off Off On Off
18 Off On Off Off On Off
19 On On Off Off On Off
20 Off Off On Off On Off
21 On Off On Off On Off
22 Off On On Off On Off
23 On On On Off On Off
24 Off Off Off On On Off
25 On Off Off On On Off
26 Off On Off On On Off
27 On On Off On On Off
28 Off Off On On On Off
29 On Off On On On Off
30 Off On On On On Off
31 On On On On On Off
32 Off Off Off Off Off On
86 Cluster Adapter
Switch Block 1 Switch Settings
Station SW1 SW2 SW3 SW4 SW5 SW6
33 On Off Off Off Off On
34 Off On Off Off Off On
35 On On Off Off Off On
36 Off Off On Off Off On
37 On Off On Off Off On
38 Off On On Off Off On
39 On On On Off Off On
40 Off Off Off On Off On
41 On Off Off On Off On
42 Off On Off On Off On
43 On On Off On Off On
44 Off Off On On Off On
45 On Off On On Off On
46 Off On On On Off On
47 On On On On Off On
48 Off Off Off Off On On
49 On Off Off Off On On
50 Off On Off Off On On
Cluster Adapter 87
Switch Block 1 Switch Settings
88 Cluster Adapter
The following I/O addresses are assigned to the Cluster
Adapters:
I/O Address
Adapter (Hex) Device
Adapter 1 0790 Adapter Status Register
0791 Adapter Command/Data (Output)
Adapter Result/Data (Input)
0792 Adapter Interrupt Register
0793 Adapter Reset Control
Adapter 2 0890 Adapter Status Register
0891 Adapter Command/Data (Output)
Adapter Result/Data (Input)
0892 Adapter Interrupt Register
0893 Adapter Reset Control
Adapter 3 1390 Adapter Status Register
1391 Adapter Command/Data (Output)
Adapter Result/Data (Input)
1392 Adapter Interrupt Register
1393 Adapter Reset Control
Adapter 4 2390 Adapter Status Register
2391 Adapter Command/Data (Output)
Adapter Result/Data (Input)
2392 Adapter Interrupt Register
2393 Adapter Reset Control
Cluster Adapter 89
The Cluster Adapter can drive the I/O Channel Ready line low in
synchronization with the system clock when the processor reads
from the adapter card. This enables a longer read cycle from the
expansion slots. The option is selected by setting the I/O
Channel Ready switch (switch 7 of switch block 2) to On.
90 Cluster Adapter
The following is a sequence of the interrupt process for adapter 1:
Cluster Adapter 91
PortA
Port A is operated in mode 2 as a strobed, bidirectional, I/O bus.
In this mode, all eight bits of Port A (PAO through PA7) are
dedicated to data transfer between the microcomputer (8031) and
the system processor (8088).
PortH
Port B is operated in mode o. The low-order six bits (PBO
through PB5) provide the station address, and the high-order bit
(PB7) provides the Remote IPL (On/Off) status. Bit 7 (PB6 is
reserved). The source of information for Port B is switch block 1.
When a bit switch is On, the bit is active (low). The
microprocessor code in the 8031 complements the Port B
information to produce logical 1 active bits.
Port C
When port C is operated in mode 2, five lines are dedicated as
handshaking signals. The following four handshaking signals are
used by the Cluster Adapter:
• -Acknowledge (-ACK)
92 Cluster Adapter
• Input Buffer Full (IBF)
A low signal on the -STB (PC4) loads data from the 8088
into Port A.
Cluster Adapter 93
Cluster Bus Interface
The bus interface consists of a transmitter, receiver, carrier sense
circuitry, and internalloopback-mode logic. They are the
interface between the 8031 serial port and the 75Q coaxial cable.
94 Cluster Adapter
Carrier Sense Circuitry
The carrier sense circuitry provides information about the state of
the Cluster Adapter. This information is needed to implement
the collision avoidance protocol. The amplified signal received
from the bus is passed through a comparator to detect the
negative voltage state (less than approximately -150 millivolts).
This negative portion of the signal is inverted into + NRXD and
then ORed with the positive portion (greater than approximately
+ 150 millivolts) of the +RXD signal. The result is then sent to
the clear input of a 74LS161 counter. As long as this ORed
signal (CLR) is active (0), the counter is held reset. When the
signal goes inactive (1), the counter begins counting on the rising
edges of the 8031 +ALE signal. On the fourth +ALE pulse, the
counter is disabled and the -Carrier Sense signal goes inactive (1).
The time delay between the bus going inactive and -Carrier Sense
going inactive is 1.5 fJ,S.
The adapter is placed into internal loop back mode when the 8031
microprocessor code sets the + Internal Loop signal active (1).
This mode returns any data transmitted on + TXD to +RXD.
Notice that -RTS mayor may not be active. If -RTS is active, the
data not only returns to +RXD, but also is transmitted to the bus.
Cluster Adapter 95
Specifications
Ballpoint
Pen
Rocker
Switch
Shield
96 Cluster Adapter
Logic Diagrams
Cluster Adapter 97
."'~~
+Al~
...
+ All
...
DECOUI'lI.StAPS
tl-(:5, CHI!, C14, CIS. Cl~
98 Cluster Adapter
HR'UDR BIT 1
+11' IOOR BIT 0
+ RlD
+ TID
- CIIC un
:~~~R"L lOIlP
-CAflRIERS[ISE
{7.<>-C>'~
,~,
J!<>--DB21
Cluster Adapter 99
I 018
.---------''--'0 lUZ I
lZ lUZ 11
""
~. d···ll~L-.
IZ AD L-
~
I~I~'·'
13 1/•
Ot-
t-
{--
5 •
4 lS3Z ~rn
". ~5~:::,..!!
"*n
II
'"
.51
~ JC II11
"" -CI
-BE
21
II
, ST2315A
A11
13
11
."". U1f!.- II
"3
25
AI D8~
D5~ II
·
AI
Al D4~
AI 03i!-
5 .. D2~
I
-
q::~ DI~
0011
I ~~
~~
+IIY AOOR811 13
+lIYAODRBIT8
.~~~;~~;::;:~~~='=====-c==~H~~~[[~~ -- ~
~~RA.
18
~-BE
"
1Lt, -~~S4lI16.
151l n
II AID
~A8 :~~
~~~~~~~ES~3Elr-tUJ:ll~1~~~~i1Ji~~~1l~rr~1·3....
13 AI D5~
, Al 114~
>iTF
+IIT AOOR/OAU BIT 0
i' .!
II U13
• "" ,,'
~,,==;:-r:=:l=E=ttlmtttnlliS
• -""---
"
5
7
AI
All
D3~
DZ~
Ol~
U21
+ALE "''')
- aEAOSTROB£
f~ 11rr=11*~=tmmm#t---~ 18ZJ.~RA.
" 01~
1 00 Cluster Adapter
I-----I-I~-----~----------I
I I
I I
-RTS
H-F-W.--t-------h-< I
+TID
I
I
I
+8101__------'-< I
I
+,UfI1031j
3000PF
.r-l~
". 300lll'F f1llM£
r~fRAME
Cluster Adapter (Sheet 3 of 3)
102 Cluster Adapter
Index
adapter reset 89
address switch settings 85
B
BIOS interface 20
block diagram 3
c
check inside DLCP flag 68
cluster access protocol 29
Cluster Adapter 1
adapter reset 89
address switch settings 85
BIOS interface 20
block diagram 3
bus interface 94
check inside DLCP flag 68
cluster access protocol 29
cluster initialization (DLCP initialization) 44
cluster status 58
cluster status table 35
collision avoidance 30
control field format 25
diagnostic function 1 73
Index-l
diagnostic function 2 75
diagnostic function 3 76
diagnostic function 4 77
diagnostic function 5 78
diagnostic function 6 79
diagnostic function 7 80
display cluster status 55
DLCP BIOS commands 42
dump statistics 71
error detection and recovery 34
frame format 24
frame reception 33
frame transmission 22
I/O addresses 83
I/O register definitions 12
Intel 8031 memory map 10
Intel 8031 port signals 5
Intel 8255 port signals 91
interrupt interface 90
interrupts 16
Link Control Block (LCB) 21
memory interface 90
polynomial generator checker 10
programming considerations 18
read IPL switch 69
read station address 66
receive frame 51
receive virtual frame 49
remote IPL 37
set Multicast address 67
special transmit mode command bits 81
start DLCP 70
status 60
status register bit definitions 13
stop DLCP 65
switch blocks bit assignments 84
switch settings 84
transmit broadcast frame 61
transmit frame 53
transmit virtual frame 63
Cluster Adapter switch settings 84
cluster bus interface 94
cluster initialization (DLCP initialization) 44
Index-2
cluster status 58
cluster status table 35
collision avoidance 30
control field format 25
frame format 24
frame reception 33
frame transmission 22
Index-3
I
I/O addresses 83
I/O register definitions 12
Intel 8031 memory map 10
Intel 8031 port signals 5
Intel 8255 port signals 91
interrupt interface 90
interrupts 16
memory interface 90
Index-4
receive frame 51
receive virtual frame 49
remote IPL 37
s
set multicast address 67
special transmit mode command bits 81
start DLCP 70
status 60
status register bit definitions 13
stop DLCP 65
switch blocks bit assignments 84
T
transmit broadcast frame 61
transmit frame 53
transmit virtual frame 63
Index-5
Index-6
-- - ---
-
---
--- -
--
- --- - Personal Computer
--_.-
-
----- --- Hardware Reference
Library
mM Game Control
Adapter
6361493
ii
Contents
Description .................................... 1
Programming Considerations ...................... 3
Address Decode ............................ 3
Data Bus Buffer/Driver ...................... 3
Trigger Buttons ............................. 3
Joystick Positions ........................... 3
II 0 Channel Description ..................... 4
Interface ...................................... 5
Specifications .................................. 7
Logic Diagram ................................. 9
iii
iv
Description
A9-AO ....
L 10 ) ...
~
" Convert
A Resistive Input
AEN Instruction Resistance
... Decode Digital K 4 I
lOW
...
Pulse "
lOR
... r--- r--
Address Decode
The select on the Game Control Adapter is generated by two
74LS138s as an address decoder. AEN must be inactive while
the address is hex 201 in order to generate the select. The select
allows a write to fire the one-shots, or a read to give the values of
the trigger buttons and one-shot outputs.
Trigger Buttons
The trigger button inputs are read by an In from address hex 201.
A trigger button is on each joystick or paddle. These values are
seen on data bits 7 through 4. These buttons default to an open
state and are read as 1. When a button is pressed, it is read as O.
Software should be aware that these buttons are not debounced in
hardware.
Joystick Positions
The joystick position is indicated by a potentiometer for each
coordinate. Each potentiometer has a range of 0 to 100 kilohms
that varies the time constant for each of the four one-shots. As
this time constant is set at different values, the output of the
one-shot will be of varying durations.
lOR, lOW: I/O Read and I/O Write are used when reading
from or writing to an adapter (In, Out).
MEMR,MEMW ALE,T/C
DACKO-DACK3 CLK,OSC
IRQ7-IRQ2 -5 Vdc
A19-A10
The user must first begin the conversion by an Out to address hex
201. An In from address hex 201 will force the digital pulse to go
high and remain high for the duration according to the resistance
value. All four bits (bit 3-bit 0) function in the same manner;
their digital pulse will all go high simultaneously and will reset
independently according to the input resistance value.
The joysticks will typically be a set of two (A and B). These will
have one or two buttons each with two variable resistances each,
with a range of 0 to 100 kilohms. One variable resistance will
indicate the X coordinate and the other variable resistance will
indicate the Y coordinate.
Joystick B Joystick A
,.....-------------,
: 1
,.-
--
---"'-", I
r--------------...
2 1 X-Coordinate
1
X-Coordinate I 9 ••..;.1_ _-1--.
I ,• ' J Button
I
1
1
Butto~;r--..------r! .,.
0 ~ i !, ~r-
I
1
1
1
V-Coordinate
I !~
" '2
:~! ~!~J
5• ,,
__ ,1
1
. __ 1_ _V-Coordinate
1 ?4-------r----I1_. 6 '
I 1'3 .~I ~I ____ -.~
I
I
I
,1'4
, •7,,
"
I'
1
IL _____________ .JI :',__
'·5 :,
: L: ____________ _
-- -_
-_ , ....I
15-Pin D-Shell
Connector
0
• • 9
• •
• •
•
• ••
• •
•
B • • 15
0
Button 6 10
Position 2 11
Ground 12
Position 3 13
Button 7 14
+5Vdc 15
Connector Specifications
A9 A22 6~
74LS138
."
•
§,
API
i-+5v--------, 1
A8
A7
AS
A13
A24 5
I
'"". I
I
I 8
A25 1
1 1
,.
A5 A26
A17 3
:
a
U2
-
YO
15 1
IK 1
1
15
•5 ~
74LS138
L'-- 10 II 12J
14
AEN All , G18 10
7
"" '""0
1
G1
A
Ul
1
A2 A1'
1
•
~~
3
" A18
-
os
ClO
"C7
51p! :J51Pf~51Pt~51Pl~ "
lOW Sl3
~
,
10 U3
8 -
FIRE
."
~ ---4<~
--+
NE558 ~
5
lOA 81.
13 U3
74LS244
--------:=:=-
11
lJ5l!!~
1
-
ENAB
j Ifi
I
."
----I
API
~
~ T~
Ts
T
RST
ONV
n
13
,C4
.01vl
13
141
AP1
12.U-i •
13
I
r I .La14 i3
,
11
d
I
07 A1
11
'"
10
I,. ,
•
I IK I
I
GN04 ~_OlVI
I 15 2
06
05
04
,.
A3
A5
14
Ifi
IB
IY3
IY2
IYI
1A3
1A1
!AI
•
1
I
1
L' , 7
I
I
8 _J
U4
~Cl3vf
J.01 J Ifi
L ___ ...J
I 3
-4--- -
t= ~2
3 17 1
03 AS 1Y4 114 O. A
02 A7
5 1Y3 1A3
15
,8
O. • 7 I :!:: CI2
C':l 01 AS ,7
2Y2 1A1 13
11 16
0,
00
C 10
15
I-Olv!
DO A9 ~ 0
S
(D
~
110 CHANNEL
f'
~
QUAOTIMER 1~II~I - ~
15·PIN
O-SHELL
11
Q .5V 83
CI C2 OJ
" C5 RECEPTACLE
=
....
...
'5V
." 047p1
+
-=->
Q GNO
GNO
SI
831
~
.....
ICARIl ADDRESS = 201)
...
(D