Text preview for : Disk_Diagnostic_Feb78.pdf part of xerox Disk Diagnostic Feb78 xerox alto memos_1978 Disk_Diagnostic_Feb78.pdf



Back to : Disk_Diagnostic_Feb78.pdf | Home

Inter- Office Memorandum


To F Ludolph Date February 13, 1978



From JR Cucinitti Location Palo Alto


Subject Disk Diagnostic Organization SDD/CS/SD

XEROX



Filed on: (Cucinitti) Diskdiag.memo



The Disk Diagnostic pack has two diagnostics written in four different places in anticipation of loosing one or
more of them. One diagnostic is booted by using just the boot button in the first case. and depressing the 0 key
and pushing the boot button in the next. The other diagnostic is booted with the K key and boot button. and
the V key and the boot button.

The diagnostic booted with no keys and the 0 key will write one pass on the disk and then start into a read
loop. we call it write once. read forever. To run the diagnostic just type 40001B (this sets an error breakpoint),
40000P (sends the Alto to 40000 to fetch the first instruction). The diagnostic booted with the K or V key will
write. read. write. read....... To run this diagnostic type 1001B (sets the error breakpoint). 1000P (fetches the
instruction from 1000). To halt the diagnostic just depresss the Swat key. this will display four registers, to
continue depress the P (procede) key.

The knowledge of the location of the diagnostics in the Alto memory is of some use. The diagnostic booted by
the 0 key resides from 40000 thru 42154 and uses memory locations from 1000 thru 37777 for the data
handling area. The diagnostic booted by the K key resides from 1000 thru 3153 and uses 40000 thru 176777 for
the data handling area. The first 777 locations are used to run the display and keyboard and should not be
changed. You may note that the listing does not reflect the true memory locations but do indicate the locations
relative to the starting locations of the diagnostics.

The debugger located in the first 1000 locations will allow you to modify any memory location and remember it
only knows about octal numbers. The commands to the debugger are:
nl opens and displays memory location n
cr inserts the typed information in n and closes the location
.. modifies. closes location n. and opens location n+l
1" modifies. closes location n. and opens location n-l
A displays accumulators 0- 3
nB set a breakpoint at location n
nD deletes breakpoint n (1- 9)
nP procede from this location

When you do get an error you will see something like this:

DATA COMPARE FAILED
0:123456 1:123455 2:012345 3:001612

ACO = Data that was to be written on the disk
ACI = Data that was read from the disk (this may indicate a memory problem)
AC2 = Memory location the disk data was written into
AC3 = Of no intrest concerns the text on the display
CONTROLLER REPORTS BAD STATUS:
0:002310 1:007541 2:034523 3:001612

ACO = Of no intrest
ACI = Disk controller status
AC2 = Pointer to disk control block that failed
AC3 = Of no intrest concerns the text on the display

See the Alto hardware manual for the orginization of the disk command blocks.

To continue from an error breakpoint just type P.
2


Some of the intresting locations in the diagnostic:
0562 Current sector (0-l3) updated by the diagnostic
0563 Minimum sector number
0564 Maximum sector number
0565 Current hea.d number (O=tlpper, l:::lower)
0566 Minimum head number
0567 Maximum head number
0570 Current drive (0 or 1)
0571 Minimum drive number
0572 Maximum drive number
0573 Current track number
0574 Minimum track (never less than 100)
0575 Maximun track

These locations may be changed to write only with one head and just in one sector on one track. If 0574 is
changed you may write over the boot loader so nel"er have it less than 100.
Some samples of the disk command blocks that are used for alignment:
Four cylinder seek
1000/2000 2000/1000
1001/0 2001/0
1002/44002 2002/44002
1003/0 2003/0
1004/0 2004/0
100510 200510
1006/0 2006/0
1007/0 2007/0
101010 201010
1011/10 2011/50
At this time set location 521 to 1000, when this location has some value other than 0 the disk microcode will go
to that location for the disk command block. To halt the loop set location 521 to O.
Track 0 or restore adjustment
1000/2000 2000/1000
1001/0 2001/0
1002/44002 2002/44002
1003/0 2003/0
1004/0 2004/0
100510 200510
1006/0 2006/0
1007/0 2007/0
101010 201010
1011/0 2011/51
For head alignment set the command block as follows:
1000/1000
1001/0
1002/44002
1003/0
1004/0
100510
1006/0
1007/0
101010
101111510(upper head), 101111514(1ower head)
The data burst is adjusted with the same block by changing only location 1011.
1011/1440(upper head), 101111444(1ower head)

The disk address may be changed at any time and the microcode will ddo the right thing, so you need not stop
the disk (52110) to switch from one head to the other. .
3


This is the listing of the diagnostic, if the diagnostic is loaded at 1000 then the first address is not 0 but 1000
and the listing reflects the locations relative to 1000, if loaded at 40000 all locations are relative to 40000.


0001 ALTKD
4



ALTO DISK DIAGNOSTIC
E. MCCREIGHT
,
102513 .DALC SG=SUBL# O,O,sNC
102512 .DALC SLE=SUBL# O,O,SZC
.TITL ALTKD
.NREL
.EXTN PHIAD,MESSAGE
000001 .TXTM 1


. ALTO CONSTANTS ADDRESS
000521 KBCON =521; DISK BLOCK
000420 DASCON=420; DISPLAY BLOCK ADDRESS
000452 WWCON =452; WAKEUPS WAITING ADDRESS
000501 IVCON =501; VECTOR OF INTERRUPT NEW PC'S
061001 EIR:(il00l; OPCODE FOR ENABLE INTERRUPTS
061000 DIR:(il000; OPCODE FOR DISABLE INTERRUPTS
061002 BRI:(il002; OPCODE FOR RETURN FROM INTERRUPT
000527 TRPC=527; BEFORE A TRAP THE PC GOES HERE
000530 TRPVEC=530; THE VECTOR OF 37 TRAP LOCATIONS GOES HERE
062000 ERROR:(i2000; UNIMPLEMENTED I/O OPERATION WHICH TRAPS

THE OLD FORMAT OF A DISK CONTROL BLOCK

000000 POINTER = 0
000001 STA TUS= 1
000002 DSKCOMM= 2
000003 LABEL= 3.
000004 DATA= 4
000005 HDRWD= 5
000006 DSKADR = 6
000007 SUCCESS =7
000010 FAILURE= 10
000011 HEADER = 11
000012 FINISHUP= 12
000013 INTSDONE= 13
000014 SERRS= 14
000015 DCBEND = 15




. INITIALIZE THE DISK ERROR BREAK
00000'000402 INIT: JMP .+2; SKIP OVER
00001'002411 BREAK: JMP@ .RR2; PUT DEBUGGER BREAKPOINT HERE !!!
00002'006401 JSR@ .+1; SET UP THE INTERRUPT SYSTEM
00003'001500' SIZEM
00004 '126400 SUB 1,1; ZERO THE ERROR COUNTER
00005'000406 JMP IN ITA; SKIP OVER THE DISPLAY CONTROL BLOCK
00006'000000 DB: 0; MUST BE AN EVEN ADDDRESS
0002 ALTKD
5

00007 '000040 40
00010'000000 DBMP: 0
00011'000536 350.
00012'001473'.RR2: RR2
00013'044011-INITA: STA 1,SERRCNT; ZERO SOFT ERROR COUNT
00014'044012- STA 1,HERRCNT; AND HARD ERROR COUNT
00015'022433 LDA@ O,.RBOT; REASON TABLE RESET TO EMPTY
00016'042433 STA@ O,.RTOP
00017'006401 JSR@ .+1
00020'001042' SUINT
00021'030004- LDA 2,KBLKADR; SET UP ILLEGAL CURRENT ADRESS TO
00022'020425 LDA O,ALLONES; FORCE A SEEK
00023 '041002 STA 0,2,2
00024'030003- LDA 2,DASTART
00025'020425 LDA O,DBLKAD
00026'041000 ST A 0,0,2; START THE DISPLAy
00027'006424 JSR@ SDBAD; SET UP DISK CONTROL BLOCK CHAINS
00030'101010 MOV # 0,0; NOP
00031'002401 REDO: JMP@ .+1
00032'000033' WRTIT
00033'006456 WRTIT: JSR@ SMAD
00034'000446 JMP IDONE
00035'030417 IMORE: LDA 2,WRTBLK; SET UP TO WRITE AT CURRENT DISK ADDRESS
00036'004466 JSR MKDCB
00037'101010 MOV # 0,0; NOP
00040'006453 JSR @ARGEN; INITIALIZE DATA BLOCK
00041'101010 MOV # 0,0; NOP
00042'006401 JSR@ .+1; ENTER CPTR IN COMMAND QUEUE
00043'000414' EQUE
00044'006446 JSR@ lAD; GET THE NEXT DISK ADDRESS
00045'000415 JMP RDIT; IF NONE EXIST, READ THE RECORDS
00046'000767 JMP IMORE; OTHERWISE, DO IT AGAIN
00047'177777 ALLONES: 177777
00050'000356'.RBOT: RSNBOT
00051'000400'.RTOP: RSNTOP
00052'000006'DBLKAD: DB
00053'000775'SDBAD: SUDB
00054'000055'WRTBLK: .+1
00055'000106' WRTALL
00056'000107' IHDR
00057'000001- CODAD
00060'000110' NOPAD
00061'000601'ANOERR: NOERR


READ ALL RECORDS ON THE DISK AND COMPARE THEM WITH WHAT
.WAS WRITTEN

00062'006427 RDIT: JSR@ SMAD; GO BACK TO THE MINIMUM DISK ADDRESS
00063'000417 JMP IDONE; (IF ERROR)
00064'030406 RDMORE: LDA 2,RDBLK; READ A BLOCK AT THE CURRET ADDRESS
00065'004427 JSR DODCB
00066'101010 MOV # 0,0; NOP
00067'006423 JSR@ lAD; GET NEXT DISK ADDRESS
0003 ALTKD
6


00070'000412 JMP IDONE; IF WE ARE AT THE END, EMPTY THE QUEUE
00071'000773 JMP RDMORE; OTHERWISE GET A NEW QUEUE ENTRY AND TAKE OFF
00072'000073'RDBLK: .+1
00073'000077' CHRR
00074'000101' SUBST
00075'000001- CODAD
00076'000100' ACDAT

00077'000120 CHRR: 120; CHECK HEADER AND LABEL, READ REST OF SECTOR
00100'000615'ACDAT: CDAT;
00101'000000 SUBST: 0

00102'006401 IDONE: JSR@ .+1; MAKE SURE COMMAND QUEUE EMPTIES
00103'000464' FLUSH
00104'002401 SMASH: JMP@ .+1
00105'000031' REDO

00106'000374 WRTALL: 374
'00107'171717IHDR: 171717
00110'000602'NOPAD: CKDERR;
00111'000474'SMAD: SETMIN
00112'000506'IAD: INCAD
001l3'000650'ARGEN: RGEN


MAKE UP A DISK CONTROL BLOCK AND QUEUE IT FOR THE DISK
,
00114'054407 DODCB: STA 3,R3DOD
00115'004407 JSR MKDCB; MAKE UP THE PROPER DCB
00116'101010 MOV # 0,0; NOP
00117'006401 JSR@ .+1; QUEUE IT
00120'000414' EQUE
00121'034402 LDA 3,R3DOD
00122'001401 JMP 1,3
00123'000000 R3DOD: 0


MAKE UP A DISK CONTROL BLOCK. REGISTER 2 CONTAINS A POINTER
TO A FOUR- WORD BLOCK OF POINTERS TO ITEMS TO BE INCLUDED
IN THE CONTROL BLOCK: (0) THE DISK COMMAND
(1) THE HEADER WORD
(2) THE DISK ADDRESS
(3) THE FINISHUP ROUTINE
,
00124'054422 MKDCB: STA 3,R3MKD
00125'050422 STA 2,MKDPARM
00126'004422 JSR GCB; GET AN A VAILABLE COMMAND BLOCK
00127'101010 MOV # 0,0; NOP
00130'030002- LDA 2,CPTR; THE COMMAND BLOCK
00131'034416 LDA 3,MKDPARM
00132'023400 LDA@ 0,0,3; THE DISK COMMAND
00133'041002 STA O,DSKCOMM,2
0004 ALTKD
7


00134'023401 LDA@ 0,1,3; THE HEADER WORD
00135'041005 STA 0,HDRWD,2
00136'023402 LDA@ 0,2,3; THE DISK ADDRESS
00137'041006 STA 0,DSKADR,2
00140'023403 LDA@ 0,3,3; THE FINISHUP ROUTINE
00141'041012