[Copyright 1999,2002 Frank Durda IV, All Rights Reserved. Mirroring of any material on this page in any form is expressly prohibited. The official web site for this material is: http://nemesis.lonestar.org Contact this address for use clearances: clearance at nemesis.lonestar.org Comments and queries to this address: web_software at nemesis.lonestar.org]
MISOSYS EDAS-4.3 04/11/99 22:13:01 Winchester Format - LDOS 5.1 Page 00001
00001 ;Hdform6/ASM - LDOS X.X - 02/07/84
00003 ;*=*=*
00004 ; Version equates
00005 ; set only 1 drive model TRUE (-1)
00006 ;*=*=*
0000 00007 ARM EQU 0
0000 00008 MTI EQU 0
0000 00009 LDI EQU 0
0000 00010 LSI EQU 0
FFFF 00011 TRS EQU -1
0000 00012 PDC EQU 0
00013 ;*=*=*
FFFF 00014 RAM EQU -1 ;True for 6.x LDOS
0063 00015 RLS EQU 63H ;Release version # for GAT
00016 ;*=*=*
00017 ;Define FORM$ and HELLO$
0000 00018 LOGON MACRO ; dummy macro definiton
0000 00019 DB '** Dummy Macro **'
0000 00020 ENDM
0000 00022 *GET BUILDVER/ASM:3 ;<631>
00023 ;
00024 ; Buildver/asm is a bit of a kludge since not all utilities can load
00025 ; equates from LDOS60 and still compile. LOWCORE and everybody else
00026 ; relies on this setting, and it eventually ends up in LDOS60/EQU
00027 ; for programs that can use that.
00028 ;
FFFF 00029 @BLD631 EQU -1 ;<631>Build 631 distribution (LEVEL 1B)
00030 ; These switches activate patches made since the 1B release.
00031 ; It is important that all earlier patches be enabled when a higher
00032 ; patch is enabled.
00033 ; Patches C thru F were published in TMQ IV.iv, page 32 (NOTE: the
00034 ; patch addresses listed for SPOOL in SPOOL1/FIX are 19H high.)
FFFF 00035 @BLD631C EQU -1 ;<631>Apply 1C patches (SETKI)
FFFF 00036 @BLD631D EQU -1 ;<631>Apply 1D patches (DIR)
FFFF 00037 @BLD631E EQU -1 ;<631>Apply 1E patches (DIR & MEMDISK/DCT)
FFFF 00038 @BLD631F EQU -1 ;<631>Apply 1F patches (SPOOL)
00039 ; Patches G and H were published in TMQ V.i, pages 10 and 18/19.
FFFF 00040 @BLD631G EQU -1 ;<631>Apply 1G patches (//KEYIN,DIR,DO *)
FFFF 00041 @BLD631H EQU -1 ;<631>Apply 1H patches (MEMORY)
00042 ;
00043 ;End of BUILDVER/ASM
0000 00044 *GET HDFMT1/ASM:3
00045 ;HDFORMX/ASM - LDOS 5.1 or 6.x - 04/29/83
00046 ;*=*=*
00047 ; Change Log
00048 ;Moved all system routines to end
00049 ;For easier 5.1/6.x compatibility -LM
00050 ;Put WD FORMAT code here instead of in driver
00051 ;Update system DCT for DIR cyl when done-04/26/83
00052 ;*=*=*
00053 IF RAM
2400 00054 ORG 2400H
00055 ELSE
00056 ORG 5400H
00057 BEGIN EQU $
00058 ENDIF
00059 ;*****
00060 ; FORMAT routine entry point
00061 ;*****
2400 E5 00062 USER PUSH HL ;Save cmdline ptr
2401 219C2C 00063 LD HL,HELLO$ ;Log on
2404 CD022B 00064 CALL @DSPLY ;Hello message
2407 E1 00065 POP HL ;Rcvr ptr to cmdline
00066 ;*=*=*
00067 ; Grab any parameters
00068 ;*=*=*
2408 E5 00069 PUSH HL ;Save again
2409 2B 00070 DEC HL
240A 23 00071 FNDPRN INC HL
240B 7E 00072 LD A,(HL)
240C FE0E 00073 CP CR+1 ;End of line?
240E 380D 00074 JR C,FMT1 ;No parms
2410 FE28 00075 CP '('
2412 20F6 00076 JR NZ,FNDPRN
2414 119030 00077 LD DE,PARMTBL ;Parse any parameters
2417 CD142B 00078 CALL @PARAM
241A C2C72A 00079 JP NZ,PRMERR ;Jump on parm error
00080 ;*=*=*
00081 ; Scan for drivespec on command line
00082 ;*=*=*
241D E1 00083 FMT1 POP HL ;Cmd line again
241E 7E 00084 LD A,(HL) ;Ignore spaces
241F 23 00085 INC HL
2420 FE20 00086 CP 20H
2422 28F9 00087 JR Z,FMT1
2424 FE3A 00088 CP ':' ;Colon drive indicator?
2426 2013 00089 JR NZ,WHDRV
2428 7E 00090 LD A,(HL) ;P/u drive #
2429 D630 00091 SUB '0' ;Cvrt to ASCII
242B DAC72A 00092 JP C,PRMERR ;0 or larger
242E FE08 00093 CP 8 ;Make sure not > 7
2430 D2C72A 00094 JP NC,PRMERR
2433 32D329 00095 LD (DISKIO+1),A ;Stuff drive
2436 1816 00096 JR FMT2 ;Don't ask
00097 ;*****
00098 ; Drive not entered, prompt for it
00099 ;*****
2438 CDD12A 00100 WHDRV1 CALL ABTJCL ;No reprompt if JCL
243B 21AD2D 00101 WHDRV LD HL,WHDRV$ ;"which drive...
243E CD4D2A 00102 CALL GETARG ;Get one char
2441 D630 00103 SUB '0' ;Cvrt to binary
2443 DA3824 00104 JP C,WHDRV1 ;Error if < 0
2446 FE08 00105 CP 8 ;Error if > 7
2448 D23824 00106 JP NC,WHDRV1
244B 32D329 00107 LD (DISKIO+1),A ;Stuff drive
00108 ;*=*=*
00109 ; Get the DCT of the requested drive
00110 ;*=*=*
244E B7 00111 FMT2 OR A
244F CAB32A 00112 JP Z,NOTZER ;Can't do logical 0
2452 4F 00113 LD C,A ;Set in drive register
2453 CD262B 00114 CALL GETDCT@ ;Find DCT pointer
2456 FDE5 00115 PUSH IY
2458 E1 00116 POP HL ;Put in HL
2459 7E 00117 LD A,(HL) ;Be sure enabled
245A FEC9 00118 CP 0C9H ; a RET?
245C CAB72A 00119 JP Z,ILLEG ;Quit if disabled
245F 222A2C 00120 LD (DCTPTR),HL ;Save for later
2462 11FF30 00121 LD DE,FMTDCT ;Move SYSTEM DCT into
2465 D5 00122 PUSH DE
2466 010A00 00123 LD BC,10 ; FORMAT's buffer so we
2469 EDB0 00124 LDIR ; don't update the SYS
246B FDE1 00125 POP IY ;Use for FORMAT
00126 ;
00127 IF MTI!LSI!ARM!TRS!PDC
00128 ;*=*=*
00129 ; This format only for hard drive - check it
00130 ;*=*=*
246D FDCB035E 00131 BIT 3,(IY+3) ;Check if hard drive
00132 ENDIF
00133 ;
00134 IF LDI
00135 ;*=*=*
00136 ; This format only for alien drive - check it
00137 ;*=*=*
00138 BIT 4,(IY+4) ;Check if alien drive
00139 ENDIF
00140 ;
2471 CAC32A 00141 JP Z,NOTHARD ;Only HD format allowed
2474 FD6E01 00142 LD L,(IY+1) ;Check if on HD driver
2477 FD6602 00143 LD H,(IY+2) ; compatible with this
247A 23 00144 INC HL ; version of FORM...
247B 23 00145 INC HL ;Bump to start of name
247C 23 00146 INC HL
247D 23 00147 INC HL
247E 11972C 00148 LD DE,FORM$-1 ;Pt to which version
2481 0603 00149 LD B,3 ;Check 3 bytes
2483 23 00150 CKVER INC HL
2484 13 00151 INC DE
2485 1A 00152 LD A,(DE) ;Check if driver name
2486 BE 00153 CP (HL) ; is this version's
2487 C2AB2A 00154 JP NZ,DIFDVR ;Go if wrong version
248A 10F7 00155 DJNZ CKVER
00156 ;*=*=*
00157 ; Check on Pack Name entry
00158 ;*=*=*
248C 210000 00159 NPARM LD HL,0 ;Test if user entered
248F 7C 00160 LD A,H ; the NAME parameter
2490 B5 00161 OR L
2491 2826 00162 JR Z,DSKNAM ;Go if not
2493 3C 00163 INC A ;Was it just NAME?
2494 2823 00164 JR Z,DSKNAM ;Go if just NAME
2496 11D032 00165 LD DE,GATBUF+0D0H ;Yes, move name to field
2499 0608 00166 LD B,8 ;8-chars max
249B 7E 00167 MOVNAM LD A,(HL) ;P/u a char
249C FE22 00168 CP '"' ;Closing "
249E 282B 00169 JR Z,CKNAME ;Exit if end of parm
24A0 FE20 00170 CP 20H ;Permit all but controls
24A2 DACB24 00171 JP C,CKNAME
24A5 FE61 00172 CP 'a'
24A7 3806 00173 JR C,MOVNAM1
24A9 FE7B 00174 CP 'z'+1
24AB 3002 00175 JR NC,MOVNAM1
24AD EE20 00176 XOR 20H ;Turn off lc
24AF 12 00177 MOVNAM1 LD (DE),A
24B0 23 00178 INC HL
24B1 13 00179 INC DE
24B2 10E7 00180 DJNZ MOVNAM
24B4 1815 00181 JR CKNAME
00182 ;*****
00183 ; Prompt user for name parameter
00184 ;*****
24B6 CDD12A 00185 DSKNAM1 CALL ABTJCL
24B9 21CA2D 00186 DSKNAM LD HL,DSKNAM$ ;"diskette name?
24BC 0608 00187 LD B,8
24BE CD4F2A 00188 CALL GETARGX
24C1 28F3 00189 JR Z,DSKNAM1 ;Reprompt if none entered
24C3 48 00190 LD C,B ;Only move to name field
24C4 0600 00191 LD B,0 ; how many were entered
24C6 11D032 00192 LD DE,GATBUF+0D0H
24C9 EDB0 00193 LDIR
24CB 11D032 00194 CKNAME LD DE,GATBUF+0D0H
24CE CD1D2A 00195 CALL CKMPW0
24D1 C2A72A 00196 JP NZ,BADNAM
00197 ;*=*=*
00198 ; Get today's date
00199 ;*=*=*
24D4 21D832 00200 GETDAT LD HL,GATBUF+0D8H ;Get today's date & stuff
24D7 CD2A2B 00201 CALL @DATE
00202 ;*=*=*
00203 ; Check master password entry
00204 ;*=*=*
24DA 210000 00205 MPWPARM LD HL,0 ;Did user enter the MPW?
24DD 7C 00206 LD A,H
24DE B5 00207 OR L
24DF 2821 00208 JR Z,MPW ;Go prompt if not
24E1 3C 00209 INC A ;Test if just MPW
24E2 281E 00210 JR Z,MPW ;Go if just MPW
24E4 11532D 00211 LD DE,MPWBUF ;Shift to pswd field
24E7 0608 00212 LD B,8
24E9 7E 00213 MOVMPW LD A,(HL)
24EA FE30 00214 CP 30H ;No spaces permitted
24EC 381C 00215 JR C,PRSMPW ;End also on closing "
24EE FE61 00216 CP 'a' ;Need cvrt to UC?
24F0 3806 00217 JR C,MOVMPW1
24F2 FE7B 00218 CP 'z'+1
24F4 3002 00219 JR NC,MOVMPW1
24F6 CBAF 00220 RES 5,A ;Cvrt to UC
24F8 12 00221 MOVMPW1 LD (DE),A
24F9 13 00222 INC DE
24FA 23 00223 INC HL
24FB 10EC 00224 DJNZ MOVMPW
24FD 180B 00225 JR PRSMPW
00226 ; ****
00227 ; Prompt for master password
00228 ;*****
24FF CDD12A 00229 MPW1 CALL ABTJCL
2502 21F42D 00230 MPW LD HL,MPW$ ;"master...
2505 CD722A 00231 CALL INPMPW
2508 28F5 00232 JR Z,MPW1 ;Re-prompt on no entry
00233 ;*****
00234 ; Parse the password & stuff into GAT sector buf
00235 ;*****
250A 11532D 00236 PRSMPW LD DE,MPWBUF
250D CD0E2A 00237 CALL CKMPW ;Check for valid MPW
2510 20ED 00238 JR NZ,MPW1 ;Invalid entry
2512 22CE32 00239 LD (GATBUF+0CEH),HL ;Stuff it
00240 ;*****
00241 ; Routine to galculate the # of grans per logical
00242 ; cylinder so that the GAT byte can be constructed
00243 ;*****
2515 FD7E08 00244 CALCGPC LD A,(IY+8) ;P/u # of grans per cyl
2518 07 00245 RLCA ;Rotate to bits 0-2
2519 07 00246 RLCA
251A 07 00247 RLCA
251B E607 00248 AND 7 ;Strip off other data
251D 3C 00249 INC A ;Adj for zero offset
00250 ;*=*=*
00251 ; If double cylindering, double the count
00252 ;*=*=*
251E FDCB046E 00253 BIT 5,(IY+4) ;Double?
2522 2801 00254 JR Z,$+3
2524 87 00255 ADD A,A ;Count * 2
2525 01FFFF 00256 LD BC,0FFFFH ;Init GAT byte to ones
2528 CB20 00257 CGPC1 SLA B ;Now keep removing low
252A 3D 00258 DEC A ; order bits , 1 bit for
252B 20FB 00259 JR NZ,CGPC1 ; each available granule
252D 78 00260 LD A,B ;Save the default byte
252E 32C627 00261 LD (CALC1+1),A ; for dir test
2531 210032 00262 LD HL,GATBUF ;Pt to GAT buffer area
2534 FD7E06 00263 LD A,(IY+6) ;P/u highest # cylinder
2537 70 00264 CGPC2 LD (HL),B ;Stuff the GAT byte into
2538 2C 00265 INC L ; each position of the
2539 BD 00266 CP L ; Gat, one byte per
253A 30FB 00267 JR NC,CGPC2 ; cylinder
00268 ;*=*=*
00269 ; Test if we are at 202 first by ignoring the
00270 ; first two instructions with LD DE,xxxx
00271 ;*=*=*
253C 3ECB 00272 LD A,0CBH ;Continue to stuff GAT
253E 11 00273 DB 11H ; until cyl 202
253F 71 00274 CGPC3 LD (HL),C
2540 2C 00275 INC L
2541 BD 00276 CP L
2542 20FB 00277 JR NZ,CGPC3
00278 ;*=*=*
00279 ; Check if this pack is already formatted
00280 ;*=*=*
2544 FDE5 00281 PFMT3 PUSH IY ;Xfer DCT ptr to HL
2546 E1 00282 POP HL ; & move DCT again
2547 119D2A 00283 LD DE,TMPDCT
254A 010A00 00284 LD BC,10
254D EDB0 00285 LDIR
00286 ;*=*=*
00287 ; May be formatted, is there SYSTEM information?
00288 ;*=*=*
254F 210000 00289 LD HL,$-$ ;NOSTOP entered?
2550 00290 NOSTOP EQU $-2 ;Via param
2552 7C 00291 LD A,H
2553 B5 00292 OR L
2554 C2DB25 00293 JP NZ,PFMT6 ;No testing if set
2557 210034 00294 LD HL,HITBUF ;Pt to i/o buffer
255A 110000 00295 LD DE,0 ;Init to cyl 0, sect 0
255D CDB829 00296 CALL RDSEC ;Now try to read BOOT
2560 C2DB25 00297 JP NZ,PFMT6 ;Assume unformatted if err
2563 211D2E 00298 LD HL,HASDAT$ ;Init "disk contains data
2566 CD182B 00299 CALL @LOGOT
2569 21342E 00300 LD HL,NOFMT$ ;Init "non-std format
00301 ;*=*=*
00302 ; BOOT was read, is there a valid directory pointer
00303 ;*=*=*
256C 3A0234 00304 LD A,(HITBUF+2) ;P/u dir cyl # (possible)
256F FDBE06 00305 CP (IY+6) ;Check against max cyl #
2572 3053 00306 JR NC,PFMT5 ;Go if bigger (or =)
00307 ;*=*=*
00308 ; Read the assummed GAT & test it
00309 ;*=*=*
2574 210034 00310 LD HL,HITBUF
2577 5D 00311 LD E,L ;Tricky way to get a zero
2578 57 00312 LD D,A ;Pt to assumed GAT sector
2579 210034 00313 LD HL,HITBUF ;Pt to buffer
257C CDB829 00314 CALL RDSEC ;Read the sector
257F FE06 00315 CP 6 ;Dir errcod returned?
2581 2805 00316 JR Z,PFMT4 ;Jump if yes & grab data
2583 21492E 00317 LD HL,CANTRD$ ;Init "unreadable dir...
2586 183F 00318 JR PFMT5
2588 215F2E 00319 PFMT4 LD HL,NODIR$ ;Init "non-init dir
258B 3ADA34 00320 LD A,(HITBUF+0DAH) ;Check if date field
258E FE2F 00321 CP '/' ; is present
2590 2035 00322 JR NZ,PFMT5
00323 ;*=*=*
00324 ; The directory is readable - request its MPW
00325 ;*=*=*
2592 21D034 00326 PFMT4A LD HL,HITBUF+0D0H
2595 117F2E 00327 LD DE,PACKID$+5 ;Move name & date into
2598 010800 00328 LD BC,8 ;Display message field
259B EDB0 00329 LDIR
259D 118E2E 00330 LD DE,PACKID$+14H
25A0 0E08 00331 LD C,8
25A2 EDB0 00332 LDIR
25A4 217A2E 00333 LD HL,PACKID$
25A7 CD182B 00334 CALL @LOGOT ;Log the id field
25AA CDD12A 00335 CALL ABTJCL ;Abort if in JCL
00336 ;*=*=*
00337 ; User must enter Current Pack's MPW to proceed
00338 ;*=*=*
25AD 21972E 00339 OLDMPW LD HL,OLDMPW$ ;"What's the old MPW?
25B0 CD722A 00340 CALL INPMPW ;Grab user input to match
25B3 28F8 00341 JR Z,OLDMPW
25B5 11532D 00342 LD DE,MPWBUF
25B8 CD1A2A 00343 CALL HASHMPW ;Hash user entry
00344 ;*****
00345 ; Routine to test master password for match
00346 ;*****
25BB EB 00347 EX DE,HL ;Xfer hashed MPW to DE
25BC 2ACE34 00348 LD HL,(HITBUF+0CEH) ;Else grab pack MPW
25BF AF 00349 XOR A ;Clear carry flag
25C0 ED52 00350 SBC HL,DE ;Did user enter pack MPW?
25C2 C2BB2A 00351 JP NZ,BADMPW ;Abort if no match
25C5 1814 00352 JR PFMT6
00353 ;*=*=*
00354 ; The directory was not readable - req assurance
00355 ;*=*=*
25C7 CD182B 00356 PFMT5 CALL @LOGOT ;Log "unreadable...
25CA CDD02A 00357 CALL ABTJCL1 ;Abort if JCL running
25CD 210930 00358 LD HL,SURE?$ ;"Are you sure?...
25D0 0603 00359 LD B,3
25D2 CD4F2A 00360 CALL GETARGX ;Give user chance to
25D5 7E 00361 LD A,(HL) ; proceed with format
25D6 FE59 00362 CP 'Y'
25D8 C2BF2A 00363 JP NZ,FMTABT
00364 ;*=*=*
00365 ; OK to format - Shift DCT to work area
00366 ;*=*=*
25DB FDE5 00367 PFMT6 PUSH IY ;Move drive code table
25DD D1 00368 POP DE ;Back into place
25DE 219D2A 00369 LD HL,TMPDCT
25E1 010A00 00370 LD BC,10
25E4 EDB0 00371 LDIR
00372 ;*=*=*
00373 ; allow user to lock out tracks manually
00374 ;*=*=*
00375 ;
25E6 FDCB035E 00376 BIT 3,(IY+3) ;Hard drive?
25EA CAB026 00377 JP Z,NOLCT ;Go if floppy
00378 ;Calc possible heads and adjust msg
25ED FD7E04 00379 LD A,(IY+4) ;Starting head #
25F0 E60F 00380 AND 00001111B ;Field
25F2 C630 00381 ADD A,30H ;ASCII offset
25F4 00 00382 NOP ;Possible DEC if hd # are
25F5 5F 00383 LD E,A ;Given starting w/0
25F6 3C 00384 INC A ;Make number
25F7 57 00385 LD D,A ;Save
25F8 32692C 00386 LD (PHYD1$),A ;1st possible head
25FB FD7E07 00387 LD A,(IY+7) ;# of heads
25FE 07 00388 RLCA
25FF 07 00389 RLCA
2600 07 00390 RLCA
2601 E607 00391 AND 7 ;Field
2603 3C 00392 INC A ;Real #
2604 327C26 00393 LD (HDNB),A ;Save
2607 1C 00394 HCLP INC E ;Start fm 1st hd # -1
2608 3D 00395 DEC A ;Get highest head #
2609 20FC 00396 JR NZ,HCLP ;By counting
260B 7B 00397 LD A,E
260C 326B2C 00398 LD (PHYD2$),A ;
260F ED534926 00399 LD (HDNBRS),DE ;Save valid range
00400 ;
00401 ;Set up trk number message
2613 2600 00402 LD H,0
2615 FD6E06 00403 LD L,(IY+6) ;Trk count to BC
2618 23 00404 INC HL ;Fix offset fm 0
2619 FDCB046E 00405 BIT 5,(IY+4) ;Double?
261D 2801 00406 JR Z,ISREAL
261F 29 00407 ADD HL,HL ;*2
2620 2B 00408 ISREAL DEC HL ;Back to offset fm 0
2621 226A26 00409 LD (HTRK),HL
2624 11902C 00410 LD DE,PHYT1$ ;Posn for #
2627 CD0C2B 00411 CALL HEXDEC ;Stuff ASCII
262A 1803 00412 JR LCQUES
00413 ;Ask question
262C CDD12A 00414 LCQUES1 CALL ABTJCL
262F 212C2C 00415 LCQUES LD HL,LOCK$ ;Lock out any...
2632 CD4D2A 00416 CALL GETARG
2635 FE59 00417 CP 'Y'
2637 2809 00418 JR Z,LCHD1 ;Yes..
2639 FE4E 00419 CP 'N'
263B 2873 00420 JR Z,NOLCT ;Skip if not wanted
263D 18ED 00421 JR LCQUES1
263F CDD12A 00422 GTPHD CALL ABTJCL ;No errors allowed if JCL
2642 214D2C 00423 LCHD1 LD HL,PHYHD$ ;Which head...
2645 CD4D2A 00424 CALL GETARG
2648 210000 00425 LD HL,$-$ ;Range
2649 00426 HDNBRS EQU $-2
264B BC 00427 CP H
264C 38F1 00428 JR C,GTPHD ;Too low
264E 2C 00429 INC L
264F BD 00430 CP L
2650 30ED 00431 JR NC,GTPHD ;Too high
2652 328B26 00432 LD (LCHD),A ;Save track
2655 1803 00433 JR LCTR1
2657 CDD12A 00434 GTPHTR CALL ABTJCL
265A 216F2C 00435 LCTR1 LD HL,PHYTR$ ;Trk #..
265D 0603 00436 LD B,3
265F CD4F2A 00437 CALL GETARGX
2662 CD082B 00438 CALL DECHEX ;Make binary in BC
2665 78 00439 LD A,B
2666 B1 00440 OR C
2667 28EE 00441 JR Z,GTPHTR ;Can't lock out 0
2669 210000 00442 LD HL,$-$
266A 00443 HTRK EQU $-2 ;Highest trk #
266C B7 00444 OR A
266D ED42 00445 SBC HL,BC ;Entered >legal?
266F 38E6 00446 JR C,GTPHTR ;Number was too high
00447 ;
00448 ;Convert physical numbers to logical GAT posn
00449 ;
2671 FD7E08 00450 LD A,(IY+8)
2674 07 00451 RLCA
2675 07 00452 RLCA
2676 07 00453 RLCA
2677 E607 00454 AND 7
2679 3C 00455 INC A
267A 5F 00456 LD E,A ;E has grans/cyl (w/o double)
267B 3E00 00457 LD A,$-$
267C 00458 HDNB EQU $-1 ;Number of heads
267D C5 00459 PUSH BC
267E D5 00460 PUSH DE ;Save grans/phys cyl
267F CD212B 00461 CALL DIVEA@ ;Grans/head
2682 D1 00462 POP DE
2683 53 00463 LD D,E ;Save grans/phys cyl
2684 5F 00464 LD E,A ;Keep grans/phys trk
2685 E1 00465 POP HL ;Trk # to HL
2686 3A692C 00466 LD A,(PHYD1$)
2689 4F 00467 LD C,A
268A 3E00 00468 LD A,$-$ ;Physical hd #
268B 00469 LCHD EQU $-1 ;Entered value
268C 91 00470 SUB C ;Minus starting offset
00471 ;A=trk offset fm logical start/D=grans/trk/HL=trk to lock
268D D5 00472 PUSH DE
268E CD1C2B 00473 CALL MULTEA@ ;A=gran offset fm start
2691 D1 00474 POP DE
2692 FDCB046E 00475 BIT 5,(IY+4) ;Double tracking?
2696 2807 00476 JR Z,N1
2698 CB2C 00477 SRA H
269A CB1D 00478 RR L ;Div trk # by 2
00479 ;HL=>logical trk c set if 1st of pair
269C 3001 00480 JR NC,N1 ;1st cyl-go
269E 82 00481 ADD A,D ;Else add in a cyls grans
269F 2632 00482 N1 LD H,GATBUF<-8 ;
26A1 43 00483 LD B,E ;#grans to lock
26A2 5E 00484 LD E,(HL) ;Get alloc byte
00485 ;A=grans before locked out trk
26A3 3D 00486 DEC A ;Offset fm 0
26A4 3C 00487 OFFS2 INC A ;Set a bit for each gran
26A5 F5 00488 PUSH AF
26A6 CD8D2A 00489 CALL SETBIT ;Of the physical track
26A9 F1 00490 POP AF
26AA 10F8 00491 DJNZ OFFS2
26AC 73 00492 LD (HL),E ;And put back GAT byte
26AD C32F26 00493 JP LCQUES ;Ask for more
00494 ;
26B0 21F22E 00495 NOLCT LD HL,DBL$
26B3 FDCB046E 00496 BIT 5,(IY+4) ;Double tracking
26B7 C4022B 00497 CALL NZ,@DSPLY ;Notify user
00499 ;
26BA 00500 *GET HDFMT2/ASM:3
00501 ;HDFMT2/ASM - Hard format module - 10/31/83
00502 IF LDI
00503 ;*=*=*
00504 ; Begin the actual format - Check for "one" drive
00505 ;*=*=*
00506 XOR A ;Init the count
00507 EXX
00508 LD B,A
00509 EXX
00510 LD C,(IY+1) ;P/u the driver vector
00511 LD B,(IY+2) ; & ck for # parts
00512 LD HL,DCT$
00513 TSTDCT PUSH HL
00514 LD A,(HL) ;Is this disabled?
00515 CP 0C9H
00516 JR Z,NOTRES
00517 INC HL
00518 LD E,(HL) ;P/u the driver vector
00519 INC HL
00520 LD D,(HL)
00521 XOR A
00522 EX DE,HL
00523 SBC HL,BC
00524 EX DE,HL
00525 JR NZ,NOTRES ;Go if not this driver
00526 INC HL
00527 INC HL
00528 INC HL ;Point to DCT+5
00529 LD A,(HL)
00530 CP (IY+5) ;Is this the same drive?
00531 JR NZ,NOTRES
00532 EXX
00533 INC B ;Bump the drive count
00534 EXX
00535 NOTRES POP HL
00536 LD DE,10 ;Advance to next one
00537 ADD HL,DE
00538 LD A,8*10+DCT$&0FFH
00539 CP L ;Done with DCTs?
00540 JR NZ,TSTDCT
00541 EXX ;Check how many drives!
00542 DEC B ;Is there only one?
00543 EXX
00544 JR NZ,HRDRV1 ;Only FORMAT if one!!!
00545 ;*****
00546 ; Hard drive format - most work done by controller
00547 ;*****
00548 HRDRV BIT 3,(IY+3) ;Check for floppy
00549 JR Z,AFLOP ;Go if a floppy
00550 LD HL,LAST$ ;Give one last chance to
00551 CALL GETARG ;Abort before wiping disk
00552 AND 5FH ;Make U/c
00553 CP 'Y' ;Must be yes to continue
00554 JP NZ,FMTABT
00555 AFLOP LD A,(SYSPRM+1) ;Bypass the formatting
00556 OR A ; if system info only
00557 JR NZ,HRDRV1
00558 LD HL,FMTG$ ;"formatting - be patient
00559 LD DE,0 ;Set up for no interleave
00560 BIT 3,(IY+3) ;Hard drive?
00561 JR NZ,GOFMT
00562 LD E,5 ;Set interleave for 5"
00563 BIT 5,(IY+3) ;5" floppy?
00564 JR Z,GOFMT
00565 LD E,5 ;Same, but patchable!
00566 GOFMT CALL FMTHD ;Format hard drive
00567 JP NZ,IOERR
00568 ENDIF
00569 ;
00570 ;*=*=*
00571 ; Clear out the BOOT space
00572 ;*=*=*
26BA 210033 00573 HRDRV1 LD HL,BOOT1 ;CLear the BOOT space
26BD 366D 00574 PATLP LD (HL),6DH ;Using 6DB6 pattern
26BF 2C 00575 INC L
26C0 36B6 00576 LD (HL),0B6H
26C2 2C 00577 INC L
26C3 7D 00578 LD A,L
26C4 FED0 00579 CP 208
26C6 20F5 00580 JR NZ,PATLP
00581 ;*=*=*
00582 ; Calculate sectors/track & sectors/cylinder
00583 ;*=*=*
26C8 FD7E07 00584 LD A,(IY+7) ;# of sectors/track
26CB 57 00585 LD D,A ;-> reg E
26CC E61F 00586 AND 1FH ;Strip # of heads
26CE 5F 00587 LD E,A
26CF 1C 00588 INC E ;Bump for 0 offset
26D0 320A31 00589 LD (SECTRK),A ;Stuff # sectors/track
26D3 AA 00590 XOR D
26D4 07 00591 RLCA ;Get # of heads
26D5 07 00592 RLCA ; into reg D
26D6 07 00593 RLCA
26D7 3C 00594 INC A ;Adjust for zero offset
26D8 CD1C2B 00595 CALL MULTEA@
26DB FDCB046E 00596 BIT 5,(IY+4) ;Double tracking?
26DF 2801 00597 JR Z,$+3
26E1 87 00598 ADD A,A ;Twice the number
26E2 320931 00599 LD (SECCYL),A
00600 ;*=*=*
00601 ; Test if SYSTEM information only
00602 ;*=*=*
26E5 210000 00603 SYSPRM LD HL,0 ;P/u system info only
26E8 7C 00604 LD A,H ;Don't format if system
26E9 B5 00605 OR L ; info only is req
26EA C20E27 00606 JP NZ,DONTFMT
00607 ;
00608 IF LSI!MTI!ARM!TRS!PDC
00609 ;*=*=*
00610 ; Begin the formatting
00611 ;*=*=*
26ED 21222F 00612 LD HL,FMTCYL$ ;"formatting clinder...
26F0 CD022B 00613 CALL @DSPLY
26F3 1600 00614 BGNFMT LD D,0 ;Init to cyl 0
26F5 7A 00615 BFMT1 LD A,D ;P/u cylinder position
26F6 CDDE29 00616 CALL CVDEC ;Cvrt to decimal
26F9 D5 00617 PUSH DE ;Don't alter reg D
26FA CDF529 00618 CALL DSPCYL ;Display cyl #
26FD D1 00619 POP DE
00620 ENDIF
00621 ;
00622 IF MTI!TRS!PDC
26FE 210B31 00623 LD HL,SKEWDAT ;Point to skew table
00624 ENDIF
00625 ;
00626 IF LSI!MTI!ARM!TRS!PDC
2701 CDA629 00627 CALL WRCYL ;Cylinder write
2704 C2DB2A 00628 JP NZ,IOERR
2707 7A 00629 BFMT5 LD A,D ;Was this the last
2708 14 00630 INC D ; cylinder to format?
2709 FDBE06 00631 CP (IY+6)
270C 20E7 00632 JR NZ,BFMT1
00633 ENDIF
270E 00634 DONTFMT EQU $
00635 ;
00636 IF LSI
00637 ;*=*=*
00638 ; Lockout the alternate cylinder
00639 ;*=*=*
00640 LD HL,ALTLO$ ;"Inhibiting...
00641 CALL @DSPLY
00642 LD HL,GATBUF+77
00643 LD (HL),0FFH
00644 ENDIF
00645 ;
00646 ;**** Lock out CYL #1 on TRS or PERCOM for diagnostics.
00647 IF TRS!PDC
270E 21C92E 00648 LD HL,DIAG$
2711 CD022B 00649 CALL @DSPLY
2714 210132 00650 LD HL,GATBUF+1
2717 36FF 00651 LD (HL),0FFH
00652 ENDIF
00653 ;
2719 11FFFF 00654 VERPRM LD DE,-1 ;P/u verify parm
271C 7A 00655 LD A,D ;If 0, don't verify
271D B3 00656 OR E
271E CAB627 00657 JP Z,DONTVER
00658 ;*****
00659 ; Begin the verification process
00660 ;*****
2721 213B2F 00661 LD HL,VERCYL$ ;"Verifying cylinder...
2724 CD022B 00662 CALL @DSPLY
2727 1600 00663 LD D,0 ;Init cylinder ctr
2729 6A 00664 BVER1 LD L,D ;Pt to GAT byte for this
272A 2632 00665 LD H,GATBUF<-8 ; track & bypass verify
272C 7E 00666 LD A,(HL) ; if track not formatted
272D 3C 00667 INC A
272E 283F 00668 JR Z,BVER8
2730 7A 00669 LD A,D ;If this is the DIR cyl,
00670 ;
00671 IF MTI!LSI!ARM!TRS!PDC
2731 FDBE09 00672 CP (IY+9) ; use VERSYS, else VERSEC
2734 21AE29 00673 LD HL,WRSEC ;Init for reg sector
2737 2003 00674 JR NZ,$+5
2739 21B329 00675 LD HL,WRSYS ;Init for system sector
273C 225B27 00676 LD (BVER2W+1),HL ;Stuff vector
273F 21BD29 00677 LD HL,VERSEC
2742 2003 00678 JR NZ,$+5
2744 21C229 00679 LD HL,VERSYS
2747 225E27 00680 LD (BVER2V+1),HL
00681 ENDIF
00682 ;
274A CDDE29 00683 CALL CVDEC ;Cvrt to decimal
274D D5 00684 PUSH DE
274E CDF529 00685 CALL DSPCYL ;Display cylinder #
2751 D1 00686 POP DE
2752 AF 00687 XOR A ;Initialize starting
2753 326327 00688 LD (BVER5+1),A ; sector
2756 5F 00689 LD E,A
2757 210033 00690 BVER2 LD HL,BOOT1 ;Point to buffer
00691 ;
00692 IF LDI
00693 BIT 3,(IY+3) ;Only WRSEC a hard disk *
00694 CALL NZ,WRSEC ;Write first then...
00695 CALL Z,VERSEC ;SECtor or SYStem verify
00696 ENDIF
00697 ;
00698 IF MTI!LSI!ARM!TRS!PDC
275A CDAE29 00699 BVER2W CALL WRSEC ;Write first then...
275D CCBD29 00700 BVER2V CALL Z,VERSEC ;SECtor or SYStem verify
00701 ENDIF
00702 ;
2760 2016 00703 JR NZ,BVER9 ;Go on error
2762 3E00 00704 BVER5 LD A,0 ;P/u sector #
2764 3C 00705 INC A ;Bump it up
2765 326327 00706 BVER6 LD (BVER5+1),A ; and save new #
2768 5F 00707 LD E,A ;Xfer to sector register
2769 3A0931 00708 LD A,(SECCYL) ;Is this = a cyl?
276C BB 00709 CP E
276D 20E8 00710 JR NZ,BVER2 ;Go if cyl not done
00711 ;*=*=*
00712 ; Readjust for end of cylinder
00713 ;*=*=*
276F 7A 00714 BVER8 LD A,D ;P/u current cyl position
2770 14 00715 INC D ;Bump to next cyl
2771 FDBE06 00716 CP (IY+6) ;Cp to highest # cyl
2774 20B3 00717 JR NZ,BVER1 ;Go if more to verify
00718 ;
00719 IF LDI
00720 ;*=*=*
00721 ; If a floppy, then do the lockout table
00722 ;*=*=*
00723 BIT 3,(IY+3) ;If floppy, make a
00724 JR NZ,CALCDIR ; lockout, else skip *
00725 LD HL,GATBUF ;Allocation table
00726 LD DE,GATBUF+60H ;Lockout table
00727 LD B,0 ;High order length
00728 LD C,(IY+6) ;# of cyls
00729 INC C ;Adj for zero offset
00730 LDIR
00731 ENDIF
00732 ;
2776 183E 00733 JR CALCDIR ;Go start system info
00734 ;*=*=*
00735 ; Got verify error
00736 ;*=*=*
2778 00737 BVER9 EQU $
00738 ;
00739 IF LDI
00740 BIT 3,(IY+3) ;If floppy, only l/o
00741 JR NZ,BVER9A ; error 4 & 5
00742 CP 5 ;Data rec not found?
00743 JR Z,BVER10
00744 CP 4 ;Parity error?
00745 JP NZ,IOERR
00746 JR BVER10
00747 BVER9A EQU $
00748 ENDIF
00749 ;
2778 FE08 00750 CP 8 ;Hard, l/o all except
277A CADB2A 00751 JP Z,IOERR ; device not avail...
277D FE10 00752 CP 16 ; & all > 15
277F D2DB2A 00753 JP NC,IOERR
00754 ;*=*=*
00755 ; Lockout granule (hard) or cylinder (floppy)
00756 ;*=*=*
2782 D5 00757 BVER10 PUSH DE
2783 21542F 00758 LD HL,STAR$ ;Show the * lockout
2786 CD022B 00759 CALL @DSPLY
2789 D1 00760 POP DE
278A 6A 00761 LD L,D
278B 2632 00762 LD H,GATBUF<-8
278D FDCB035E 00763 BIT 3,(IY+3) ;If hard drive, then
2791 2004 00764 JR NZ,BVER11 ; only lockout gran
2793 36FF 00765 LD (HL),0FFH ;Lockout this cylinder
2795 18D8 00766 JR BVER8 ; its a floppy...
00767 ;*=*=*
00768 ; Bad sector on hard drive - Lockout the Granule
00769 ;*=*=*
2797 FD7E08 00770 BVER11 LD A,(IY+8) ;Get # of sectors/gran
279A D5 00771 PUSH DE ;Save this reg
279B E61F 00772 AND 1FH
279D 3C 00773 INC A ;Adj for zero offset
279E CD212B 00774 CALL DIVEA@ ;Calc which granule
27A1 F5 00775 PUSH AF ;Save gran #
27A2 5E 00776 LD E,(HL) ;P/u current GAT byte
27A3 CD8D2A 00777 CALL SETBIT ;Show gran allocated
27A6 73 00778 LD (HL),E ;Restuff into GAT
27A7 FD7E08 00779 LD A,(IY+8) ;Now point to next sector
27AA E61F 00780 AND 1FH
27AC 3C 00781 INC A
27AD 5F 00782 LD E,A ;Xfer SPG to reg E
27AE F1 00783 POP AF ;Rcvr # of bad gran
27AF 3C 00784 INC A ;Bump to start on next *
27B0 CD1C2B 00785 CALL MULTEA@ ;Calc 1st sector of
27B3 D1 00786 POP DE ; next gran & continue
27B4 18AF 00787 JR BVER6 ;
27B6 00788 DONTVER EQU $
00789 ;*****
00790 ; Perform expanding binary search to find
00791 ; a cylinder available for the directory
00792 ; but start with suggested cylinder
00793 ;*****
27B6 3E0D 00794 CALCDIR LD A,CR ;Close the display line
27B8 CDFB2A 00795 CALL @DSP
00796 ;
00797 IF LSI ;Laredo must use this cyl
00798 LD L,(IY+9) ;P/u recommended dir cyl
00799 ENDIF
00800 ;
00801 IF .NOT.LSI
27BB FD6E06 00802 LD L,(IY+6) ;P/u highest # cyl
27BE 2C 00803 INC L ;Bump for 0 offset
27BF CB3D 00804 SRL L ;Find midpoint
00805 ENDIF
00806 ;
27C1 0E00 00807 LD C,0 ;Point to GAT byte for
27C3 2632 00808 LD H,GATBUF<-8 ; this cylinder
27C5 3E00 00809 CALC1 LD A,0 ;P/u default GAT byte
27C7 BE 00810 CP (HL) ;Is this cylinder locked?
27C8 2819 00811 JR Z,GENSYS ;Bypass if available
27CA 0C 00812 INC C ;Bump C
27CB 79 00813 LD A,C
27CC 0F 00814 RRCA ;Test if odd or even
27CD 7D 00815 LD A,L ;Get current test pos
27CE 3009 00816 JR NC,CALC2 ;Jump if C was even
27D0 81 00817 ADD A,C ;Add to previous pos
27D1 6F 00818 LD L,A
27D2 FDBE06 00819 CP (IY+6) ;Go over the top?
27D5 20EE 00820 JR NZ,CALC1 ;Loop if not
27D7 1804 00821 JR CALC3 ;Else abort
27D9 91 00822 CALC2 SUB C ;Try a lower cylinder #
27DA 6F 00823 LD L,A
27DB 20E8 00824 JR NZ,CALC1 ;At cylinder 0?
27DD 21592F 00825 CALC3 LD HL,NOCYL$ ;"No dir space avail...
27E0 C3BF2A 00826 JP FMTABT
00827 ;*=*=*
00828 ; Generate the system initialization
00829 ;*=*=*
27E3 FD7509 00830 GENSYS LD (IY+9),L ;Stuff the dir cyl
27E6 7D 00831 LD A,L
27E7 CDDE29 00832 CALL CVDEC ;Cvrt reg A to 3 dec digs
27EA ED43A42F 00833 LD (DIRASC$),BC ;Stuff into the message
27EE 32A62F 00834 LD (DIRASC$+2),A
27F1 217F2F 00835 LD HL,DIRCYL$ ;"Dir will be placed...
27F4 CD022B 00836 CALL @DSPLY
27F7 21A82F 00837 LD HL,IPLSYS$ ;"Initializing...
27FA CD022B 00838 CALL @DSPLY
27FD 210032 00839 LD HL,GATBUF
2800 7E 00840 LD A,(HL) ;P/u GAT byte for 1st
2801 F601 00841 OR 1 ;Cylinder & show 1st
2803 77 00842 LD (HL),A ;Gran in use for BOOTs
2804 FD7E09 00843 LD A,(IY+9) ;Dir cyl # into DIR/SYS
2807 32F530 00844 LD (DIRDIR+16H),A
280A 6F 00845 LD L,A ;Show entire directory
280B 36FF 00846 LD (HL),0FFH ;Cylinder locked out
00847 ;*=*=*
00848 ; Update BOOT for DIR
00849 ;*=*=*
280D 110000 00850 LD DE,0 ;Init for cyl 0, sect 0
2810 CDBD29 00851 CALL VERSEC ;Test if formatted
2813 C2AF2A 00852 JP NZ,NOTFMT ;Error if not
2816 210033 00853 LD HL,BOOT1 ;Pt to R/S E/I BOOT rtn
2819 0E00 00854 LD C,0
281B CD2E2B 00855 CALL RDSECT@ ;Read BOOT1 from Drive 0
281E C2DB2A 00856 JP NZ,IOERR
2821 FD7E09 00857 LD A,(IY+9) ;Dir cyl into BOOT
2824 320233 00858 LD (BOOT1+2),A
2827 CDAE29 00859 CALL WRSEC ;Write R/S BOOT sector
282A C2DB2A 00860 JP NZ,IOERR
282D CDBD29 00861 CALL VERSEC ;Verify after write
2830 C2DB2A 00862 JP NZ,IOERR
2833 CD982A 00863 CALL DOT ;Show "."
2836 110100 00864 LD DE,1 ;Pt to cyl 0, sector 1
2839 0E00 00865 LD C,0 ;Refer to drive 0
283B CD2E2B 00866 CALL RDSECT@ ;Read the real BOOT
283E C2DB2A 00867 JP NZ,IOERR
2841 FD7E09 00868 LD A,(IY+9) ;Dir cyl into BOOT
2844 320233 00869 LD (BOOT1+2),A
2847 CDAE29 00870 CALL WRSEC ;Write 0/1
284A C2DB2A 00871 JP NZ,IOERR
284D CDBD29 00872 CALL VERSEC ;Verify after write
2850 C2DB2A 00873 JP NZ,IOERR
2853 CD982A 00874 CALL DOT
00875 ;*=*=*
00876 ; Complete GAT construction
00877 ;*=*=*
2856 FD7E06 00878 LD A,(IY+6) ;P/u highest # cylinder
2859 D622 00879 SUB 22H ;Adj offset from 34
285B 32CC32 00880 LD (GATBUF+0CCH),A ;Stuff GAT cyl excess
285E FD7E04 00881 LD A,(IY+4) ;P/u sec siz & # of sides
2861 E6A0 00882 AND 80H+20H
2863 47 00883 LD B,A
2864 FD7E03 00884 LD A,(IY+3) ;P/u density
2867 E640 00885 AND 40H
2869 B0 00886 OR B
286A 47 00887 LD B,A
286B FD7E08 00888 LD A,(IY+8) ;P/u # of grans/cyl
286E 07 00889 RLCA
286F 07 00890 RLCA
2870 07 00891 RLCA
2871 E607 00892 AND 7
2873 323529 00893 LD (CYLGRN+1),A
2876 B0 00894 OR B ;Merge the two
00895 IF RAM
2877 F688 00896 OR 88H ;Set DATA disk bit
00897 ENDIF
2879 32CD32 00898 LD (GATBUF+0CDH),A ;Stuff into GAT
00899 ;
287C 11F532 00900 LD DE,GATBUF+255-10;6.2 Media Data Block
287F 219328 00901 LD HL,LSIID ;Point to header
2882 010400 00902 LD BC,04 ;Set length
2885 EDB0 00903 LDIR ; move it
2887 FDE5 00904 PUSH IY
2889 E1 00905 POP HL ;This drive's DCT
288A 23 00906 INC HL
288B 23 00907 INC HL
288C 23 00908 INC HL ;Bypass the JP addr
288D 0E07 00909 LD C,7 ; bytes to move
288F EDB0 00910 LDIR ; move it in
2891 1804 00911 JR WRGAT1 ;Skip around string
2893 03 00912 LSIID DB 03,'LSI'
4C 53 49
00913 ;
00914 ;*=*=*
00915 ; Write copy of GAT into 0/3
00916 ;*=*=*
00917 WRGAT1
2897 210032 00918 LD HL,GATBUF ;Pt to GAT buffer
289A 1600 00919 LD D,0 ;Write it out to
289C 1E03 00920 LD E,3 ;Cyl 0, sector 3
289E CDAE29 00921 CALL WRSEC ;Write 0/3
28A1 C2DB2A 00922 JP NZ,IOERR
28A4 CDBD29 00923 CALL VERSEC ;Verify after write
28A7 C2DB2A 00924 JP NZ,IOERR
28AA CD982A 00925 CALL DOT
00926 ;*=*=*
00927 ; Write the config sector 0/2
00928 ;*=*=*
28AD 210034 00929 LD HL,HITBUF ;Zero out buffer
28B0 3600 00930 GSYS1 LD (HL),0
28B2 2C 00931 INC L
28B3 20FB 00932 JR NZ,GSYS1
28B5 210034 00933 LD HL,HITBUF ;Set first byte to xx
28B8 3663 00934 LD (HL),RLS ;For release number
28BA 110200 00935 LD DE,2 ;Pt to cyl 0, sector 2
28BD CDAE29 00936 CALL WRSEC ;Write 0/2
28C0 C2DB2A 00937 JP NZ,IOERR
28C3 CDBD29 00938 CALL VERSEC ;Verify after write
28C6 C2DB2A 00939 JP NZ,IOERR
28C9 CD982A 00940 CALL DOT
00941 ;*=*=*
00942 ; Write the Granule Allocation Table
00943 ;*=*=*
28CC 210032 00944 LD HL,GATBUF ;Pt to GAT sector buffer
28CF FD5609 00945 LD D,(IY+9) ;P/u the dir cyl
28D2 1E00 00946 LD E,0 ;Denote sector 0
28D4 CDB329 00947 CALL WRSYS ;Write the GAT
28D7 C2DB2A 00948 JP NZ,IOERR
28DA CDC229 00949 CALL VERSYS ;Verify the GAT
28DD C2DB2A 00950 JP NZ,IOERR
28E0 CD982A 00951 CALL DOT
00952 ;*=*=*
00953 ; Construct the HIT
00954 ;*=*=*
28E3 210034 00955 LD HL,HITBUF ;Point to the HIT buffer
28E6 36A2 00956 LD (HL),0A2H ;Stuff BOOT/SYS hash code
28E8 23 00957 INC HL
28E9 36C4 00958 LD (HL),0C4H ;Stuff DIR/SYS hash code
28EB 2B 00959 DEC HL
28EC FD5609 00960 LD D,(IY+9) ;P/u dir cyl #
28EF 1E01 00961 LD E,1 ;Pt to sector 1
28F1 CDB329 00962 CALL WRSYS ;Write the HIT
28F4 C2DB2A 00963 JP NZ,IOERR
28F7 CDC229 00964 CALL VERSYS ;Verify after write
28FA C2DB2A 00965 JP NZ,IOERR
28FD CD982A 00966 CALL DOT
2900 110034 00967 LD DE,HITBUF ;Establish buffer for
2903 21BF30 00968 LD HL,BOOTDIR ;Dir records
2906 012000 00969 LD BC,32 ;Move BOOT/SYS dir record
2909 EDB0 00970 LDIR ; into 1st slot
290B FD5609 00971 LD D,(IY+9) ;P/u dir cyl
290E 1E02 00972 LD E,2 ;This will be sector 2
2910 210034 00973 LD HL,HITBUF ;Pt to buffer start
2913 CDB329 00974 CALL WRSYS ;Write the sector
2916 C2DB2A 00975 JP NZ,IOERR
2919 CDC229 00976 CALL VERSYS ;Verify after write
291C C2DB2A 00977 JP NZ,IOERR
291F CD982A 00978 CALL DOT
2922 3A0931 00979 LD A,(SECCYL) ;P/u # of records
2925 B7 00980 OR A ;If 256 SPC, then
2926 2804 00981 JR Z,USE34 ; the CP won't work
2928 FE23 00982 CP 35
292A 3805 00983 JR C,STUFSPC
292C 3E22 00984 USE34 LD A,34 ;Max # of sectors
292E 320931 00985 LD (SECCYL),A
2931 32F330 00986 STUFSPC LD (DIRDIR+14H),A ;& stuff into DIR/SYS
2934 3E00 00987 CYLGRN LD A,0 ;P/u # grans/cyl
2936 FDCB046E 00988 BIT 5,(IY+4) ;Test 2-sided
293A 2802 00989 JR Z,$+4
293C 87 00990 ADD A,A ;Double count on 2-sided
293D 3C 00991 INC A ;Plus 1 for 0 offset adj
293E 32F630 00992 LD (DIRDIR+23),A ;Stuff in DIR/SYS
2941 FD7E09 00993 LD A,(IY+9) ;P/u the dir cyl # &
2944 32F530 00994 LD (DIRDIR+16H),A ; stuff into the DIR rec
2947 21DF30 00995 LD HL,DIRDIR ;Pt to start of DIR data
294A 110034 00996 LD DE,HITBUF ;Pt to start of dir buf
294D 012000 00997 LD BC,32 ;Move DIR/SYS into buf
2950 EDB0 00998 LDIR
2952 FD5609 00999 LD D,(IY+9) ;P/u dir cyl #
2955 1E03 01000 LD E,3 ;Write as sector 3
2957 210034 01001 LD HL,HITBUF ;Pt to start of buffer
295A CDB329 01002 CALL WRSYS ;Write the sector
295D C2DB2A 01003 JP NZ,IOERR
2960 CDC229 01004 CALL VERSYS ;Verify after write
2963 C2DB2A 01005 JP NZ,IOERR
2966 CD982A 01006 CALL DOT
2969 210034 01007 LD HL,HITBUF ;Zero the 1st 32 bytes
296C 0620 01008 LD B,32 ;Of the buffer to clear
296E 3600 01009 GSYS2 LD (HL),0 ;Where we stuffed the
2970 23 01010 INC HL ;BOOT & DIR dir records
2971 10FB 01011 DJNZ GSYS2
2973 FD5609 01012 LD D,(IY+9) ;P/u dir cyl #
2976 1E04 01013 LD E,4 ;Cont writing at sect 4
2978 210034 01014 GSYS3 LD HL,HITBUF ;Pt to start of buffer
297B CDB329 01015 CALL WRSYS ;Write the sector
297E C2DB2A 01016 JP NZ,IOERR
2981 CDC229 01017 CALL VERSYS ;Verify the sector
2984 C2DB2A 01018 JP NZ,IOERR
01019 ;*=*=*
01020 ; Write the remaining directory
01021 ;*=*=*
2987 D5 01022 PUSH DE ;Save cyl/sect
2988 CD982A 01023 CALL DOT ;Display a dot for each
298B D1 01024 POP DE ;Directory sector
298C 1C 01025 INC E ;Bump the sector pointer
298D 3A0931 01026 LD A,(SECCYL) ;P/u highest # sector
2990 BB 01027 CP E ;Are we finished yet?
2991 20E5 01028 JR NZ,GSYS3 ;Loop if not
2993 DD2A2A2C 01029 LD IX,(DCTPTR) ;Real DCT for drive
2997 FD7E09 01030 LD A,(IY+9) ;DIR posn
299A DD7709 01031 LD (IX+9),A ;Update for system
01032 ;*=*=*
01033 ; exit procedures
01034 ;*=*=*
299D 21CA2F 01035 LD HL,FMTCAO$ ;"Formatting complete...
29A0 CD182B 01036 CALL @LOGOT
29A3 C3F62A 01037 JP @EXIT
01038 ;*****
01039 ; disk I/O requests
01040 ;*****
29A6 C5 01041 WRCYL PUSH BC
29A7 060F 01042 LD B,15 ;Write track
01043 IF TRS!PDC
29A9 CD542B 01044 CALL FMTDVR ;WRCYL code in formatter
29AC C1 01045 POP BC
29AD C9 01046 RET
01047 ELSE
01048 JR DISKIO
01049 ENDIF
01050 ;
01051 IF LDI
01052 FMTHD PUSH BC
01053 LD B,12 ;Format hard disk
01054 JR DISKIO
01055 ENDIF
01056 ;
29AE C5 01057 WRSEC PUSH BC
29AF 060D 01058 LD B,13 ;Write data sector
29B1 181F 01059 JR DISKIO
29B3 C5 01060 WRSYS PUSH BC
29B4 060E 01061 LD B,14 ;Write system sector
29B6 181A 01062 JR DISKIO
29B8 C5 01063 RDSEC PUSH BC
29B9 0609 01064 LD B,9 ;Read data sector
29BB 1815 01065 JR DISKIO
29BD C5 01066 VERSEC PUSH BC
29BE 060A 01067 LD B,10 ;Verify a sector
29C0 1810 01068 JR DISKIO
01069 ;*****
01070 ; Perform a verification to ensure system sector
01071 ;*****
29C2 CDBD29 01072 VERSYS CALL VERSEC ;Sector verify
29C5 2806 01073 JR Z,VERS1 ;Bypass if not system
29C7 D606 01074 SUB 6 ;Test read system retcod
29C9 C8 01075 RET Z ;Go if that's what it was
29CA C606 01076 ADD A,6 ;Restore orig retcod
29CC C9 01077 RET
29CD F601 01078 VERS1 OR 1 ;S/b system, found data
29CF 3E00 01079 LD A,0
29D1 C9 01080 RET
01081 ;
29D2 0EFF 01082 DISKIO LD C,-1 ;P/u drive #
29D4 3E20 01083 LD A,32 ;Init to illegal drive
29D6 B7 01084 OR A
29D7 CDDC29 01085 CALL GOIO ;Go after DCT vector
29DA C1 01086 POP BC
29DB C9 01087 RET
29DC FDE9 01088 GOIO JP (IY) ;Vector to DCT
01089 ;
01090 ;*****
01091 ; routine to convert reg A to 3 decimal digits
01092 ; in registers C B A
01093 ;*****
29DE 0E30 01094 CVDEC LD C,'0' ;Init to count 100's
29E0 D664 01095 CVD1 SUB 100 ;How many hundreds?
29E2 3803 01096 JR C,CVD2 ;Go if no more
29E4 0C 01097 INC C ;Else bump & loop
29E5 18F9 01098 JR CVD1
29E7 C664 01099 CVD2 ADD A,100 ;Adjust for underflow
29E9 0630 01100 LD B,30H
29EB D60A 01101 CVD3 SUB 10 ;How many 10s
29ED 3803 01102 JR C,CVD4 ;Go if underflow
29EF 04 01103 INC B ;Bump 10s
29F0 18F9 01104 JR CVD3 ;Loop for more
29F2 C63A 01105 CVD4 ADD A,3AH ;Adjust units place
29F4 C9 01106 RET
01107 ;*=*=*
01108 ; display cyl #
29F5 F5 01109 DSPCYL PUSH AF ;Save units place
29F6 C5 01110 PUSH BC ;Save tens/hundreds
29F7 0603 01111 LD B,3
29F9 3E08 01112 LD A,8
29FB CDFB2A 01113 BKUP CALL @DSP ;Backspace 3
29FE 10FB 01114 DJNZ BKUP
2A00 C1 01115 POP BC
2A01 79 01116 LD A,C
2A02 CDFB2A 01117 CALL @DSP ;Display hundreds
2A05 78 01118 LD A,B
2A06 CDFB2A 01119 CALL @DSP ;Display tens
2A09 F1 01120 POP AF ;Get back units
2A0A CDFB2A 01121 CALL @DSP ;Display units
2A0D C9 01122 RET
01123 ;*****
01124 ; Hash a diskette password
01125 ;*****
2A0E CD1D2A 01126 CKMPW CALL CKMPW0
2A11 C0 01127 RET NZ
2A12 CD1A2A 01128 CALL HASHMPW
01129 ;
01130 IF RAM
2A15 C2DB2A 01131 JP NZ,IOERR
01132 ENDIF
01133 ;
2A18 AF 01134 XOR A
2A19 C9 01135 RET
01136 ;
2A1A 3EE4 01137 HASHMPW LD A,0E4H
2A1C EF 01138 RST 28H
01139 ;
2A1D 0608 01140 CKMPW0 LD B,8
2A1F D5 01141 PUSH DE
2A20 E1 01142 POP HL
2A21 7E 01143 LD A,(HL) ;P/u 1st char
2A22 180E 01144 JR CKMPW2 ; & check
2A24 23 01145 CKMPW1 INC HL
2A25 7E 01146 LD A,(HL)
2A26 FE20 01147 CP ' '
2A28 2818 01148 JR Z,CKMPW7
2A2A FE30 01149 CP '0'
2A2C 3818 01150 JR C,INVMPW
2A2E FE3A 01151 CP '9'+1
2A30 3808 01152 JR C,CKMPW3
2A32 FE41 01153 CKMPW2 CP 'A'
2A34 3810 01154 JR C,INVMPW
2A36 FE5B 01155 CP 'Z'+1
2A38 300C 01156 JR NC,INVMPW
2A3A 10E8 01157 CKMPW3 DJNZ CKMPW1
2A3C AF 01158 XOR A ;All OK
2A3D C9 01159 RET
2A3E 23 01160 CKMPW5 INC HL
2A3F BE 01161 CP (HL) ;No imbedded spaces
2A40 2004 01162 JR NZ,INVMPW
2A42 10FA 01163 CKMPW7 DJNZ CKMPW5
2A44 AF 01164 XOR A ;All OK
2A45 C9 01165 RET
2A46 21DF2F 01166 INVMPW LD HL,BADMPW$
2A49 3E3F 01167 LD A,63 ;Indicate extended error
2A4B B7 01168 OR A ;Set NZ
2A4C C9 01169 RET
01170 ;*****
01171 ; Routines to convert input strings to uc
01172 ;*****
2A4D 0601 01173 GETARG LD B,1 ;1 char input
2A4F CD022B 01174 GETARGX CALL @DSPLY ;B chars input
2A52 0E00 01175 LD C,0
2A54 210034 01176 LD HL,HITBUF ;Buffer area
2A57 CD102B 01177 INPT CALL @KEYIN ;Enter them
2A5A DABF2A 01178 JP C,FMTABT ;Break pressed!
2A5D 78 01179 LD A,B
2A5E B7 01180 OR A
2A5F C8 01181 RET Z ;No input
01182 ; convert input line to U/C
2A60 C5 01183 PUSH BC
2A61 E5 01184 PUSH HL
2A62 7E 01185 GETUC LD A,(HL)
2A63 FE61 01186 CP 'a'
2A65 3803 01187 JR C,UC2
2A67 E65F 01188 AND 5FH ;Make U/C
2A69 77 01189 LD (HL),A
2A6A 23 01190 UC2 INC HL
2A6B 10F5 01191 DJNZ GETUC ;Do entire input
2A6D E1 01192 POP HL
2A6E C1 01193 POP BC
2A6F 7E 01194 LD A,(HL) ;P/u one char
2A70 B7 01195 OR A ;Make NZ
2A71 C9 01196 RET
01197 ;
2A72 0608 01198 INPMPW LD B,8 ;Max chars
2A74 CD4F2A 01199 CALL GETARGX ;Input U/C into HITBUF
2A77 C8 01200 RET Z ;If no input
2A78 11532D 01201 LD DE,MPWBUF ;Then move to MPWBUF
2A7B D5 01202 PUSH DE
2A7C 3E09 01203 LD A,9 ;An extra char means we don't
2A7E 90 01204 SUB B ;Have to check for zero here
2A7F 48 01205 LD C,B
2A80 0600 01206 LD B,0 ;Xfer length
2A82 EDB0 01207 LDIR ;Move input
2A84 47 01208 LD B,A ;Chars needed
2A85 3E20 01209 LD A,' ' ;Load a blank
2A87 12 01210 FILLBLK LD (DE),A ;Padd response
2A88 13 01211 INC DE
2A89 10FC 01212 DJNZ FILLBLK
2A8B E1 01213 POP HL ;=>string
2A8C C9 01214 RET
01215 ;
01216 ;*=*=*
01217 ; Routine to set a bit
01218 ;*=*=*
2A8D 07 01219 SETBIT RLCA ;Shift to "b" field
2A8E 07 01220 RLCA
2A8F 07 01221 RLCA
2A90 F6C3 01222 OR 0C3H ;Establish as SET b,E
2A92 32962A 01223 LD (SBIT1+1),A ;Alter the OP code
2A95 CBC3 01224 SBIT1 SET 0,E ;Turn on the bit
2A97 C9 01225 RET
01226 ;*=*=*
01227 ; print one "."
01228 ;*=*=*
2A98 3E2E 01229 DOT LD A,'.'
2A9A C3FB2A 01230 JP @DSP
01231 ;*****
01232 ; Temporary storage space for format drive DCT
01233 ;*****
2A9D 01234 TMPDCT DS 10
01235 ;*****
01236 ; Parm error exit
01237 ;*****
2AA7 21DC2D 01238 BADNAM LD HL,BADNAM$
2AAA DD 01239 DB 0DDH
2AAB 215430 01240 DIFDVR LD HL,DIFDVR$ ;Driver mismatch...
2AAE DD 01241 DB 0DDH
2AAF 213430 01242 NOTFMT LD HL,NOTFMT$
2AB2 DD 01243 DB 0DDH
2AB3 218F2D 01244 NOTZER LD HL,NOTZER$ ;Can't format drive 0
2AB6 DD 01245 DB 0DDH
2AB7 217D30 01246 ILLEG LD HL,ILLEG$ ;Drive is disabled
2ABA DD 01247 DB 0DDH
2ABB 21DF2F 01248 BADMPW LD HL,BADMPW$ ;Wrong MPW entered
2ABE DD 01249 DB 0DDH
2ABF 21F92F 01250 FMTABT LD HL,FMTABT$
2AC2 DD 01251 DB 0DDH
2AC3 216E2D 01252 NOTHARD LD HL,HARD$
2AC6 DD 01253 DB 0DDH
2AC7 215D2D 01254 PRMERR LD HL,PRMERR$
2ACA CD182B 01255 CALL @LOGOT
2ACD C3F22A 01256 JP @ABORT
01257 ;*=*=*
01258 ; abort if JCL running
01259 IF RAM
0000 01260 SFLAG$ EQU 0 ;Stuffed by init code
01261 ENDIF
2AD0 00 01262 ABTJCL1 NOP ;Patchable w/RET
2AD1 F5 01263 ABTJCL PUSH AF
2AD2 3A0000 01264 LD A,(SFLAG$)
2AD3 01265 SFLAG EQU $-2 ;RAM version sets address
2AD5 CB6F 01266 BIT 5,A
2AD7 20E6 01267 JR NZ,FMTABT ;Log out
2AD9 F1 01268 POP AF
2ADA C9 01269 RET
01270 ;
2ADB F5 01271 IOERR PUSH AF ;Save error code
2ADC 3E0D 01272 LD A,CR
2ADE CDFB2A 01273 CALL @DSP ;Do a CR first
2AE1 F1 01274 POP AF
2AE2 6F 01275 LD L,A
2AE3 2600 01276 LD H,0
2AE5 F6C0 01277 OR 0C0H ;Mask
2AE7 4F 01278 LD C,A
2AE8 CD322B 01279 CALL @ERROR
01280 IF .NOT.RAM
01281 JP @ABORT
01282 ENDIF
01283 ;*=*=*
01284 ; 6.x exit routine follows....
01285 ; provide compatible I/O routines for 6.x LDOS
01286 ; accomodate EDAS's insistance on resolving labels
01287 ;With MACRO expansion inside of FALSE conditionals
01288 ;By not using SVCMAC here
01289 IF RAM
0000 01290 MOD1 EQU 0 ;Keep EDAS happy when
0000 01291 MOD3 EQU 0 ;Evaluating .NOT.RAM option
01292 ;*=*=*
01293 ; system routines for RAM version of HD formatters
01294 ;*=*=*
2AEB 310000 01295 QUIT LD SP,$-$
2AEC 01296 SPSAV EQU $-2
2AEE 3E6A 01297 LD A,106
2AF0 EF 01298 RST 40
2AF1 C9 01299 RET
2AF2 21FFFF 01300 @ABORT LD HL,-1
2AF5 DD 01301 DB 0DDH ;Make next inst IX
2AF6 210000 01302 @EXIT LD HL,0
2AF9 18F0 01303 JR QUIT
01304 ;
2AFB 4F 01305 @DSP LD C,A
2AFC 3E02 01306 LD A,2
2AFE EF 01307 RST 28H
2AFF C8 01308 RET Z
2B00 18D9 01309 JR IOERR
2B02 3E0A 01310 @DSPLY LD A,10
2B04 EF 01311 RST 28H
2B05 C8 01312 RET Z
2B06 18D3 01313 JR IOERR
01314 ;
2B08 3E60 01315 DECHEX LD A,96
2B0A EF 01316 RST 28H
2B0B C9 01317 RET
2B0C 3E61 01318 HEXDEC LD A,97
2B0E EF 01319 RST 28H
2B0F C9 01320 RET
2B10 3E09 01321 @KEYIN LD A,9
2B12 EF 01322 RST 28H
2B13 C9 01323 RET
2B14 3E11 01324 @PARAM LD A,17
2B16 EF 01325 RST 28H
2B17 C9 01326 RET
2B18 3E0C 01327 @LOGOT LD A,12
2B1A EF 01328 RST 28H
2B1B C9 01329 RET
2B1C 4F 01330 MULTEA@ LD C,A
2B1D 3E5A 01331 LD A,90
2B1F EF 01332 RST 28H
2B20 C9 01333 RET
2B21 4F 01334 DIVEA@ LD C,A
2B22 3E5D 01335 LD A,93
2B24 EF 01336 RST 28H
2B25 C9 01337 RET
2B26 3E51 01338 GETDCT@ LD A,81
2B28 EF 01339 RST 28H
2B29 C9 01340 RET
2B2A 3E12 01341 @DATE LD A,18
2B2C EF 01342 RST 28H
2B2D C9 01343 RET
2B2E 3E31 01344 RDSECT@ LD A,49
2B30 EF 01345 RST 28H
2B31 C9 01346 RET
2B32 3E1A 01347 @ERROR LD A,26
2B34 EF 01348 RST 28H
2B35 C9 01349 RET
01350 ;
01351 ;*=*=*
01352 ; entry point if 6.x
01353 ;*=*=*
01354 ;
01355 BEGIN
2B36 3E6A 01356 LD A,106
2B38 EF 01357 RST 40
2B39 2804 01358 JR Z,BEGINA ;Continue if no break
2B3B 21FFFF 01359 LD HL,-1
2B3E C9 01360 RET ; else abort
01361 ;
2B3F ED73EC2A 01362 BEGINA LD (SPSAV),SP ;Save callers stack
2B43 E5 01363 PUSH HL
2B44 3E65 01364 LD A,101 ;@@FLAGS
2B46 EF 01365 RST 28H ;Find SFLAG$
2B47 111200 01366 LD DE,'S'-'A' ;Offset
2B4A FD19 01367 ADD IY,DE ;Calc byte address
2B4C FD22D32A 01368 LD (SFLAG),IY ;Save for JCL test
2B50 E1 01369 POP HL
2B51 C30024 01370 JP USER ;To pgm start
01371 ENDIF
01372 ;
01373 ;*=*=*
01374 IF .NOT.RAM ;Get version equates...
01375 ;Get correct EQU file
01378 IF MOD1
01381 ENDIF
01382 IF MOD3
01384 ENDIF
01386 ;
01387 ;*=*=*
01388 ; Routine to convert ascii =>HL to number in BC
01389 ;*=*=*
01390 DECHEX LD DE,0 ;Clear to start
01391 CXDEC LD A,(HL) ;P/u char
01392 SUB 30H ;To BCD
01393 CP 10 ;Must be less
01394 JR NC,DONECON ;End if not digit
01395 PUSH HL ;Save ascii ptr
01396 LD H,D
01397 LD L,E ;Merge digit
01398 ADD HL,HL
01399 ADD HL,HL
01400 ADD HL,DE
01401 ADD HL,HL
01402 EX DE,HL
01403 ADD A,E
01404 LD E,A
01405 LD A,0
01406 ADC A,D
01407 LD D,A
01408 POP HL
01409 INC HL ;Next char
01410 JR CXDEC
01411 DONECON PUSH DE
01412 POP BC ;Put answer in BC
01413 RET
01414 ;
01415 HEXDEC LD A,' ' ;Blank
01416 PUSH HL
01417 LD HL,TENTBL
01418 HDC1 LD C,(HL)
01419 INC HL
01420 LD B,(HL)
01421 INC HL
01422 EX (SP),HL
01423 PUSH DE
01424 LD D,A
01425 XOR A
01426 HDC2 INC A
01427 ADD HL,BC
01428 JR C,HDC2
01429 SBC HL,BC
01430 LD B,D
01431 POP DE
01432 DEC A
01433 JR NZ,HDC3
01434 INC C
01435 JR Z,HDC5
01436 DEC C
01437 LD A,B
01438 LD (DE),A
01439 JR HDC4
01440 HDC5 DEC C
01441 HDC3 ADD A,'0'
01442 LD (DE),A
01443 LD A,'0'
01444 HDC4 INC DE
01445 INC C
01446 EX (SP),HL
01447 JR NZ,HDC1
01448 POP HL
01449 RET
01450 TENTBL DW -10000,-1000,-100,-10,-1
01451 ;
01452 ENDIF
2B54 01453 *GET HDFMT3/ASM:3
01454 ;HDFMT3/ASM - HARD FORMAT module - 02/07/84
01455 ;Adjusted for WD1010 controller 12/12/83
01456 IF TRS!PDC
01457 ;Driver to handle FMT command w/WD controller
01458 IF TRS
00C0 01459 HARDWP EQU 0C0H
00C1 01460 HDCONT EQU 0C1H
00C8 01461 DATA EQU 0C8H ;Data transfer port
01462 ENDIF
01463 IF PDC
01464 DATA EQU 78H
01465 ENDIF
01466 ;*=*=*
01467 ; Calling Sequence
01468 ; B => disk command
01469 ; C => logical drive number
01470 ; D => logical cylinder number
01471 ; E => logical sector number
01472 ; HL => sector I/O buffer address
01473 ; IY => drive code table address
01474 ;*=*=*
01475 ; bit 2 => wait enable
01476 ; bit 3 => device enable
01477 ; bit 4 => software reset
01478 ;*=*=*
00C9 01479 ERROR EQU DATA+1 ;Error code port
00C9 01480 WRP EQU DATA+1 ;Write precompensation port
00CA 01481 SECNT EQU DATA+2 ;Sector count
00CB 01482 SECNO EQU DATA+3 ;Sector number port
00CC 01483 CYLLO EQU DATA+4 ;Cylinder lo
00CD 01484 CYLHI EQU DATA+5 ;Cylinder hi
00CE 01485 SDH EQU DATA+6 ;Size/Drive/Head port
00CF 01486 STATUS EQU DATA+7 ;Status port
00CF 01487 COMMAND EQU DATA+7 ;Command port
01488 ;*=*=*
01489 ; Western Digital Controller OP codes
01490 ;
01491 ; 0001rrrr - Restore drive
01492 ; 0111rrrr - Seek sector/head/cyl
01493 ; 0010d000 - Read sector
01494 ; 00110000 - Write sector
01495 ; 01010000 - Format track
01496 ;
01497 ; rrrr = step rate
01498 ; d = 0=programmed I/O, 1=DMA
01499 ;*=*=*
01500 ; Driver start
01501 ;*=*=*
01502 FMTDVR
01503 ;*=*=*
01504 IF TRS
2B54 FD7E03 01505 LD A,(IY+3) ;P/u drive address
2B57 E603 01506 AND 3 ; & remove other junk
2B59 4F 01507 LD C,A ;Save for counter
2B5A DBC0 01508 IN A,(HARDWP) ;P/u the front panel WP
2B5C DC 01509 DB 0DCH ;Ignore next 2 by CALL C,
2B5D 07 01510 ALIGN RLCA ;Align hard WP bit to b7
2B5E 0D 01511 DEC C ; according to drive
2B5F 20FC 01512 JR NZ,ALIGN ; address
2B61 FDB603 01513 OR (IY+3) ;Merge software WP
01514 ENDIF
01515 ;
01516 IF PDC
01517 LD A,(IY+3) ;Just dct bit
01518 ENDIF
01519 ;
2B64 E680 01520 AND 10000000B ;Mask all but bit 7
2B66 CB27 01521 SLA A ;Write prot to carry
2B68 3004 01522 JR NC,DFMT
2B6A 3E0F 01523 LD A,15 ;WP error
2B6C B7 01524 OR A
2B6D C9 01525 RET
01526 ;
01527 ;*=*=*
01528 ; Disk FORMAT routine
01529 ;*=*=*
2B6E E5 01530 DFMT PUSH HL
2B6F D5 01531 PUSH DE
2B70 FD7E07 01532 LD A,(IY+7) ;P/u max sector/track
2B73 47 01533 LD B,A
2B74 E61F 01534 AND 1FH
2B76 5F 01535 LD E,A ;Set it for controller
2B77 A8 01536 XOR B ;Get # of heads into
2B78 07 01537 RLCA ; register B for
2B79 07 01538 RLCA ; loop count of # of
2B7A 07 01539 RLCA ; tracks to format in
2B7B 3C 01540 INC A ;Bump for zero offset
2B7C FDCB046E 01541 BIT 5,(IY+4) ; this cylinder
2B80 2801 01542 JR Z,$+3 ;Double the count if
2B82 87 01543 ADD A,A ; double cylindering
2B83 47 01544 LD B,A ;
01545 ;
2B84 C5 01546 DFMT1 PUSH BC ;Save loop counter
2B85 D5 01547 PUSH DE ;Save sector #
2B86 CDCA2B 01548 CALL SETUPF ;Go to it
2B89 E5 01549 PUSH HL ;Save pointer
2B8A 7E 01550 LD A,(HL) ;P/u sector count
2B8B D3CA 01551 OUT (SECNT),A
2B8D 23 01552 INC HL ;Point to buffer
2B8E 3E50 01553 LD A,50H ;Set the FORMAT OP code
2B90 CD172C 01554 CALL DOCMD ;Do the command
2B93 E1 01555 POP HL
2B94 D1 01556 POP DE
2B95 C1 01557 POP BC
2B96 2009 01558 JR NZ,WRERR
01559 ;
2B98 3E20 01560 LD A,20H ;Bump sector # for next
2B9A 83 01561 ADD A,E ; head in cylinder
2B9B 5F 01562 LD E,A ;Pass to sector reg
2B9C 10E6 01563 DJNZ DFMT1 ;Loop all heads this cyl
2B9E AF 01564 XOR A ;No error today
2B9F 180D 01565 JR NOERROR ;Exit
01566 ;
2BA1 21C12B 01567 WRERR LD HL,WRTBL ;Point to error xlate
01568 ;
01569 ENDERR
01570 IF TRS
2BA4 CDB12B 01571 CALL WD1010 ;Clear controller
01572 ENDIF
2BA7 DBC9 01573 IN A,(ERROR) ;Grab error code
2BA9 07 01574 ERR1 RLCA ;Find error TYPE
2BAA 23 01575 INC HL ;Bump counter
2BAB 30FC 01576 JR NC,ERR1 ;Loop for error byte
2BAD 7E 01577 LD A,(HL) ;P/u error code
01578 ;
2BAE 01579 NOERROR EQU $
2BAE D1 01580 ERREXIT POP DE
2BAF E1 01581 POP HL
2BB0 B7 01582 OR A ;Set flag
01583 IF TRS
2BB1 F5 01584 WD1010 PUSH AF
2BB2 DBCF 01585 IN A,(STATUS)
2BB4 E602 01586 AND 00000010B
2BB6 2808 01587 JR Z,CLEAN
2BB8 3E10 01588 LD A,10H
2BBA D3C1 01589 OUT (HDCONT),A
2BBC 3E0C 01590 LD A,0CH
2BBE D3C1 01591 OUT (HDCONT),A
2BC0 F1 01592 CLEAN POP AF
01593 ENDIF
2BC1 C9 01594 RET
01595 ;*=*=*
01596 ; LDOS error conversion table
01597 ; Bit Error RD WR
01598 ; 7 Bad block detect 7 14
01599 ; 6 CRC - Data field 4 12
01600 ; 5 CRC - ID field 1 9
01601 ; 4 ID not found 5 13
01602 ; 3 Not used 127 127
01603 ; 2 Aborted command 8 8
01604 ; 1 TR000 error 2 10
01605 ; 0 DAM not found 3 11
01606 ;*=*=*
2BC1 01607 WRTBL EQU $-1
2BC2 0E 01608 DB 14,12,9,13,127,8,10,11
0C 09 0D 7F 08 0A 0B
01609 ;*=*=*
01610 ; SETUP disk
01611 ; IY= DCT
01612 ; D = Cylinder # (0-202)
01613 ; E = Sector # (0-255)
01614 ;*=*=*
2BCA 01615 SETUPF EQU $ ;Wait until not busy
01616 ;*=*=*
01617 ; Select routine
01618 ;*=*=*
2BCA E5 01619 PUSH HL ;Save buffer pointer
01620 ;*=*=*
01621 ; Recalc cyl, sector to head, sector, cyl
01622 ;*=*=*
2BCB 6A 01623 RECALC LD L,D ;Xfer cylinder
2BCC 2600 01624 LD H,0
01625 ;
2BCE FDCB046E 01626 BIT 5,(IY+4) ;Double track?
2BD2 2801 01627 JR Z,$+3 ;Go if not
2BD4 29 01628 ADD HL,HL ;Cyl * 2
01629 ;*****
01630 ; Check on track advance
01631 ;*****
2BD5 FD7E07 01632 LD A,(IY+7) ;P/u sectors/track
2BD8 D5 01633 PUSH DE
2BD9 57 01634 LD D,A ;Hang on to value
2BDA E61F 01635 AND 1FH ;Strip off other data
2BDC 5F 01636 LD E,A
2BDD 1C 01637 INC E ;Adj for zero offset
2BDE 4B 01638 LD C,E ;Keep sec per track
2BDF AA 01639 XOR D ;Get # of heads
2BE0 07 01640 RLCA ;Shift heads to 0-2
2BE1 07 01641 RLCA
2BE2 07 01642 RLCA
2BE3 3C 01643 INC A ;Adjust for zero offset
2BE4 C5 01644 PUSH BC
2BE5 CD1C2B 01645 CALL MULTEA@
2BE8 C1 01646 POP BC
2BE9 3D 01647 DEC A ;Adjust for compare
2BEA D1 01648 POP DE ;Rcvr sector
2BEB BB 01649 CP E ;Is sector on this track?
2BEC 3004 01650 JR NC,REC1 ;Bypass if yes
2BEE 2F 01651 CPL ;Else subtract off a
2BEF 83 01652 ADD A,E ; track's # of sectors
2BF0 5F 01653 LD E,A ;Reset sector #
2BF1 23 01654 INC HL ; and bump cyl #
2BF2 79 01655 REC1 LD A,C
2BF3 D5 01656 PUSH DE
2BF4 CD212B 01657 CALL DIVEA@ ;Sector#/sectors per head
2BF7 D1 01658 POP DE
2BF8 57 01659 LD D,A ;Xfer head # needed
2BF9 FD7E04 01660 LD A,(IY+4) ;P/u starting head
2BFC E60F 01661 AND 0FH ;Strip off other data
2BFE 82 01662 ADD A,D ;Add in relative head
2BFF 57 01663 LD D,A ;Point to physical head
01664 ;*****
01665 ; Xfer head, sector, & cylinder data to WDC
01666 ;*****
2C00 FD7E03 01667 LD A,(IY+3) ;Grab the drive select
2C03 E603 01668 AND 3
2C05 07 01669 RLCA ;Shift to bits 3-4
2C06 07 01670 RLCA
2C07 07 01671 RLCA
2C08 B2 01672 OR D ;Merge in head select
2C09 D3CE 01673 OUT (SDH),A ;Transfer to WDC
2C0B 3E0F 01674 LD A,0FH ;For 256 byte sectors
2C0D D3CB 01675 OUT (SECNO),A
2C0F 7D 01676 LD A,L
2C10 D3CC 01677 OUT (CYLLO),A
2C12 7C 01678 LD A,H
2C13 D3CD 01679 OUT (CYLHI),A
2C15 E1 01680 POP HL ;Rcvr buffer pointer
2C16 C9 01681 RET
01682 ;*=*=*
01683 ; Routine to pass WRITE Command to WDC & do it
01684 ;*=*=*
2C17 D3CF 01685 DOCMD OUT (COMMAND),A ; & pass to WDC
01686 ;
2C19 01C800 01687 LD BC,0<8!DATA ;Set length &port
2C1C EDB3 01688 OTIR ;Output the data
2C1E E3 01689 DWR1 EX (SP),HL ;Delay time to settle
2C1F E3 01690 EX (SP),HL ; the controller
01691 ;
2C20 DBCF 01692 DWR2 IN A,(STATUS) ;Wait until controller
2C22 07 01693 RLCA ; is no longer busy
2C23 38FB 01694 JR C,DWR2
2C25 DBCF 01695 IN A,(STATUS) ;Read command end status
2C27 E601 01696 AND 1 ;NZ=error
2C29 C9 01697 RET
01698 ENDIF
01699 ;
2C2A 0000 01700 DCTPTR DW 0 ;Posn of DCT for drive
2C2C 4C 01701 LOCK$ DB 'Lock out track manually ? ',3
6F 63 6B 20 6F 75 74 20
74 72 61 63 6B 20 6D 61
6E 75 61 6C 6C 79 20 3C
59 2F 4E 3E 20 3F 20 03
2C4D 45 01702 PHYHD$ DB 'Enter physical head number <'
6E 74 65 72 20 70 68 79
73 69 63 61 6C 20 68 65
61 64 20 6E 75 6D 62 65
72 20 3C
2C69 20 01703 PHYD1$ DB ' -'
2D
2C6B 20 01704 PHYD2$ DB ' > ',3
3E 20 03
2C6F 45 01705 PHYTR$ DB 'Enter physical track number <1 -'
6E 74 65 72 20 70 68 79
73 69 63 61 6C 20 74 72
61 63 6B 20 6E 75 6D 62
65 72 20 3C 31 20 20 2D
2C90 20 01706 PHYT1$ DB ' > ',3
20 20 20 20 3E 20 03
01707 IF RAM ;Use CLIENT/ASM
01708 ;DB for FORM$ and HELLO$
2C98 24 01709 FORM$ DB '$HD1'
48 44 31
2C9C 54 01710 HELLO$ DB 'TRSFORM6 - W/D 1000/1010 - Hard Drive Formatter',LF
52 53 46 4F 52 4D 36 20
2D 20 57 2F 44 20 31 30
30 30 2F 31 30 31 30 20
2D 20 48 61 72 64 20 44
72 69 76 65 20 46 6F 72
6D 61 74 74 65 72 0A
2CCC 56 01711 DB 'Version '
65 72 73 69 6F 6E 20
2CD4 01712 *GET CLIENT:3
01713 ;CLIENT/ASM - File to establish sign-on headers
01714 ; and version numbers.
01715 ;
01716 ; EACH STRING SHOULD CONTAIN ONLY 63 CHARACTERS !!
01717 ;
01718 IF @BLD631
01719 ; 12345678901234567890123456789012345678901234567890
2CD4 20 01720 DB ' - 6.3.1 - Copyright 1982/83/84/86/90 by MISOSYS, ';<631>
2D 20 36 2E 33 2E 31 20
2D 20 43 6F 70 79 72 69
67 68 74 20 31 39 38 32
2F 38 33 2F 38 34 2F 38
36 2F 39 30 20 62 79 20
4D 49 53 4F 53 59 53 2C
20
2D06 49 01721 DB 'Inc., ',10 ;<631>
6E 63 2E 2C 20 20 20 20
20 20 20 0A
01722 ELSE
01723 DB ' - 6.3.0 - Copyright 1982/83/84/86 by Logical Syst'
01724 DB 'ems, Inc. ',10
01725 ENDIF
01726 ;
01727 ; DB 'All Rights Reserved. Licensed 1982/83/84 to Tandy '
01728 ; DB 'Corporation.',10,13
01729 ;
01730 ; DB 'All Rights Reserved. Beta-TEST Level/AD, DO NOT DI'
01731 ; DB 'STRIBUTE !! ',10,13
01732 ; DB 'All Rights reserved by LSI, 8970 N. 55th St. Milwa'
01733 ; DB 'ukee, Wisc. ',10,13
2D13 41 01734 DB 'All Rights Reserved. Unauthorized duplication is p'
6C 6C 20 52 69 67 68 74
73 20 52 65 73 65 72 76
65 64 2E 20 55 6E 61 75
74 68 6F 72 69 7A 65 64
20 64 75 70 6C 69 63 61
74 69 6F 6E 20 69 73 20
70
2D45 72 01735 DB 'rohibited. ',10,13
6F 68 69 62 69 74 65 64
2E 20 20 0A 0D
01736 ELSE ;Use macro definition if 5.1 ver.
01737 LOGON
01738 ENDIF
2D53 20 01739 MPWBUF DB ' ' ; must be 9 chars
20 20 20 20 20 20 20 20
20
2D5D 50 01740 PRMERR$ DB 'Parameter error ',CR
61 72 61 6D 65 74 65 72
20 65 72 72 6F 72 20 0D
2D6E 54 01741 HARD$ DB 'This format for Hard Drive only.',CR
68 69 73 20 66 6F 72 6D
61 74 20 66 6F 72 20 48
61 72 64 20 44 72 69 76
65 20 6F 6E 6C 79 2E 0D
2D8F 48 01742 NOTZER$ DB 'Hard drive cannot be drive 0.',CR
61 72 64 20 64 72 69 76
65 20 63 61 6E 6E 6F 74
20 62 65 20 64 72 69 76
65 20 30 2E 0D
2DAD 57 01743 WHDRV$ DB 'Which drive is to be used ? ',3
68 69 63 68 20 64 72 69
76 65 20 69 73 20 74 6F
20 62 65 20 75 73 65 64
20 3F 20 03
2DCA 44 01744 DSKNAM$ DB 'Disk Pack name ? ',3
69 73 6B 20 50 61 63 6B
20 6E 61 6D 65 20 3F 20
03
2DDC 49 01745 BADNAM$ DB 'Invalid Disk Pack name.',CR
6E 76 61 6C 69 64 20 44
69 73 6B 20 50 61 63 6B
20 6E 61 6D 65 2E 0D
2DF4 4D 01746 MPW$ DB 'Master password ? ',3
61 73 74 65 72 20 70 61
73 73 77 6F 72 64 20 3F
20 03
2E07 57 01747 CANTWR$ DB 'Write protected disk.',CR
72 69 74 65 20 70 72 6F
74 65 63 74 65 64 20 64
69 73 6B 2E 0D
2E1D 44 01748 HASDAT$ DB 'Disk contains data -- ',3
69 73 6B 20 63 6F 6E 74
61 69 6E 73 20 64 61 74
61 20 2D 2D 20 03
2E34 4E 01749 NOFMT$ DB 'Non-standard format.',CR
6F 6E 2D 73 74 61 6E 64
61 72 64 20 66 6F 72 6D
61 74 2E 0D
2E49 55 01750 CANTRD$ DB 'Unreadable directory.',CR
6E 72 65 61 64 61 62 6C
65 20 64 69 72 65 63 74
6F 72 79 2E 0D
2E5F 4E 01751 NODIR$ DB 'Non-initialized directory.',CR
6F 6E 2D 69 6E 69 74 69
61 6C 69 7A 65 64 20 64
69 72 65 63 74 6F 72 79
2E 0D
2E7A 4E 01752 PACKID$ DB 'Name=XXXXXXXX Date=MM/DD/YY',CR
61 6D 65 3D 58 58 58 58
58 58 58 58 20 20 44 61
74 65 3D 4D 4D 2F 44 44
2F 59 59 0D
2E97 20 01753 OLDMPW$ DB ' Enter its Master Password'
20 45 6E 74 65 72 20 69
74 73 20 4D 61 73 74 65
72 20 50 61 73 73 77 6F
72 64
2EB2 20 01754 DB ' or to abort: ',3
6F 72 20 3C 42 52 45 41
4B 3E 20 74 6F 20 61 62
6F 72 74 3A 20 03
01755 ;
01756 IF LDI
01757 LAST$ DB LF,'*** Preparing to format ENTIRE '
01758 DB 'hard drive ***',LF
01759 DB 'Are you sure you want to format it? ',3
01760 FMTG$ DB 'Formatting...',CR
01761 ENDIF
01762 ;
01763 IF LSI
01764 ALTLO$ DB LF,'Inhibiting Alternate cylinder <#77>...',CR
01765 ENDIF
01766 ;
01767 IF TRS!PDC
2EC9 0A 01768 DIAG$ DB LF,'Inhibiting Diagnostic Cylinder <#01>...',CR
49 6E 68 69 62 69 74 69
6E 67 20 44 69 61 67 6E
6F 73 74 69 63 20 43 79
6C 69 6E 64 65 72 20 3C
23 30 31 3E 2E 2E 2E 0D
01769 ENDIF
01770 ;
2EF2 0A 01771 DBL$ DB LF,'Note: Each cylinder equals 2 physical'
4E 6F 74 65 3A 20 45 61
63 68 20 63 79 6C 69 6E
64 65 72 20 65 71 75 61
6C 73 20 32 20 70 68 79
73 69 63 61 6C
2F18 20 01772 DB ' tracks.',LF,CR
74 72 61 63 6B 73 2E 0A
0D
2F22 1D 01773 FMTCYL$ DB 29,'Formatting cylinder ',3
46 6F 72 6D 61 74 74 69
6E 67 20 63 79 6C 69 6E
64 65 72 20 20 20 20 03
2F3B 1D 01774 VERCYL$ DB 29,'Verifying cylinder ',3
56 65 72 69 66 79 69 6E
67 20 20 63 79 6C 69 6E
64 65 72 20 20 20 20 03
2F54 2A 01775 STAR$ DB '* ',3
20 20 20 03
2F59 4E 01776 NOCYL$ DM 'No cylinders available for directory.',CR
6F 20 63 79 6C 69 6E 64
65 72 73 20 61 76 61 69
6C 61 62 6C 65 20 66 6F
72 20 64 69 72 65 63 74
6F 72 79 2E 0D
2F7F 44 01777 DIRCYL$ DB 'Directory will be placed on cylinder '
69 72 65 63 74 6F 72 79
20 77 69 6C 6C 20 62 65
20 70 6C 61 63 65 64 20
6F 6E 20 63 79 6C 69 6E
64 65 72 20
2FA4 30 01778 DIRASC$ DB '000',CR
30 30 0D
2FA8 0A 01779 IPLSYS$ DB LF,'Initializing SYSTEM information ',3
49 6E 69 74 69 61 6C 69
7A 69 6E 67 20 53 59 53
54 45 4D 20 69 6E 66 6F
72 6D 61 74 69 6F 6E 20
03
2FCA 0A 01780 FMTCAO$ DB LF,'Formatting complete',CR
46 6F 72 6D 61 74 74 69
6E 67 20 63 6F 6D 70 6C
65 74 65 0D
2FDF 49 01781 BADMPW$ DB 'Invalid master password - '
6E 76 61 6C 69 64 20 6D
61 73 74 65 72 20 70 61
73 73 77 6F 72 64 20 2D
20
2FF9 46 01782 FMTABT$ DB 'Format aborted.',CR
6F 72 6D 61 74 20 61 62
6F 72 74 65 64 2E 0D
3009 41 01783 SURE?$ DB 'Are you sure you want to format it ? ',3
72 65 20 79 6F 75 20 73
75 72 65 20 79 6F 75 20
77 61 6E 74 20 74 6F 20
66 6F 72 6D 61 74 20 69
74 20 3C 59 2C 4E 3E 3F
20 03
3034 43 01784 NOTFMT$ DB 'Can''t, Disk Pack not formatted.',CR
61 6E 27 74 2C 20 44 69
73 6B 20 50 61 63 6B 20
6E 6F 74 20 66 6F 72 6D
61 74 74 65 64 2E 0D
3054 46 01785 DIFDVR$ DB 'Formatter incompatible with disk driver.',CR
6F 72 6D 61 74 74 65 72
20 69 6E 63 6F 6D 70 61
74 69 62 6C 65 20 77 69
74 68 20 64 69 73 6B 20
64 72 69 76 65 72 2E 0D
307D 44 01786 ILLEG$ DB 'Drive is disabled.',CR
72 69 76 65 20 69 73 20
64 69 73 61 62 6C 65 64
2E 0D
01787 ;
01788 IF RAM ;Use new param format
3090 EF 01789 PARMTBL DB 'o'!80H
3091 73 01790 DB 73H,'MPW',0
4D 50 57 00
3096 DB24 01791 DW MPWPARM+1
3098 74 01792 DB 74H,'NAME',0
4E 41 4D 45 00
309E 8D24 01793 DW NPARM+1
30A0 56 01794 DB 56H,'SYSTEM',0
53 59 53 54 45 4D 00
30A8 E626 01795 DW SYSPRM+1
30AA 56 01796 DB 56H,'VERIFY',0
56 45 52 49 46 59 00
30B2 1A27 01797 DW VERPRM+1
30B4 76 01798 DB 76H,'NOSTOP',0
4E 4F 53 54 4F 50 00
30BC 5025 01799 DW NOSTOP
01800 ELSE
01801 PARMTBL DB 'MPW '
01802 DW MPWPARM+1
01803 DB 'NAME '
01804 DW NPARM+1
01805 DB 'N '
01806 DW NPARM+1
01807 DB 'SYSTEM'
01808 DW SYSPRM+1
01809 DB 'S '
01810 DW SYSPRM+1
01811 DB 'VERIFY'
01812 DW VERPRM+1
01813 DB 'V '
01814 DW VERPRM+1
01815 DB 'NOSTOP'
01816 DW NOSTOP
01817 ENDIF
30BE 00 01818 NOP ;End of table
01819 ;*****
01820 ; Formatting data and tables
01821 ;*****
30BF 5E 01822 BOOTDIR DB 5EH,0,0,0,0,'BOOT SYS',0F6H,37H
00 00 00 00 42 4F 4F 54
20 20 20 20 53 59 53 F6
37
30D1 F5 01823 DB 0F5H,9CH,5,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1
9C 05 00 00 00 FF FF FF
FF FF FF FF FF
30DF 5D 01824 DIRDIR DB 5DH,0,0,0,0,'DIR SYS',0F6H,37H
00 00 00 00 44 49 52 20
20 20 20 20 53 59 53 F6
37
30F1 96 01825 DB 96H,42H,10,0,11H,1,-1,-1,-1,-1,-1,-1,-1,-1
42 0A 00 11 01 FF FF FF
FF FF FF FF FF
30FF 01826 FMTDCT DS 10
3109 01827 SECCYL DS 1 ;# of sectors per cyl
310A 01828 SECTRK DS 1 ;# of sectors per trk
01829 ;
01830 IF MTI!TRS!PDC
310B 20 01831 SKEWDAT DB 32 ;# sectors in table
310C 00 01832 DB 0,0,0,4,0,8,0,12,0,16,0,20,0,24,0,28
00 00 04 00 08 00 0C 00
10 00 14 00 18 00 1C
311C 00 01833 DB 0,1,0,5,0,9,0,13,0,17,0,21,0,25,0,29
01 00 05 00 09 00 0D 00
11 00 15 00 19 00 1D
312C 00 01834 DB 0,2,0,6,0,10,0,14,0,18,0,22,0,26,0,30
02 00 06 00 0A 00 0E 00
12 00 16 00 1A 00 1E
313C 00 01835 DB 0,3,0,7,0,11,0,15,0,19,0,23,0,27,0,31
03 00 07 00 0B 00 0F 00
13 00 17 00 1B 00 1F
01836 ENDIF
01837 ;
01838 ;*=*=*
01839 ; Patch area
01840 ;*=*=*
3200 01841 ORG $<-8+1<+8
3200 01842 GATBUF DS 203 ;GAT sector buffer
32CB 63 01843 DB RLS,0,0,0,0 ;Ver, cyl exc, type, pswd
00 00 00 00
32D0 20 01844 DB ' MM/DD/YY'
20 20 20 20 20 20 20 4D
4D 2F 44 44 2F 59 59
32E0 00 01845 DC 32,0
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
3300 01846 BOOT1 DS 208 ;BOOT 1
33D0 43 01847 DB 'Copyright(C)1982'
6F 70 79 72 69 67 68 74
28 43 29 31 39 38 32
33E0 4C 01848 DB 'Logical Systems '
6F 67 69 63 61 6C 20 53
79 73 74 65 6D 73 20
33F0 49 01849 DB 'Incorporated (P)'
6E 63 6F 72 70 6F 72 61
74 65 64 20 28 50 29
3400 01850 HITBUF DS 256
000D 01851 CR EQU 0DH
000A 01852 LF EQU 0AH
2B36 01854 END BEGIN
2B36 is the transfer address
00000 Total errors
[Copyright 1999,2002 Frank Durda IV, All Rights Reserved. Mirroring of any material on this page in any form is expressly prohibited. The official web site for this material is: http://nemesis.lonestar.org Contact this address for use clearances: clearance at nemesis.lonestar.org Comments and queries to this address: web_software at nemesis.lonestar.org]