Browse Source

reindented DOS_8070 to approximate the LST output of the assembler

master
Michael Steil 2 years ago
parent
commit
30a5a62154
74 changed files with 7409 additions and 7409 deletions
  1. 75
    75
      DOS_8070/compress-dir
  2. 28
    28
      DOS_8070/copy-overlay
  3. 59
    59
      DOS_8070/copysetup
  4. 25
    25
      DOS_8070/cu-links
  5. 34
    34
      DOS_8070/dlinks
  6. 129
    129
      DOS_8070/dos
  7. 24
    24
      DOS_8070/equates
  8. 3
    3
      DOS_8070/fmt-equates
  9. 99
    99
      DOS_8070/fndrel
  10. 20
    20
      DOS_8070/getact
  11. 114
    114
      DOS_8070/hdaddfil
  12. 166
    166
      DOS_8070/hdaddrel
  13. 204
    204
      DOS_8070/hdalloc
  14. 29
    29
      DOS_8070/hdautoit
  15. 13
    13
      DOS_8070/hdchanges
  16. 174
    174
      DOS_8070/hdclose
  17. 7
    7
      DOS_8070/hdcom
  18. 134
    134
      DOS_8070/hdcopy
  19. 89
    89
      DOS_8070/hdcopyall
  20. 36
    36
      DOS_8070/hdcuint
  21. 55
    55
      DOS_8070/hddsect
  22. 235
    235
      DOS_8070/hddskint
  23. 3
    3
      DOS_8070/hddummy
  24. 41
    41
      DOS_8070/hdequate
  25. 304
    304
      DOS_8070/hderproc
  26. 176
    176
      DOS_8070/hdfreused
  27. 39
    39
      DOS_8070/hdidle
  28. 299
    299
      DOS_8070/hdieee
  29. 99
    99
      DOS_8070/hdinitdr
  30. 160
    160
      DOS_8070/hdjobs
  31. 355
    355
      DOS_8070/hdlookup
  32. 19
    19
      DOS_8070/hdmapout
  33. 41
    41
      DOS_8070/hdnewdir
  34. 125
    125
      DOS_8070/hdnewss
  35. 188
    188
      DOS_8070/hdopchnl
  36. 375
    375
      DOS_8070/hdopen
  37. 81
    81
      DOS_8070/hdpage0
  38. 119
    119
      DOS_8070/hdpage2
  39. 219
    219
      DOS_8070/hdparsex
  40. 14
    14
      DOS_8070/hdram
  41. 115
    115
      DOS_8070/hdrecord
  42. 84
    84
      DOS_8070/hdrel1
  43. 57
    57
      DOS_8070/hdrename
  44. 46
    46
      DOS_8070/hdromtbl
  45. 71
    71
      DOS_8070/hdscrtch
  46. 4
    4
      DOS_8070/hdsetled
  47. 36
    36
      DOS_8070/hdssend
  48. 36
    36
      DOS_8070/hdsstest
  49. 122
    122
      DOS_8070/hdssutil
  50. 244
    244
      DOS_8070/hdsub1
  51. 203
    203
      DOS_8070/hdtrnsfr
  52. 375
    375
      DOS_8070/hdtst2
  53. 169
    169
      DOS_8070/hdtst4
  54. 52
    52
      DOS_8070/hdtstflg
  55. 86
    86
      DOS_8070/hdtsutil
  56. 6
    6
      DOS_8070/hdvector
  57. 196
    196
      DOS_8070/hdverdir
  58. 9
    9
      DOS_8070/i_odef
  59. 68
    68
      DOS_8070/iodefs
  60. 47
    47
      DOS_8070/irq
  61. 52
    52
      DOS_8070/ldcopy
  62. 104
    104
      DOS_8070/lstdir
  63. 1
    1
      DOS_8070/memmap
  64. 54
    54
      DOS_8070/memrw
  65. 34
    34
      DOS_8070/nulbuf
  66. 177
    177
      DOS_8070/rebuild-bams
  67. 76
    76
      DOS_8070/rel2
  68. 37
    37
      DOS_8070/rel3
  69. 45
    45
      DOS_8070/rel4
  70. 97
    97
      DOS_8070/setdrv
  71. 202
    202
      DOS_8070/tst3
  72. 86
    86
      DOS_8070/tsutil
  73. 8
    8
      DOS_8070/work-equates
  74. 1
    1
      README.md

+ 75
- 75
DOS_8070/compress-dir View File

@@ -6,98 +6,98 @@
6 6
 ;
7 7
 ;***************************************
8 8
 COMPRS
9
- LDX DRVNUM ;GET THE DRIVE #
10
- LDA #0 ;CLEAR FLAG
11
- STA HDDFLG,X ;*
12
- JSR HDLDTS ;GET T&S OF DIR
13
- JSR OPNIRD ;OPEN INTERNAL RD CHNL
14
- LDA LINDX ;SAVE LINDX
15
- STA TEMP+4 ;*
16
- JSR OPNIWR ;OPEN INTERNAL WRITE CHNL
17
- LDA LINDX ;SAVE WRITE CHNL
18
- STA TEMP+5 ;*
19
- LDA SECTOR ;SAVE NEW DIR SEC & TRK
20
- STA NDSEC ;*
21
- LDA TRACK ;*
22
- STA NDTRK ;*
9
+	LDX DRVNUM      ;GET THE DRIVE #
10
+	LDA #0          ;CLEAR FLAG
11
+	STA HDDFLG,X    ;*
12
+	JSR HDLDTS      ;GET T&S OF DIR
13
+	JSR OPNIRD      ;OPEN INTERNAL RD CHNL
14
+	LDA LINDX       ;SAVE LINDX
15
+	STA TEMP+4      ;*
16
+	JSR OPNIWR      ;OPEN INTERNAL WRITE CHNL
17
+	LDA LINDX       ;SAVE WRITE CHNL
18
+	STA TEMP+5      ;*
19
+	LDA SECTOR      ;SAVE NEW DIR SEC & TRK
20
+	STA NDSEC       ;*
21
+	LDA TRACK       ;*
22
+	STA NDTRK       ;*
23 23
 ;
24 24
 ;  GET DIRECTORY FLAG
25 25
 ;
26 26
 CMPRA
27
- LDA TEMP+4 ;INPUT LINDX
28
- STA LINDX
29
- LDA #LRF ;EOF
30
- JSR TSTFLG ;CHK IF EOF
31
- BNE CMPR5 ;BR IF EOF
32
- JSR GETPRE ;SET UP
33
- LDA BUFTAB,X ;CHK IF AT BEG OF SECTOR
34
- CMP #2 ;*
35
- BEQ CMPR1 ;BR IF SO
36
- INC BUFTAB,X ;SKIP FIRST TWO BYTES
37
- INC BUFTAB,X ;SKIP FIRST TWO BYTES
27
+	LDA TEMP+4      ;INPUT LINDX
28
+	STA LINDX
29
+	LDA #LRF        ;EOF
30
+	JSR TSTFLG      ;CHK IF EOF
31
+	BNE CMPR5       ;BR IF EOF
32
+	JSR GETPRE      ;SET UP
33
+	LDA BUFTAB,X    ;CHK IF AT BEG OF SECTOR
34
+	CMP #2          ;*
35
+	BEQ CMPR1       ;BR IF SO
36
+	INC BUFTAB,X    ;SKIP FIRST TWO BYTES
37
+	INC BUFTAB,X    ;SKIP FIRST TWO BYTES
38 38
 CMPR1
39
- JSR GIBYTE ;GET NEXT BYTE
40
- LDA DATA ;LOOK AT IT
41
- BEQ CMPR2 ;BR IF DELETED ENTRY
39
+	JSR GIBYTE      ;GET NEXT BYTE
40
+	LDA DATA        ;LOOK AT IT
41
+	BEQ CMPR2       ;BR IF DELETED ENTRY
42 42
 ;
43 43
 ; COPY THIS DIRECTORY ENTRY TO NEW DIR
44 44
 ;
45
- LDA TEMP+5 ;OUTPUT LINDX
46
- STA LINDX ;*
47
- JSR GETPRE ;SETUP
48
- LDA BUFTAB,X ;CHK IF AT BEG OF SECTOR
49
- CMP #2 ;*
50
- BEQ CMPR3A ;BR IF AT BEG OF SECT
51
- INC BUFTAB,X ;SKIP T&S
52
- INC BUFTAB,X ;*
45
+	LDA TEMP+5      ;OUTPUT LINDX
46
+	STA LINDX       ;*
47
+	JSR GETPRE      ;SETUP
48
+	LDA BUFTAB,X    ;CHK IF AT BEG OF SECTOR
49
+	CMP #2          ;*
50
+	BEQ CMPR3A      ;BR IF AT BEG OF SECT
51
+	INC BUFTAB,X    ;SKIP T&S
52
+	INC BUFTAB,X    ;*
53 53
 CMPR3A
54
- LDA #30 ;COPY 30 BYTES
55
- PHA ;*
54
+	LDA #30         ;COPY 30 BYTES
55
+	PHA             ;*
56 56
 CMPR3
57
- LDA TEMP+5 ;OUTPUT LINDX
58
- STA LINDX
59
- LDA DATA ;DATA BYTE
60
- JSR WRTBYT ;PUT IT
61
- PLA ;DECR # BYTES TO COPY
62
- SEC ;*
63
- SBC #1 ;*
64
- BEQ CMPRA ;BR IF DONE
65
- PHA ;SAVE COUNT TO GO
66
- JSR GIBYTE ;GET NEXT BYTE
67
- JMP CMPR3 ;LOOP
57
+	LDA TEMP+5      ;OUTPUT LINDX
58
+	STA LINDX
59
+	LDA DATA        ;DATA BYTE
60
+	JSR WRTBYT      ;PUT IT
61
+	PLA             ;DECR # BYTES TO COPY
62
+	SEC             ;*
63
+	SBC #1          ;*
64
+	BEQ CMPRA       ;BR IF DONE
65
+	PHA             ;SAVE COUNT TO GO
66
+	JSR GIBYTE      ;GET NEXT BYTE
67
+	JMP CMPR3       ;LOOP
68 68
 ;
69 69
 ;  DELETED DIRECTORY ENTRY SO SKIP IT
70 70
 ;
71 71
 CMPR2
72
- LDA #29 ;SKIP THIRTY BYTES
72
+	LDA #29         ;SKIP THIRTY BYTES
73 73
 CMPR4
74
- PHA ;SAVE # TO SKIP
75
- JSR GIBYTE ;GET & TOSS BYTE
76
- PLA ;RESTORE # TO SKIP
77
- SEC ;DEC BY 1
78
- SBC #1
79
- BNE CMPR4 ;LOOP TILL DONE
80
- BEQ CMPRA ;BRA
74
+	PHA             ;SAVE # TO SKIP
75
+	JSR GIBYTE      ;GET & TOSS BYTE
76
+	PLA             ;RESTORE # TO SKIP
77
+	SEC             ;DEC BY 1
78
+	SBC #1
79
+	BNE CMPR4       ;LOOP TILL DONE
80
+	BEQ CMPRA       ;BRA
81 81
 ;
82 82
 ;  EOR ON INPUT SO WRAP UP
83 83
 ;
84 84
 CMPR5
85
- LDA TEMP+5 ;OUTPUT LINDX
86
- STA LINDX
87
- LDA #0 ;NULL REST OF DIR BUF
85
+	LDA TEMP+5      ;OUTPUT LINDX
86
+	STA LINDX
87
+	LDA #0          ;NULL REST OF DIR BUF
88 88
 CMPR6
89
- JSR PUTBYT ;PUT IN BUFR
90
- BNE CMPR6 ;LOOP TILL BUFR FULL
91
- LDA #255 ;SET LINK = FFFF
92
- STA (BUFTAB,X) ;*
93
- INC BUFTAB,X
94
- STA (BUFTAB,X)
95
- JSR WRTBUF ;WRITE LAST BUFR
96
- JSR DBLBUF ;SWAP & WAIT
97
- JSR DBLBUF ;SWAP & WAIT
98
- JSR HDLDTS ;GET DIR T&S ADDR
99
- JSR DELFIL ;DELETE OLD DIR SECTORS
100
- LDX DRVNUM
101
- JSR MAPOU1 ;WRITE OUT THE BAM
102
- JMP FREICH ;FREE INTERNAL CHNLS
103
- .END
89
+	JSR PUTBYT      ;PUT IN BUFR
90
+	BNE CMPR6       ;LOOP TILL BUFR FULL
91
+	LDA #255        ;SET LINK = FFFF
92
+	STA (BUFTAB,X)  ;*
93
+	INC BUFTAB,X
94
+	STA (BUFTAB,X)
95
+	JSR WRTBUF      ;WRITE LAST BUFR
96
+	JSR DBLBUF      ;SWAP & WAIT
97
+	JSR DBLBUF      ;SWAP & WAIT
98
+	JSR HDLDTS      ;GET DIR T&S ADDR
99
+	JSR DELFIL      ;DELETE OLD DIR SECTORS
100
+	LDX DRVNUM
101
+	JSR MAPOU1      ;WRITE OUT THE BAM
102
+	JMP FREICH      ;FREE INTERNAL CHNLS
103
+.END

+ 28
- 28
DOS_8070/copy-overlay View File

@@ -13,31 +13,31 @@
13 13
 ;   DATE: 1/20/81
14 14
 ;   VERSION X.03
15 15
 ;
16
- .PAG 'DSECTS'
17
- .LIB HDDSECT
18
- .PAG 'I/O DEFINITIONS'
19
- .LIB I/ODEF
20
- .PAG 'EQUATES'
21
- .LIB EQUATES
22
- .PAG 'EQUATES'
23
- .LIB HDEQUATE
24
- .PAG 'EQUATES'
25
- .LIB FMT-EQUATES
26
- .PAG 'DOS LINKS'
27
- .LIB DLINKS
28
- .PAG 'PAGE 0 RAM'
29
- * = DOSPG0 ;ORIGIN ADDR
30
- .LIB HDPAGE0
31
- .PAG 'NON-PAGE 0'
32
- * = DOSRAM
33
- .LIB HDPAGE2
34
- .PAG 'WORK EQUATES'
35
- .LIB WORK-EQUATES
36
- .PAG 'COPY OVERLAY'
37
- *=CPYRAM
38
- .LIB COPYSETUP
39
- .PAG 'COPY OVERLAY'
40
- .LIB HDCOPYALL
41
- .PAG 'COPY OVERLAY
42
- .LIB HDCOPY
43
- .END
16
+.PAG 'DSECTS'
17
+.LIB HDDSECT
18
+.PAG 'I/O DEFINITIONS'
19
+.LIB I/ODEF
20
+.PAG 'EQUATES'
21
+.LIB EQUATES
22
+.PAG 'EQUATES'
23
+.LIB HDEQUATE
24
+.PAG 'EQUATES'
25
+.LIB FMT-EQUATES
26
+.PAG 'DOS LINKS'
27
+.LIB DLINKS
28
+.PAG 'PAGE 0 RAM'
29
+	* = DOSPG0      ;ORIGIN ADDR
30
+.LIB HDPAGE0
31
+.PAG 'NON-PAGE 0'
32
+	* = DOSRAM
33
+.LIB HDPAGE2
34
+.PAG 'WORK EQUATES'
35
+.LIB WORK-EQUATES
36
+.PAG 'COPY OVERLAY'
37
+	*=CPYRAM
38
+.LIB COPYSETUP
39
+.PAG 'COPY OVERLAY'
40
+.LIB HDCOPYALL
41
+.PAG 'COPY OVERLAY
42
+.LIB HDCOPY
43
+.END

+ 59
- 59
DOS_8070/copysetup View File

@@ -3,68 +3,68 @@
3 3
 ; AND PARSES SPECIAL CASE
4 4
 ;
5 5
 DSKCPY
6
- .BYTE $AA,$55,$AA
7
- LDA FMTVER ;GET CURRENT ROM VERSION NUMBER
8
- CMP #VERN ;CHECK AGAINST OVERLAY VERSION NUMBER
9
- BEQ DSKCP1
10
- LDA #$29 ;DISK ID MISMATCH ERROR
11
- JMP CMDERR ;POST ERROR
6
+	.BYTE $AA,$55,$AA
7
+	LDA FMTVER      ;GET CURRENT ROM VERSION NUMBER
8
+	CMP #VERN       ;CHECK AGAINST OVERLAY VERSION NUMBER
9
+	BEQ DSKCP1
10
+	LDA #$29        ;DISK ID MISMATCH ERROR
11
+	JMP CMDERR      ;POST ERROR
12 12
 DSKCP1
13
- JSR PRSCLN ;FIND ":"
14
- BNE DX0000
13
+	JSR PRSCLN      ;FIND ":"
14
+	BNE DX0000
15 15
 ;
16
- JSR PRSEQ
16
+	JSR PRSEQ
17 17
 ;
18
- LDA #'* ;CPY ALL
19
- LDX #39 ;PUT AT BUFFER END
20
- STX FILTBL+1
21
- STA CMDBUF,X ;PLACE *
22
- INX
23
- STX CMDSIZ
24
- LDX #1 ;SET UP CNT'S
25
- STX F1CNT
26
- INX
27
- STX F2CNT
28
- JMP MOVLP2 ;ENTER ROUTINE
18
+	LDA #'*         ;CPY ALL
19
+	LDX #39         ;PUT AT BUFFER END
20
+	STX FILTBL+1
21
+	STA CMDBUF,X    ;PLACE *
22
+	INX
23
+	STX CMDSIZ
24
+	LDX #1          ;SET UP CNT'S
25
+	STX F1CNT
26
+	INX
27
+	STX F2CNT
28
+	JMP MOVLP2      ;ENTER ROUTINE
29 29
 ;
30
-DX0000 JSR TC30 ;NORMAL PARSE
31
-DX0005 JSR ALLDRS ;PUT DRV'S IN FILTBL
32
- LDA IMAGE ;GET PARSE IMAGE
33
- AND #%01010101 ;VAL FOR PATT COPY
34
- BNE DX0020 ;MUST BE CONCAT OR NORMAL
35
- LDX FILTBL ;CHK FOR *
36
- LDA CMDBUF,X
37
- CMP #'*
38
- BNE DX0020
39
- LDX #1 ;SET CNT'S
40
- STX F1CNT
41
- INX
42
- STX F2CNT
43
- JMP CPYDTD ;GO COPY
44
-DX0010 LDA #BADSYN ;SYNTAX ERROR
45
- JMP CMDERR
46
-DX0020 LDA IMAGE ;CHK FOR NORMAL
47
- AND #%11011001
48
- BNE DX0010
49
- JMP COPY
30
+DX0000	JSR TC30        ;NORMAL PARSE
31
+DX0005	JSR ALLDRS      ;PUT DRV'S IN FILTBL
32
+	LDA IMAGE       ;GET PARSE IMAGE
33
+	AND #%01010101  ;VAL FOR PATT COPY
34
+	BNE DX0020      ;MUST BE CONCAT OR NORMAL
35
+	LDX FILTBL      ;CHK FOR *
36
+	LDA CMDBUF,X
37
+	CMP #'*
38
+	BNE DX0020
39
+	LDX #1          ;SET CNT'S
40
+	STX F1CNT
41
+	INX
42
+	STX F2CNT
43
+	JMP CPYDTD      ;GO COPY
44
+DX0010	LDA #BADSYN     ;SYNTAX ERROR
45
+	JMP CMDERR
46
+DX0020	LDA IMAGE       ;CHK FOR NORMAL
47
+	AND #%11011001
48
+	BNE DX0010
49
+	JMP COPY
50 50
 ;
51 51
 PRSEQ
52
- LDA #'= ;SPECIAL CASE
53
- JSR PARSE
54
- BNE X0020
55
-X0015 LDA #BADSYN
56
- JMP CMDERR
57
-X0020 LDA CMDBUF,Y
58
- JSR TST0V1
59
- BMI X0015
60
- STA FILDRV+1 ;SRC DRV
61
- DEY
62
- DEY
63
- LDA CMDBUF,Y
64
- JSR TST0V1
65
- BMI X0015
66
- CMP FILDRV+1 ;CANNOT BE EQUAL
67
- BEQ X0015
68
- STA FILDRV ;DEST DRV
69
- RTS
70
- .END
52
+	LDA #'=         ;SPECIAL CASE
53
+	JSR PARSE
54
+	BNE X0020
55
+X0015	LDA #BADSYN
56
+	JMP CMDERR
57
+X0020	LDA CMDBUF,Y
58
+	JSR TST0V1
59
+	BMI X0015
60
+	STA FILDRV+1    ;SRC DRV
61
+	DEY
62
+	DEY
63
+	LDA CMDBUF,Y
64
+	JSR TST0V1
65
+	BMI X0015
66
+	CMP FILDRV+1    ;CANNOT BE EQUAL
67
+	BEQ X0015
68
+	STA FILDRV      ;DEST DRV
69
+	RTS
70
+.END

+ 25
- 25
DOS_8070/cu-links View File

@@ -10,28 +10,28 @@
10 10
 ;
11 11
 ;  ADDRESSES LOCATED IN THE CONTROLLER
12 12
 ;
13
-BMPJB = $C30F
14
-CHECK = $C000 ;CHECK ENTRANCE
15
-DMARST = $CBEB
16
-DOOPSW = NMIRAM ;DOOR OPEN SWITCH
17
-DORCK = $C70E ;DOOR OPEN CHECK
18
-DOSSET = $C3BD
19
-GENHD1 = $CAFC ;GEN HDR
20
-GENHDR = $CB02 ;GENERATE HEADER
21
-ID1WR = $C32A ;WRITE JOB
22
-ID1WR1 = $C32D
23
-IRQ4 = $C050
24
-IRQPOL = $C019 ;IRQ ENTRANCE
25
-NMI = NMIRAM+4 ;NMI ENTRANCE
26
-POR = $C013 ;INITIALIZATION ENTRANCE
27
-PORBMP = $C016 ;POWER UP RESTORE
28
-POST1 = $C38F
29
-PSTBAD = $CB86 ;POST BAD CMD
30
-SCNX = $C2EB
31
-SHSKP = $CBF1 ;SEEK HSKPG
32
-START = $C000 ;START A JOB
33
-STC2 = $C66B
34
-STC3 = $C66B ;COMMON START
35
-SUPDP = $CBCA
36
-WPMSK = $C127 ;WRITE PROTECT MASK TABLE
37
- .END
13
+BMPJB	= $C30F
14
+CHECK	= $C000         ;CHECK ENTRANCE
15
+DMARST	= $CBEB
16
+DOOPSW	= NMIRAM        ;DOOR OPEN SWITCH
17
+DORCK	= $C70E         ;DOOR OPEN CHECK
18
+DOSSET	= $C3BD
19
+GENHD1	= $CAFC         ;GEN HDR
20
+GENHDR	= $CB02         ;GENERATE HEADER
21
+ID1WR	= $C32A         ;WRITE JOB
22
+ID1WR1	= $C32D
23
+IRQ4	= $C050
24
+IRQPOL	= $C019         ;IRQ ENTRANCE
25
+NMI	= NMIRAM+4      ;NMI ENTRANCE
26
+POR	= $C013         ;INITIALIZATION ENTRANCE
27
+PORBMP	= $C016         ;POWER UP RESTORE
28
+POST1	= $C38F
29
+PSTBAD	= $CB86         ;POST BAD CMD
30
+SCNX	= $C2EB
31
+SHSKP	= $CBF1         ;SEEK HSKPG
32
+START	= $C000         ;START A JOB
33
+STC2	= $C66B
34
+STC3	= $C66B         ;COMMON START
35
+SUPDP	= $CBCA
36
+WPMSK	= $C127         ;WRITE PROTECT MASK TABLE
37
+.END

+ 34
- 34
DOS_8070/dlinks View File

@@ -1,34 +1,34 @@
1
-ADDFIL = $EAB5
2
-ADDR1 = $F7CE
3
-ADRELS = $F904
4
-ALLDRS = $D8F8
5
-APPEND = $EE1C
6
-BADSYN = $30
7
-CHKIN = $DEE9
8
-CHKIO = $DF04
9
-CLSCHN = $EEFC
10
-CMDERR = $D7B4
11
-ENDCMD = $D78B
12
-FFRE = $DAC2
13
-FFST = $DAD1
14
-FNDRCH = $E615
15
-FNDWCH = $E630
16
-GBYTE = $E913
17
-LOOKUP = $DA86
18
-MISTYP = $64
19
-OPNIRD = $E9E5
20
-OPNIWR = $E9F5
21
-OPREAD = $ED88
22
-OPTSCH = $D9D3
23
-PARSE = $D843
24
-PIBYTE = $E48D
25
-PRSCLN = $D7D1
26
-SETDRN = $E6FF
27
-SETFLG = $F1F4
28
-SETPNT = $EA2D
29
-SSEND = $F659
30
-TC30 = $D7E4
31
-TST0V1 = $D98C
32
-TSTFLG = $F206
33
-TYPFIL = $E64D
34
- .END
1
+ADDFIL	= $EAB5
2
+ADDR1	= $F7CE
3
+ADRELS	= $F904
4
+ALLDRS	= $D8F8
5
+APPEND	= $EE1C
6
+BADSYN	= $30
7
+CHKIN	= $DEE9
8
+CHKIO	= $DF04
9
+CLSCHN	= $EEFC
10
+CMDERR	= $D7B4
11
+ENDCMD	= $D78B
12
+FFRE	= $DAC2
13
+FFST	= $DAD1
14
+FNDRCH	= $E615
15
+FNDWCH	= $E630
16
+GBYTE	= $E913
17
+LOOKUP	= $DA86
18
+MISTYP	= $64
19
+OPNIRD	= $E9E5
20
+OPNIWR	= $E9F5
21
+OPREAD	= $ED88
22
+OPTSCH	= $D9D3
23
+PARSE	= $D843
24
+PIBYTE	= $E48D
25
+PRSCLN	= $D7D1
26
+SETDRN	= $E6FF
27
+SETFLG	= $F1F4
28
+SETPNT	= $EA2D
29
+SSEND	= $F659
30
+TC30	= $D7E4
31
+TST0V1	= $D98C
32
+TSTFLG	= $F206
33
+TYPFIL	= $E64D
34
+.END

+ 129
- 129
DOS_8070/dos View File

@@ -24,133 +24,133 @@
24 24
 ;
25 25
 ;
26 26
 ;*************************************
27
- .PAG 'DSECTS'
28
- .LIB HDDSECT
29
- .PAG 'MEMORY MAP'
30
- .LIB MEMMAP
31
- .PAG 'I/O DEFINITIONS'
32
- .LIB I/ODEF
33
- .PAG 'I/O DEFINITIONS'
34
- .LIB IODEFS
35
- .PAG 'EQUATES'
36
- .LIB EQUATES
37
- .PAG 'EQUATES'
38
- .LIB HDEQUATE
39
- .PAG 'CU-LINKS'
40
- .LIB CU-LINKS
41
- .PAG 'PAGE 0 RAM'
42
- * = DOSPG0 ;ORIGIN ADDRESS
43
- .LIB HDPAGE0
44
- .PAG 'NON-PAGE 0'
45
- * = DOSRAM ;ORIGIN ADDRESS
46
- .LIB HDPAGE2
47
- .PAG 'WORK EQUATES'
48
- .LIB WORK-EQUATES
49
- .PAG 'ROM TABLES'
50
- * = DOSCOD ;ORIGIN ADDRESS
51
- .LIB HDROMTBL
52
- .PAG 'POR ERRORS'
53
- .LIB HDDSKINT
54
- .PAG 'BG - IDLE'
55
- .LIB HDIDLE
56
- .PAG 'IRQ'
57
- .LIB IRQ
58
- .PAG 'IEEE'
59
- .LIB HDIEEE
60
- .PAG 'LED CONTROL'
61
- .LIB HDSETLED
62
- .PAG 'MAPOUT'
63
- .LIB HDMAPOUT
64
- .PAG 'ERROR PROC'
65
- .LIB HDERPROC
66
- .PAG 'LIST DIRECTORY'
67
- .LIB LSTDIR
68
- .PAG 'PARSE & EXECUTE'
69
- .LIB HDPARSEX
70
- .PAG 'SET DRIVE'
71
- .LIB SETDRV
72
- .PAG 'AUTO INIT'
73
- .LIB HDAUTOIT
74
- .PAG 'LOOKUP-OPTSCH'
75
- .LIB HDLOOKUP
76
- .PAG 'TRANSFER'
77
- .LIB HDTRNSFR
78
- .PAG 'SCRATCH'
79
- .LIB HDSCRTCH
80
- .PAG 'RENAME'
81
- .LIB HDRENAME
82
- .PAG 'MEM-RD,WRT,EX'
83
- .LIB MEMRW
84
- .PAG 'LOAD COPY OVER-LAY'
85
- .LIB LDCOPY
86
- .PAG 'VALIDATE'
87
- .LIB HDVERDIR
88
- .PAG 'VALIDATE'
89
- .LIB COMPRESS-DIR
90
- .PAG 'VALIDATE'
91
- .LIB REBUILD-BAMS
92
- .PAG 'FIND REL FILE'
93
- .LIB FNDREL
94
- .PAG 'TST2'
95
- .LIB HDTST2
96
- .PAG 'CU INTERFACE'
97
- .LIB HDCUINT
98
- .PAG 'TST3'
99
- .LIB TST3
100
- .PAG 'TST4'
101
- .LIB HDTST4
102
- .PAG 'JOBS'
103
- .LIB HDJOBS
104
- .PAG 'ADD FILE'
105
- .LIB HDADDFIL
106
- .PAG 'OPEN'
107
- .LIB HDOPEN
108
- .PAG 'CLOSE'
109
- .LIB HDCLOSE
110
- .PAG 'OPEN CHANNEL'
111
- .LIB HDOPCHNL
112
- .PAG 'TSTFLG'
113
- .LIB HDTSTFLG
114
- .PAG 'TSUTIL'
115
- .LIB HDTSUTIL
116
- .PAG 'SSUTIL'
117
- .LIB HDSSUTIL
118
- .PAG 'SSTEST'
119
- .LIB HDSSTEST
120
- .PAG 'GET ACT'
121
- .LIB GETACT
122
- .PAG 'REL1'
123
- .LIB HDREL1
124
- .PAG 'REL2'
125
- .LIB REL2
126
- .PAG 'REL3'
127
- .LIB REL3
128
- .PAG 'REL4'
129
- .LIB REL4
130
- .PAG 'SSEND'
131
- .LIB HDSSEND
132
- .PAG 'RECORD'
133
- .LIB HDRECORD
134
- .PAG 'NULL BUFR'
135
- .LIB NULBUF
136
- .PAG 'ADD REL'
137
- .LIB HDADDREL
138
- .PAG 'NEWSS'
139
- .LIB HDNEWSS
140
- .PAG 'INIT DRIVE'
141
- .LIB HDINITDR
142
- .PAG 'NEW DIRECTORY'
143
- .LIB HDNEWDIR
144
- .PAG 'GET & FREE SECTOR'
145
- .LIB HDALLOC
146
- .PAG 'FREE & USED '
147
- .LIB HDFREUSED
148
- .PAG 'SUBROUTINES'
149
- .LIB HDSUB1
150
- .PAG 'HARDWARE VECTORS'
151
- .PAG 'ROM LRC'
27
+.PAG 'DSECTS'
28
+.LIB HDDSECT
29
+.PAG 'MEMORY MAP'
30
+.LIB MEMMAP
31
+.PAG 'I/O DEFINITIONS'
32
+.LIB I/ODEF
33
+.PAG 'I/O DEFINITIONS'
34
+.LIB IODEFS
35
+.PAG 'EQUATES'
36
+.LIB EQUATES
37
+.PAG 'EQUATES'
38
+.LIB HDEQUATE
39
+.PAG 'CU-LINKS'
40
+.LIB CU-LINKS
41
+.PAG 'PAGE 0 RAM'
42
+	* = DOSPG0      ;ORIGIN ADDRESS
43
+.LIB HDPAGE0
44
+.PAG 'NON-PAGE 0'
45
+	* = DOSRAM      ;ORIGIN ADDRESS
46
+.LIB HDPAGE2
47
+.PAG 'WORK EQUATES'
48
+.LIB WORK-EQUATES
49
+.PAG 'ROM TABLES'
50
+	* = DOSCOD      ;ORIGIN ADDRESS
51
+.LIB HDROMTBL
52
+.PAG 'POR ERRORS'
53
+.LIB HDDSKINT
54
+.PAG 'BG - IDLE'
55
+.LIB HDIDLE
56
+.PAG 'IRQ'
57
+.LIB IRQ
58
+.PAG 'IEEE'
59
+.LIB HDIEEE
60
+.PAG 'LED CONTROL'
61
+.LIB HDSETLED
62
+.PAG 'MAPOUT'
63
+.LIB HDMAPOUT
64
+.PAG 'ERROR PROC'
65
+.LIB HDERPROC
66
+.PAG 'LIST DIRECTORY'
67
+.LIB LSTDIR
68
+.PAG 'PARSE & EXECUTE'
69
+.LIB HDPARSEX
70
+.PAG 'SET DRIVE'
71
+.LIB SETDRV
72
+.PAG 'AUTO INIT'
73
+.LIB HDAUTOIT
74
+.PAG 'LOOKUP-OPTSCH'
75
+.LIB HDLOOKUP
76
+.PAG 'TRANSFER'
77
+.LIB HDTRNSFR
78
+.PAG 'SCRATCH'
79
+.LIB HDSCRTCH
80
+.PAG 'RENAME'
81
+.LIB HDRENAME
82
+.PAG 'MEM-RD,WRT,EX'
83
+.LIB MEMRW
84
+.PAG 'LOAD COPY OVER-LAY'
85
+.LIB LDCOPY
86
+.PAG 'VALIDATE'
87
+.LIB HDVERDIR
88
+.PAG 'VALIDATE'
89
+.LIB COMPRESS-DIR
90
+.PAG 'VALIDATE'
91
+.LIB REBUILD-BAMS
92
+.PAG 'FIND REL FILE'
93
+.LIB FNDREL
94
+.PAG 'TST2'
95
+.LIB HDTST2
96
+.PAG 'CU INTERFACE'
97
+.LIB HDCUINT
98
+.PAG 'TST3'
99
+.LIB TST3
100
+.PAG 'TST4'
101
+.LIB HDTST4
102
+.PAG 'JOBS'
103
+.LIB HDJOBS
104
+.PAG 'ADD FILE'
105
+.LIB HDADDFIL
106
+.PAG 'OPEN'
107
+.LIB HDOPEN
108
+.PAG 'CLOSE'
109
+.LIB HDCLOSE
110
+.PAG 'OPEN CHANNEL'
111
+.LIB HDOPCHNL
112
+.PAG 'TSTFLG'
113
+.LIB HDTSTFLG
114
+.PAG 'TSUTIL'
115
+.LIB HDTSUTIL
116
+.PAG 'SSUTIL'
117
+.LIB HDSSUTIL
118
+.PAG 'SSTEST'
119
+.LIB HDSSTEST
120
+.PAG 'GET ACT'
121
+.LIB GETACT
122
+.PAG 'REL1'
123
+.LIB HDREL1
124
+.PAG 'REL2'
125
+.LIB REL2
126
+.PAG 'REL3'
127
+.LIB REL3
128
+.PAG 'REL4'
129
+.LIB REL4
130
+.PAG 'SSEND'
131
+.LIB HDSSEND
132
+.PAG 'RECORD'
133
+.LIB HDRECORD
134
+.PAG 'NULL BUFR'
135
+.LIB NULBUF
136
+.PAG 'ADD REL'
137
+.LIB HDADDREL
138
+.PAG 'NEWSS'
139
+.LIB HDNEWSS
140
+.PAG 'INIT DRIVE'
141
+.LIB HDINITDR
142
+.PAG 'NEW DIRECTORY'
143
+.LIB HDNEWDIR
144
+.PAG 'GET & FREE SECTOR'
145
+.LIB HDALLOC
146
+.PAG 'FREE & USED '
147
+.LIB HDFREUSED
148
+.PAG 'SUBROUTINES'
149
+.LIB HDSUB1
150
+.PAG 'HARDWARE VECTORS'
151
+.PAG 'ROM LRC'
152 152
 ECHKSM
153
- .BYTE 0 ;CHK SUM FOR 2ND ROM
154
- .LIB HDVECTOR
155
- .PAGE ''
156
- .END
153
+	.BYTE 0         ;CHK SUM FOR 2ND ROM
154
+.LIB HDVECTOR
155
+.PAGE ''
156
+.END

+ 24
- 24
DOS_8070/equates View File

@@ -5,29 +5,29 @@
5 5
 ;    SUB-SYTEMS OF THE DISK SOFTWARE
6 6
 ;
7 7
 ;***************************************
8
- ;DEFINE PAGE 0 USAGE
9
-DOSPG0 = $00 ;DOS PAGE 0 BEGINNING
10
-CUPAG0 = $E8 ;BEG ADDR OF PAGE 0 RAM
11
- ;DEFINE NON-PAGE 0 RAM USEAGE
12
-NMIRAM = $880 ;FOR NMI
13
-DOSRAM = $500 ;DOS WORK AREA START
14
-CURAM = $200 ;BEG ADDR OF CU WORK AREA
15
-CKSM = $200 ;BEG ADDR OF CHK SUM CODE
16
- ;DEFINE CODE LOCATIONS
17
- ; CU CODE FOLLOWS BEHIND NMI CODE
18
-CUCODE = $C000 ;BEG ADDR OF CU CODE
19
-DOSCOD = $CE50 ;DOS CODE
20
-FMTCOD = $900 ;ORIGIN ADDR OF FMT CODE
21
-FMTBUF = 16 ;FIRST BUFR FOR FMT
22
-READ = $80 ;READ CMD
23
-WRITE = $90 ;WRITE CMD
24
-FMTCMD = $F0 ;FORMAT A TRACK CMD
25
-BUMP = $C0 ;RESTORE CMD
26
-SNSCMD = $B0 ;REQUEST SENSE CMD
27
-WVERFY = $A0 ;VERIFY CMD
28
-VOLTRK = 0 ;VOLUME LABEL TRACK
29
-VOLSEC = 1 ;VOLUME LABEL SECTOR
30
-FMTDRV = 04 ;FORMAT HARD DISK CMD
8
+;DEFINE PAGE 0 USAGE
9
+DOSPG0	= $00           ;DOS PAGE 0 BEGINNING
10
+CUPAG0	= $E8           ;BEG ADDR OF PAGE 0 RAM
11
+;DEFINE NON-PAGE 0 RAM USEAGE
12
+NMIRAM	= $880          ;FOR NMI
13
+DOSRAM	= $500          ;DOS WORK AREA START
14
+CURAM	= $200          ;BEG ADDR OF CU WORK AREA
15
+CKSM	= $200          ;BEG ADDR OF CHK SUM CODE
16
+;DEFINE CODE LOCATIONS
17
+; CU CODE FOLLOWS BEHIND NMI CODE
18
+CUCODE	= $C000         ;BEG ADDR OF CU CODE
19
+DOSCOD	= $CE50         ;DOS CODE
20
+FMTCOD	= $900          ;ORIGIN ADDR OF FMT CODE
21
+FMTBUF	= 16            ;FIRST BUFR FOR FMT
22
+READ	= $80           ;READ CMD
23
+WRITE	= $90           ;WRITE CMD
24
+FMTCMD	= $F0           ;FORMAT A TRACK CMD
25
+BUMP	= $C0           ;RESTORE CMD
26
+SNSCMD	= $B0           ;REQUEST SENSE CMD
27
+WVERFY	= $A0           ;VERIFY CMD
28
+VOLTRK	= 0             ;VOLUME LABEL TRACK
29
+VOLSEC	= 1             ;VOLUME LABEL SECTOR
30
+FMTDRV	= 04            ;FORMAT HARD DISK CMD
31 31
 ;
32 32
 ;
33
- .END
33
+.END

+ 3
- 3
DOS_8070/fmt-equates View File

@@ -5,6 +5,6 @@
5 5
 ;    FORMATTER SOFTWARE
6 6
 ;
7 7
 ;***************************************
8
-FMTVER = $FFF9 ;ROM VERSION #
9
-VERN = $03 ;INTENDED VERSION #
10
- .END
8
+FMTVER	= $FFF9         ;ROM VERSION #
9
+VERN	= $03           ;INTENDED VERSION #
10
+.END

+ 99
- 99
DOS_8070/fndrel View File

@@ -26,27 +26,27 @@
26 26
 ;
27 27
 ;
28 28
 ;
29
-FNDREL JSR MULPLY ;RESULT=RN*RS+RP
30
- JSR DIV254 ;DIVIDE BY 254
31
- LDA ACCUM+1 ;SAVE REMAINDER
32
- STA RELPTR
33
- JSR DIV120 ;DIVIDE BY 120
34
- INC RELPTR
35
- INC RELPTR
29
+FNDREL	JSR MULPLY      ;RESULT=RN*RS+RP
30
+	JSR DIV254      ;DIVIDE BY 254
31
+	LDA ACCUM+1     ;SAVE REMAINDER
32
+	STA RELPTR
33
+	JSR DIV120      ;DIVIDE BY 120
34
+	INC RELPTR
35
+	INC RELPTR
36 36
 ;
37 37
 ; <BIG FILES CHANGE>
38 38
 ;
39
- LDA ACCUM+1 ;GET REMAINDER
40
- ASL A ;*2
41
- CLC ;PLUS OFFSET TO FIRST SS PTR
42
- ADC #16 ;*
43
- STA SSIND ;*
44
- JSR DIV006 ;DIVIDE SS # BY 6 TO GET GROUP #
45
- LDA ACCUM+1 ;SAVE REMAINDER AS SSNUM
46
- STA SSNUM ;*
47
- LDA RESULT ;GET RESULT
48
- STA GRPNUM ;SAVE AS THE DESIRED GROUP #
49
- RTS
39
+	LDA ACCUM+1     ;GET REMAINDER
40
+	ASL A           ;*2
41
+	CLC             ;PLUS OFFSET TO FIRST SS PTR
42
+	ADC #16         ;*
43
+	STA SSIND       ;*
44
+	JSR DIV006      ;DIVIDE SS # BY 6 TO GET GROUP #
45
+	LDA ACCUM+1     ;SAVE REMAINDER AS SSNUM
46
+	STA SSNUM       ;*
47
+	LDA RESULT      ;GET RESULT
48
+	STA GRPNUM      ;SAVE AS THE DESIRED GROUP #
49
+	RTS
50 50
 ;
51 51
 ;
52 52
 ;
@@ -56,40 +56,40 @@ FNDREL JSR MULPLY ;RESULT=RN*RS+RP
56 56
 ;
57 57
 ;  DESTROYS A,X
58 58
 ;
59
-MULPLY JSR ZERRES ;RESULT=0
60
- STA ACCUM+3 ;A=0
61
- LDX LINDX ;GET INDEX
62
- LDA RECL,X
63
- STA ACCUM+1
64
- LDA RECH,X
65
- STA ACCUM+2
66
- BNE MUL25 ;ADJUST FOR REC #1 &...
67
- LDA ACCUM+1 ;...#0 = 1ST REC
68
- BEQ MUL50
69
-MUL25 LDA ACCUM+1
70
- SEC
71
- SBC #1
72
- STA ACCUM+1
73
- BCS MUL50
74
- DEC ACCUM+2
59
+MULPLY	JSR ZERRES      ;RESULT=0
60
+	STA ACCUM+3     ;A=0
61
+	LDX LINDX       ;GET INDEX
62
+	LDA RECL,X
63
+	STA ACCUM+1
64
+	LDA RECH,X
65
+	STA ACCUM+2
66
+	BNE MUL25       ;ADJUST FOR REC #1 &...
67
+	LDA ACCUM+1     ;...#0 = 1ST REC
68
+	BEQ MUL50
69
+MUL25	LDA ACCUM+1
70
+	SEC
71
+	SBC #1
72
+	STA ACCUM+1
73
+	BCS MUL50
74
+	DEC ACCUM+2
75 75
 MUL50
76
- LDA RS,X ;COPY RECSIZ
77
- STA TEMP
78
-MUL100 LSR TEMP ;DO AN ADD ?
79
- BCC MUL200 ;NO
80
- JSR ADDRES ;RESULT=RESULT+ACCUM+1,2,3
81
-MUL200 JSR ACCX2 ;2*(ACCUM+1,2,3)
82
- LDA TEMP ;DONE ?
83
- BNE MUL100 ;NO
84
- LDA RECPTR ;ADD IN LAST BIT
85
- CLC
86
- ADC RESULT
87
- STA RESULT
88
- BCC MUL400 ;SKIP NO CARRY
89
- INC RESULT+1
90
- BNE MUL400
91
- INC RESULT+2
92
-MUL400 RTS
76
+	LDA RS,X        ;COPY RECSIZ
77
+	STA TEMP
78
+MUL100	LSR TEMP        ;DO AN ADD ?
79
+	BCC MUL200      ;NO
80
+	JSR ADDRES      ;RESULT=RESULT+ACCUM+1,2,3
81
+MUL200	JSR ACCX2       ;2*(ACCUM+1,2,3)
82
+	LDA TEMP        ;DONE ?
83
+	BNE MUL100      ;NO
84
+	LDA RECPTR      ;ADD IN LAST BIT
85
+	CLC
86
+	ADC RESULT
87
+	STA RESULT
88
+	BCC MUL400      ;SKIP NO CARRY
89
+	INC RESULT+1
90
+	BNE MUL400
91
+	INC RESULT+2
92
+MUL400	RTS
93 93
 ;
94 94
 ;
95 95
 ;
@@ -97,60 +97,60 @@ MUL400 RTS
97 97
 ;
98 98
 ; RESULT=QUOTIENT ,ACCUM+1=REMAINDER
99 99
 ;
100
-DIV254 LDA #254 ;DIVIDE BY 254
101
- .BYTE $2C ;SKIP NEXT TWO BYTES
102
-DIV120 LDA #120 ;DIVIDE BY 120
103
- .BYTE $2C ;SKIP NEXT TWO BYTES
104
-DIV006 LDA #6 ;DIVIDE BY 6
105
- STA TEMP ;8 BIT DIVISOR
106
- LDA #0 ;CLEAR PARTIAL DIVIDEND
107
- STA ACCUM+1 ;*
108
- STA ACCUM+2 ;*
109
- LDX #24 ;24 BIT DIVIDEND
100
+DIV254	LDA #254        ;DIVIDE BY 254
101
+	.BYTE $2C       ;SKIP NEXT TWO BYTES
102
+DIV120	LDA #120        ;DIVIDE BY 120
103
+	.BYTE $2C       ;SKIP NEXT TWO BYTES
104
+DIV006	LDA #6          ;DIVIDE BY 6
105
+	STA TEMP        ;8 BIT DIVISOR
106
+	LDA #0          ;CLEAR PARTIAL DIVIDEND
107
+	STA ACCUM+1     ;*
108
+	STA ACCUM+2     ;*
109
+	LDX #24         ;24 BIT DIVIDEND
110 110
 NXTBT
111
- ASL RESULT ;SHIFT DIVIDEND/QUOTIENT
112
- ROL RESULT+1 ;*
113
- ROL RESULT+2 ;*
114
- ROL ACCUM+1 ;INTO PARTIAL DIVIDEND
115
- ROL ACCUM+2 ;*
116
- LDA ACCUM+1 ;SUB 8 BIT DIVISOR
117
- SEC ;PREP FOR SUB
118
- SBC TEMP ;*
119
- TAY ;SAVE RESULT
120
- LDA ACCUM+2 ;RIPPLE THE CARRY
121
- SBC #0 ;*
122
- BCC CNTDN ;BR IF TEMP > DIVIDEND
123
- INC RESULT ;SET LOW BIT OF RESULT
124
- STA ACCUM+2 ;STORE UPDATED PARTIAL
125
- STY ACCUM+1 ;*
111
+	ASL RESULT      ;SHIFT DIVIDEND/QUOTIENT
112
+	ROL RESULT+1    ;*
113
+	ROL RESULT+2    ;*
114
+	ROL ACCUM+1     ;INTO PARTIAL DIVIDEND
115
+	ROL ACCUM+2     ;*
116
+	LDA ACCUM+1     ;SUB 8 BIT DIVISOR
117
+	SEC             ;PREP FOR SUB
118
+	SBC TEMP        ;*
119
+	TAY             ;SAVE RESULT
120
+	LDA ACCUM+2     ;RIPPLE THE CARRY
121
+	SBC #0          ;*
122
+	BCC CNTDN       ;BR IF TEMP > DIVIDEND
123
+	INC RESULT      ;SET LOW BIT OF RESULT
124
+	STA ACCUM+2     ;STORE UPDATED PARTIAL
125
+	STY ACCUM+1     ;*
126 126
 CNTDN
127
- DEX ;CNT DOWN 24 BITS
128
- BNE NXTBT
129
- RTS
127
+	DEX             ;CNT DOWN 24 BITS
128
+	BNE NXTBT
129
+	RTS
130 130
 ;
131 131
 ;
132 132
 ;
133 133
 ; ZERO RESULT
134 134
 ;
135
-ZERRES LDA #0
136
- STA RESULT
137
- STA RESULT+1
138
- STA RESULT+2
139
- RTS
135
+ZERRES	LDA #0
136
+	STA RESULT
137
+	STA RESULT+1
138
+	STA RESULT+2
139
+	RTS
140 140
 ;
141 141
 ;
142 142
 ;
143 143
 ; MULTIPLY ACCUM BY 4
144 144
 ;
145
-ACCX4 JSR ACCX2
145
+ACCX4	JSR ACCX2
146 146
 ;
147 147
 ; MULTIPLY ACCUM BY 2
148 148
 ;
149
-ACCX2 CLC
150
-ACC200 ROL ACCUM+1
151
- ROL ACCUM+2
152
- ROL ACCUM+3
153
- RTS
149
+ACCX2	CLC
150
+ACC200	ROL ACCUM+1
151
+	ROL ACCUM+2
152
+	ROL ACCUM+3
153
+	RTS
154 154
 ;
155 155
 ;
156 156
 ;
@@ -158,16 +158,16 @@ ACC200 ROL ACCUM+1
158 158
 ;
159 159
 ;  RESULT=RESULT+ACCUM+1,2,3
160 160
 ;
161
-ADDRES CLC
162
- LDX #$FD
163
-ADD100 LDA RESULT+3,X
164
- ADC ACCUM+4,X
165
- STA RESULT+3,X
166
- INX
167
- BNE ADD100
168
- RTS
161
+ADDRES	CLC
162
+	LDX #$FD
163
+ADD100	LDA RESULT+3,X
164
+	ADC ACCUM+4,X
165
+	STA RESULT+3,X
166
+	INX
167
+	BNE ADD100
168
+	RTS
169 169
 ;
170 170
 ;
171 171
 ;
172 172
 ;
173
- .END
173
+.END

+ 20
- 20
DOS_8070/getact View File

@@ -7,13 +7,13 @@
7 7
 ;*********************************
8 8
 ;
9 9
 GETACT
10
- LDX LINDX
11
- LDA BUF0,X
12
- BPL GA1
13
- LDA BUF1,X
10
+	LDX LINDX
11
+	LDA BUF0,X
12
+	BPL GA1
13
+	LDA BUF1,X
14 14
 GA1
15
- AND #$BF ; STRIP DIRTY BIT
16
- RTS
15
+	AND #$BF        ; STRIP DIRTY BIT
16
+	RTS
17 17
 ;
18 18
 ;*********************************
19 19
 ;* GAFLG: GET ACTIVE BUFFER #;   *
@@ -25,20 +25,20 @@ GA1
25 25
 ;*********************************
26 26
 ;
27 27
 GAFLGS
28
- LDX LINDX
29
-GA2 STX LBUSED ;SAVE BUF #
30
- LDA BUF0,X
31
- BPL GA3
28
+	LDX LINDX
29
+GA2	STX LBUSED      ;SAVE BUF #
30
+	LDA BUF0,X
31
+	BPL GA3
32 32
 ;
33
- TXA
34
- CLC
35
- ADC #MXCHNS
36
- STA LBUSED
37
- LDA BUF1,X
33
+	TXA
34
+	CLC
35
+	ADC #MXCHNS
36
+	STA LBUSED
37
+	LDA BUF1,X
38 38
 GA3
39
- STA T1
40
- AND #$1F
41
- BIT T1
42
- RTS
39
+	STA T1
40
+	AND #$1F
41
+	BIT T1
42
+	RTS
43 43
 ;
44
- .END
44
+.END

+ 114
- 114
DOS_8070/hdaddfil View File

@@ -1,117 +1,117 @@
1 1
 ; ADD FILE TO DIRECTORY
2
- .SKIP
3
-ADDFIL LDA SA ;SAVE VARIABLES 
4
- PHA
5
- LDA LINDX
6
- PHA
7
- LDA SECTOR
8
- PHA
9
- LDA TRACK
10
- PHA
11
- LDA #IRSA
12
- STA SA
13
- JSR CURBLK ;USE LAST ACCESSED SEARCH
14
- LDA TYPE
15
- PHA
16
- LDA FILDRV
17
- AND #1
18
- STA DRVNUM
19
- LDX JOBNUM
20
- EOR LSTJOB,X
21
- LSR A
22
- BCC AF08 ;SAME DRIVE AS REQUIRED
23
- .SKIP
24
- LDX #1
25
- STX DELIND ;LOOK FOR DELETED ENTRY
26
- JSR SRCHST
27
- BEQ AF15 ;ALL FULL, NEW SECTOR 
28
- BNE AF20 ;FOUND ONE
29
- .SKIP
30
-AF08 LDA DELSEC
31
- CMP #255 ;<HD>
32
- BEQ AF10 ;DELETED ENTRY NOT LOCATED
33
- CMP SECTOR
34
- BNE AF08A ;SECTOR IS NOT RES <HD>
35
- LDA DELTRK ;CHK ALSO TRACK <HD>
36
- CMP TRACK ;CHK IF RES <HD>
37
- BEQ AF20 ;SECTOR IS RESIDENT <HD>
38
-AF08A ;<HD>
39
- LDA DELSEC ;<HD>
40
- STA SECTOR ;<HD>
41
- LDA DELTRK ;<HD>
42
- STA TRACK ;<HD>
43
- JSR DRTRD ;READ SECTOR IN
44
- JMP AF20
45
- .SKIP
46
-AF10 LDA #1 ;FIND DELETED ENTRY
47
- STA DELIND
48
- JSR SEARCH
49
- BNE AF20
50
-AF15 JSR NXDRBK ;ALL FULL, NEW SECTOR
51
- LDA SECTOR
52
- STA DELSEC
53
- LDA TRACK ;<HD>
54
- STA DELTRK ;<HD>
55
- LDA #2
56
- STA DELIND
57
-AF20 LDA DELIND
58
- JSR SETPNT
59
- PLA
60
- STA TYPE ;SET TYPE
61
- CMP #RELTYP
62
- BNE AF25
63
- ORA #$80
2
+.SKIP
3
+ADDFIL	LDA SA          ;SAVE VARIABLES 
4
+	PHA
5
+	LDA LINDX
6
+	PHA
7
+	LDA SECTOR
8
+	PHA
9
+	LDA TRACK
10
+	PHA
11
+	LDA #IRSA
12
+	STA SA
13
+	JSR CURBLK      ;USE LAST ACCESSED SEARCH
14
+	LDA TYPE
15
+	PHA
16
+	LDA FILDRV
17
+	AND #1
18
+	STA DRVNUM
19
+	LDX JOBNUM
20
+	EOR LSTJOB,X
21
+	LSR A
22
+	BCC AF08        ;SAME DRIVE AS REQUIRED
23
+.SKIP
24
+	LDX #1
25
+	STX DELIND      ;LOOK FOR DELETED ENTRY
26
+	JSR SRCHST
27
+	BEQ AF15        ;ALL FULL, NEW SECTOR 
28
+	BNE AF20        ;FOUND ONE
29
+.SKIP
30
+AF08	LDA DELSEC
31
+	CMP #255        ;<HD>
32
+	BEQ AF10        ;DELETED ENTRY NOT LOCATED
33
+	CMP SECTOR
34
+	BNE AF08A       ;SECTOR IS NOT RES <HD>
35
+	LDA DELTRK      ;CHK ALSO TRACK <HD>
36
+	CMP TRACK       ;CHK IF RES <HD>
37
+	BEQ AF20        ;SECTOR IS RESIDENT <HD>
38
+AF08A	;<HD>
39
+	LDA DELSEC      ;<HD>
40
+	STA SECTOR      ;<HD>
41
+	LDA DELTRK      ;<HD>
42
+	STA TRACK       ;<HD>
43
+	JSR DRTRD       ;READ SECTOR IN
44
+	JMP AF20
45
+.SKIP
46
+AF10	LDA #1          ;FIND DELETED ENTRY
47
+	STA DELIND
48
+	JSR SEARCH
49
+	BNE AF20
50
+AF15	JSR NXDRBK      ;ALL FULL, NEW SECTOR
51
+	LDA SECTOR
52
+	STA DELSEC
53
+	LDA TRACK       ;<HD>
54
+	STA DELTRK      ;<HD>
55
+	LDA #2
56
+	STA DELIND
57
+AF20	LDA DELIND
58
+	JSR SETPNT
59
+	PLA
60
+	STA TYPE        ;SET TYPE
61
+	CMP #RELTYP
62
+	BNE AF25
63
+	ORA #$80
64 64
 AF25
65
- JSR PUTBYT
66
- PLA
67
- STA FILTRK ;...TABLE & ENTRY
68
- JSR PUTBYT
69
- PLA
70
- STA FILSEC ;SET SECTOR LINK IN...
71
- JSR PUTBYT ;...TABLE & ENTRY
72
- JSR GETACT
73
- TAY
74
- LDA FILTBL
75
- TAX
76
- LDA #16
77
- JSR TRNAME ;TRANSFER NAME
78
- LDY #16
79
- LDA #0 ;CLEAR # OF BLOCKS &...
80
-AF30 STA (DIRBUF),Y ;...& REPLACE LINKS
81
- INY
82
- CPY #27
83
- BCC AF30
84
- LDA TYPE ;A RELATIVE FILE ?
85
- CMP #RELTYP
86
- BNE AF50 ;NO
87
- LDY #16 ;YES
88
- LDA TRKSS ;GET SS TRACK
89
- STA (DIRBUF),Y ;PUT IN DIRECTORY
90
- INY
91
- LDA SECSS ;GET SS SECTOR
92
- STA (DIRBUF),Y ;PUT IN
93
- INY
94
- LDA REC ;GET RECORD SIZE
95
- STA (DIRBUF),Y
96
-AF50 JSR DRTWRT ;WRITE IT OUT
97
- PLA
98
- STA LINDX
99
- TAX
100
- PLA
101
- STA SA
102
- LDA DELSEC
103
- STA ENTSEC
104
- STA DSEC,X
105
- LDA DELTRK ;<HD>
106
- STA ENTTRK ;<HD>
107
- STA DTRK,X ;<HD>
108
- LDA DELIND
109
- STA ENTIND
110
- STA DIND,X
111
- LDA TYPE
112
- STA PATTYP
113
- LDA DRVNUM
114
- STA FILDRV
115
- RTS
65
+	JSR PUTBYT
66
+	PLA
67
+	STA FILTRK      ;...TABLE & ENTRY
68
+	JSR PUTBYT
69
+	PLA
70
+	STA FILSEC      ;SET SECTOR LINK IN...
71
+	JSR PUTBYT      ;...TABLE & ENTRY
72
+	JSR GETACT
73
+	TAY
74
+	LDA FILTBL
75
+	TAX
76
+	LDA #16
77
+	JSR TRNAME      ;TRANSFER NAME
78
+	LDY #16
79
+	LDA #0          ;CLEAR # OF BLOCKS &...
80
+AF30	STA (DIRBUF),Y  ;...& REPLACE LINKS
81
+	INY
82
+	CPY #27
83
+	BCC AF30
84
+	LDA TYPE        ;A RELATIVE FILE ?
85
+	CMP #RELTYP
86
+	BNE AF50        ;NO
87
+	LDY #16         ;YES
88
+	LDA TRKSS       ;GET SS TRACK
89
+	STA (DIRBUF),Y  ;PUT IN DIRECTORY
90
+	INY
91
+	LDA SECSS       ;GET SS SECTOR
92
+	STA (DIRBUF),Y  ;PUT IN
93
+	INY
94
+	LDA REC         ;GET RECORD SIZE
95
+	STA (DIRBUF),Y
96
+AF50	JSR DRTWRT      ;WRITE IT OUT
97
+	PLA
98
+	STA LINDX
99
+	TAX
100
+	PLA
101
+	STA SA
102
+	LDA DELSEC
103
+	STA ENTSEC
104
+	STA DSEC,X
105
+	LDA DELTRK      ;<HD>
106
+	STA ENTTRK      ;<HD>
107
+	STA DTRK,X      ;<HD>
108
+	LDA DELIND
109
+	STA ENTIND
110
+	STA DIND,X
111
+	LDA TYPE
112
+	STA PATTYP
113
+	LDA DRVNUM
114
+	STA FILDRV
115
+	RTS
116 116
 ;
117
- .END
117
+.END

+ 166
- 166
DOS_8070/hdaddrel View File

@@ -7,212 +7,212 @@
7 7
 ;*********************************
8 8
 ;
9 9
 ADDREL
10
- JSR ADRELS ;DO SET UP
11
- JSR FNDREL ;CALC SS PTRS
12
-ADDR1 ;ENTRANCE FROM COPY
13
- JSR NUMFRE ;CALC AVAILABLE...
14
-;
15
- LDY LINDX ;RECORD SPAN?
16
- LDX RS,Y
17
- DEX
18
- TXA
19
- CLC
20
- ADC RELPTR
21
- BCC AR10 ;NO SPAN
22
-;
23
- INC SSIND ;INC SS PTRS & CHECK
24
- INC SSIND ;INC SS PTRS & CHECK
25
- BNE AR10
26
- INC SSNUM
27
- LDA #SSIOFF
28
- STA SSIND
10
+	JSR ADRELS      ;DO SET UP
11
+	JSR FNDREL      ;CALC SS PTRS
12
+ADDR1	;ENTRANCE FROM COPY
13
+	JSR NUMFRE      ;CALC AVAILABLE...
14
+;
15
+	LDY LINDX       ;RECORD SPAN?
16
+	LDX RS,Y
17
+	DEX
18
+	TXA
19
+	CLC
20
+	ADC RELPTR
21
+	BCC AR10        ;NO SPAN
22
+;
23
+	INC SSIND       ;INC SS PTRS & CHECK
24
+	INC SSIND       ;INC SS PTRS & CHECK
25
+	BNE AR10
26
+	INC SSNUM
27
+	LDA #SSIOFF
28
+	STA SSIND
29 29
 AR10
30
- LDA R1
31
- CLC
32
- ADC #2
33
- JSR SETSSP
30
+	LDA R1
31
+	CLC
32
+	ADC #2
33
+	JSR SETSSP
34 34
 ;
35
- LDA SSNUM
36
- CMP #NSSL
37
- BCC AR25 ;VALID RANGE
35
+	LDA SSNUM
36
+	CMP #NSSL
37
+	BCC AR25        ;VALID RANGE
38 38
 ;
39 39
 ; <BIG FILES CHANGE>
40 40
 ;
41
- LDA #0 ;SET SS NUM =0
42
- STA SSNUM ;*
43
- INC GRPNUM ;BUMP THE GROUP #
44
- BNE AR25 ;BRA
41
+	LDA #0          ;SET SS NUM =0
42
+	STA SSNUM       ;*
43
+	INC GRPNUM      ;BUMP THE GROUP #
44
+	BNE AR25        ;BRA
45 45
 ;   <END>
46 46
 ;
47 47
 ;
48 48
 AR20
49
- LDA #BIGFIL
50
- JSR CMDERR ;TOO MANY SS'S
49
+	LDA #BIGFIL
50
+	JSR CMDERR      ;TOO MANY SS'S
51 51
 AR25
52
- LDA SSIND ;CALC # BLOCKS NEEDED...
53
- SEC ;...& CHECK AGAINST AVAIL.
54
- SBC R1
55
- BCS AR30
56
- SBC #SSIOFF-1
57
- CLC
52
+	LDA SSIND       ;CALC # BLOCKS NEEDED...
53
+	SEC             ;...& CHECK AGAINST AVAIL.
54
+	SBC R1
55
+	BCS AR30
56
+	SBC #SSIOFF-1
57
+	CLC
58 58
 AR30
59 59
 ;
60 60
 ;  <BIG FILE CHANGE>
61 61
 ;
62
- STA T3 ;# SS INDICES (DATA SECTORS * 2)
63
- LDA SSNUM ;GET DESIRED SSNUM
64
- SBC R0 ;SUB CURRENT LAST SS
65
- BCS AR30A ;BR IF DESIRED IS GREATER
66
- INC R3 ;BUMP CURNT GROUP #
67
- ADC #6 ;CALC # SS NEEDED
62
+	STA T3          ;# SS INDICES (DATA SECTORS * 2)
63
+	LDA SSNUM       ;GET DESIRED SSNUM
64
+	SBC R0          ;SUB CURRENT LAST SS
65
+	BCS AR30A       ;BR IF DESIRED IS GREATER
66
+	INC R3          ;BUMP CURNT GROUP #
67
+	ADC #6          ;CALC # SS NEEDED
68 68
 AR30A
69
- STA T4 ;SAVE # WHOLE SS NEEDED
70
- LDA GRPNUM ;DESIRED GROUP #
71
- SEC
72
- SBC R3 ;CALC # WHOLE GROUPS NEEDED
73
- STA R3 ;*
74
- JSR SSCALC ;CALC TOTAL SECTORS NEEDED
75
- LDA RESULT+1 ;CHK IF ENOUGH LEFT
76
- BNE AR35 ;BR IF > 256 NEEDED
77
- LDX RESULT ;CHK IF > 1 NEEDED
78
- BNE AR30B ;BR IF SOME NEEDED
79
- RTS ;EXIT (NONE NEEDED)
69
+	STA T4          ;SAVE # WHOLE SS NEEDED
70
+	LDA GRPNUM      ;DESIRED GROUP #
71
+	SEC
72
+	SBC R3          ;CALC # WHOLE GROUPS NEEDED
73
+	STA R3          ;*
74
+	JSR SSCALC      ;CALC TOTAL SECTORS NEEDED
75
+	LDA RESULT+1    ;CHK IF ENOUGH LEFT
76
+	BNE AR35        ;BR IF > 256 NEEDED
77
+	LDX RESULT      ;CHK IF > 1 NEEDED
78
+	BNE AR30B       ;BR IF SOME NEEDED
79
+	RTS             ;EXIT (NONE NEEDED)
80 80
 AR30B
81
- DEX ;*
82
- BNE AR35 ;BR IF > 1 NEEDED
83
- INC R2 ;SET SINGLE BLOCK SWITCH
81
+	DEX             ;*
82
+	BNE AR35        ;BR IF > 1 NEEDED
83
+	INC R2          ;SET SINGLE BLOCK SWITCH
84 84
 ;  <END>
85 85
 ;
86 86
 AR35
87
- CMP NBTEMP+1
88
- BCC AR40 ;OK!!
89
- BNE AR20
90
- LDA NBTEMP
91
- CMP RESULT
92
- BCC AR20 ;NOT ENUF BLOCKS
87
+	CMP NBTEMP+1
88
+	BCC AR40        ;OK!!
89
+	BNE AR20
90
+	LDA NBTEMP
91
+	CMP RESULT
92
+	BCC AR20        ;NOT ENUF BLOCKS
93 93
 AR40
94
- LDA #1
95
- JSR DRDBYT ;LOOK AT ADDR OF LAST BYTE
96
- CLC
97
- ADC #1 ;+1 IS NR
98
- LDX LINDX
99
- STA NR,X
100
- JSR GETHDR ;SET UP T&S FOR NEAR BY ALLOC
101
- JSR NXTTS ;GET NEXT BLOCK...
102
- JSR SETLNK ;...& SET LINK.
103
- LDA R2
104
- BNE AR50 ;ADD ONE BLOCK
105
-;
106
- JSR WRTOUT ;WRITE CURRENT LAST REC
94
+	LDA #1
95
+	JSR DRDBYT      ;LOOK AT ADDR OF LAST BYTE
96
+	CLC
97
+	ADC #1          ;+1 IS NR
98
+	LDX LINDX
99
+	STA NR,X
100
+	JSR GETHDR      ;SET UP T&S FOR NEAR BY ALLOC
101
+	JSR NXTTS       ;GET NEXT BLOCK...
102
+	JSR SETLNK      ;...& SET LINK.
103
+	LDA R2
104
+	BNE AR50        ;ADD ONE BLOCK
105
+;
106
+	JSR WRTOUT      ;WRITE CURRENT LAST REC
107 107
 AR45
108
- JSR DBLBUF ;SWITCH BUFS
109
- JSR SETHDR ;SET HDR FROM T & S
110
- JSR NXTTS ;GET ANOTHER
111
- JSR SETLNK ;SET UP LINK
112
- JSR NULBUF ;CLEAN IT OUT
113
- JMP AR55
108
+	JSR DBLBUF      ;SWITCH BUFS
109
+	JSR SETHDR      ;SET HDR FROM T & S
110
+	JSR NXTTS       ;GET ANOTHER
111
+	JSR SETLNK      ;SET UP LINK
112
+	JSR NULBUF      ;CLEAN IT OUT
113
+	JMP AR55
114 114
 AR50
115
- JSR DBLBUF ;SWITCH BUFS
116
- JSR SETHDR ;SET HDR FROM T & S
117
- JSR NULBUF ;CLEAN BUFFER
118
- JSR NULLNK ;LAST BLOCK =0,LSTCHR
115
+	JSR DBLBUF      ;SWITCH BUFS
116
+	JSR SETHDR      ;SET HDR FROM T & S
117
+	JSR NULBUF      ;CLEAN BUFFER
118
+	JSR NULLNK      ;LAST BLOCK =0,LSTCHR
119 119
 AR55
120
- JSR WRTOUT ;WRITE BUFFER (NEW DATA SECTOR)
121
- JSR GETLNK ;GET T&S FROM LINK
122
- LDA TRACK
123
- PHA ;SAVE 'EM
124
- LDA SECTOR
125
- PHA
126
- JSR GETHDR ;NOW GET HDR T&S
127
- LDA SECTOR
128
- PHA ;SAVE 'EM
129
- LDA TRACK
130
- PHA
131
- JSR GSSPNT ;CHECK SS PTR
132
- TAX
133
- BNE AR60
134
-;
135
- JSR NEWSS ;NEED ANOTHER SS
136
- LDA #SSIOFF
137
- JSR SETSSP ;.A=BT VAL
138
- INC R0 ;ADVANCE SS COUNT
120
+	JSR WRTOUT      ;WRITE BUFFER (NEW DATA SECTOR)
121
+	JSR GETLNK      ;GET T&S FROM LINK
122
+	LDA TRACK
123
+	PHA             ;SAVE 'EM
124
+	LDA SECTOR
125
+	PHA
126
+	JSR GETHDR      ;NOW GET HDR T&S
127
+	LDA SECTOR
128
+	PHA             ;SAVE 'EM
129
+	LDA TRACK
130
+	PHA
131
+	JSR GSSPNT      ;CHECK SS PTR
132
+	TAX
133
+	BNE AR60
134
+;
135
+	JSR NEWSS       ;NEED ANOTHER SS
136
+	LDA #SSIOFF
137
+	JSR SETSSP      ;.A=BT VAL
138
+	INC R0          ;ADVANCE SS COUNT
139 139
 AR60
140
- PLA
141
- JSR PUTSS ;RECORD T&S...
142
- PLA
143
- JSR PUTSS ;...IN SS.
144
- PLA ;GET T&S FROM LINK
145
- STA SECTOR
146
- PLA
147
- STA TRACK
148
- LDA SECTOR ;CHK END OF CHAIN <HD>
149
- CMP #255 ;<HD>
150
- BEQ AR65 ;S=255: THAT'S ALL!!<HD>
140
+	PLA
141
+	JSR PUTSS       ;RECORD T&S...
142
+	PLA
143
+	JSR PUTSS       ;...IN SS.
144
+	PLA             ;GET T&S FROM LINK
145
+	STA SECTOR
146
+	PLA
147
+	STA TRACK
148
+	LDA SECTOR      ;CHK END OF CHAIN <HD>
149
+	CMP #255        ;<HD>
150
+	BEQ AR65        ;S=255: THAT'S ALL!!<HD>
151 151
 ;
152 152
 ;
153 153
 ;  <BIG FILE CHANGE>
154 154
 ;
155
- LDA R5 ;AT RIGHT GROUP YET?
156
- CMP GRPNUM ;*
157
- BCC AR45 ;BR IF NOT
155
+	LDA R5          ;AT RIGHT GROUP YET?
156
+	CMP GRPNUM      ;*
157
+	BCC AR45        ;BR IF NOT
158 158
 ;  <END>
159 159
 ;
160
- LDA R0
161
- CMP SSNUM
162
- BNE AR45 ;NOT EVEN DONE YET
160
+	LDA R0
161
+	CMP SSNUM
162
+	BNE AR45        ;NOT EVEN DONE YET
163 163
 ;
164
- JSR GSSPNT
165
- CMP SSIND
166
- BCC AR45 ;ALMOST DONE
167
- BEQ AR50 ;ONE MORE BLOCK LEFT
164
+	JSR GSSPNT
165
+	CMP SSIND
166
+	BCC AR45        ;ALMOST DONE
167
+	BEQ AR50        ;ONE MORE BLOCK LEFT
168 168
 AR65
169
- JSR GSSPNT ;GET THE SS BUFR PTR
170
- PHA
171
- LDA #0
172
- JSR SSDIR
173
- LDY #0 ;<HD>
174
- LDA #255 ;<HD>
175
- STA (DIRBUF),Y ;FLAG LAST SS AS EOF
176
- INY
177
- PLA
178
- SEC
179
- SBC #1
180
- STA (DIRBUF),Y
181
- JSR WRTSS ;WRITE SS
182
- JSR WATJOB
183
- JSR MAPOUT
184
- JSR FNDREL
185
- JSR DBLBUF ;GET BACK TO LEADING BUFFER
186
- JSR SSPOS
187
- BVS AR70
188
- JMP POSITN
169
+	JSR GSSPNT      ;GET THE SS BUFR PTR
170
+	PHA
171
+	LDA #0
172
+	JSR SSDIR
173
+	LDY #0          ;<HD>
174
+	LDA #255        ;<HD>
175
+	STA (DIRBUF),Y  ;FLAG LAST SS AS EOF
176
+	INY
177
+	PLA
178
+	SEC
179
+	SBC #1
180
+	STA (DIRBUF),Y
181
+	JSR WRTSS       ;WRITE SS
182
+	JSR WATJOB
183
+	JSR MAPOUT
184
+	JSR FNDREL
185
+	JSR DBLBUF      ;GET BACK TO LEADING BUFFER
186
+	JSR SSPOS
187
+	BVS AR70
188
+	JMP POSITN
189 189
 AR70
190
- LDA #LRF
191
- JSR SETFLG
192
- LDA #NOREC
193
- JSR CMDERR
190
+	LDA #LRF
191
+	JSR SETFLG
192
+	LDA #NOREC
193
+	JSR CMDERR
194 194
 ;
195 195
 ; ADD BLOCKS SET UP ROUTINE
196 196
 ;
197 197
 ADRELS
198
- JSR SETDRN
199
- JSR SSEND ;SET UP END OF FILE
200
- JSR POSBUF
198
+	JSR SETDRN
199
+	JSR SSEND       ;SET UP END OF FILE
200
+	JSR POSBUF
201 201
 ;
202 202
 ; <BIG FILE CHANGE>
203 203
 ;
204
- LDA GRPNUM ;SAVE LAST GROUP #
205
- STA R5 ;*
206
- STA R3 ;*
204
+	LDA GRPNUM      ;SAVE LAST GROUP #
205
+	STA R5          ;*
206
+	STA R3          ;*
207 207
 ;   <END>
208 208
 ;
209
- LDA SSIND
210
- STA R1 ;SAVE SS INDEX
211
- LDA SSNUM
212
- STA R0 ;SAVE SS NUMBER
213
- LDA #0
214
- STA R2 ;CLEAR FLAG FOR ONE BLOCK
209
+	LDA SSIND
210
+	STA R1          ;SAVE SS INDEX
211
+	LDA SSNUM
212
+	STA R0          ;SAVE SS NUMBER
213
+	LDA #0
214
+	STA R2          ;CLEAR FLAG FOR ONE BLOCK
215 215
 ;
216
- STA RECPTR ;CLEAR FOR 1ST BYTE
217
- RTS ;EXIT
218
- .END
216
+	STA RECPTR      ;CLEAR FOR 1ST BYTE
217
+	RTS             ;EXIT
218
+.END

+ 204
- 204
DOS_8070/hdalloc View File

@@ -12,12 +12,12 @@
12 12
 ;
13 13
 INTTS
14 14
 NXTDS
15
- LDA #1
16
- LDX #0 ;BEGINNING ZONE
17
- STA NAHEAD ;EVERY OTHER SECTOR
18
- STX TRACK ;LAST ONE AT T&S 00
19
- STX SECTOR ;*
20
- BEQ HDGS1 ;JMP TO COMMON CODE
15
+	LDA #1
16
+	LDX #0          ;BEGINNING ZONE
17
+	STA NAHEAD      ;EVERY OTHER SECTOR
18
+	STX TRACK       ;LAST ONE AT T&S 00
19
+	STX SECTOR      ;*
20
+	BEQ HDGS1       ;JMP TO COMMON CODE
21 21
 ;
22 22
 ;  SECONDARY ALLOCATION
23 23
 ;  THIS ROUTINE IS CALLED TO ALLOCATE N SECTORS
@@ -27,65 +27,65 @@ NXTDS
27 27
 ;  A SECTOR FROM THIS THE NON-PRIME ZONES
28 28
 ;
29 29
 NXTTS
30
- LDX #10 ;N AHEAD = 10
31
- STX NAHEAD ;*
32
- LDX #1 ;BEGINNING ZONE NUMBER
30
+	LDX #10         ;N AHEAD = 10
31
+	STX NAHEAD      ;*
32
+	LDX #1          ;BEGINNING ZONE NUMBER
33 33
 ;
34 34
 ;  THE FOLLOWING CODE IS COMMON TO BOTH
35 35
 ;
36 36
 HDGS1
37
- STX HDTYP ;SAVE BEG ZONE = REQ TYPE
38
- STX HDCZN ;SAVE AS CURRENT ZONE ALSO
39
- LDX DRVNUM ;CHK IF VER FLAG SET
40
- LDA HDDFLG,X ;*
41
- AND #HDVIP ;*
42
- BEQ HDGS6 ;BR IF
43
- LDA #VERLK ;GIVE THE VALIDATE LOCK ERROR
44
- JSR CMDERR ;*
37
+	STX HDTYP       ;SAVE BEG ZONE = REQ TYPE
38
+	STX HDCZN       ;SAVE AS CURRENT ZONE ALSO
39
+	LDX DRVNUM      ;CHK IF VER FLAG SET
40
+	LDA HDDFLG,X    ;*
41
+	AND #HDVIP      ;*
42
+	BEQ HDGS6       ;BR IF
43
+	LDA #VERLK      ;GIVE THE VALIDATE LOCK ERROR
44
+	JSR CMDERR      ;*
45 45
 HDGS6
46 46
 ;****************************************
47 47
 ;
48 48
 ;  DO OPTIMUM ALLOCATION OF THE SECTOR
49 49
 ;
50 50
 ;****************************************
51
- LDA TRACK ;CURRENT TRACK #
52
- JSR HDGNSB ;GET # SECTORS THIS TRACK
53
- STA HDTMPA ;SAVE
54
- STA HDTMPB ;*
55
- LDA SECTOR ;CURRENT SECTOR
56
- AND #$3F ;TURN OFF HEAD BITS
57
- CLC ;ADD THE NUMBER AHEAD
58
- ADC NAHEAD ;*
59
- CMP HDTMPA ;CHK FOR WRAP
60
- BCC GS1 ;BR IF NO WRAP AROUND
61
- SEC ;CALC # WRAPPED
62
- SBC HDTMPA ;*
51
+	LDA TRACK       ;CURRENT TRACK #
52
+	JSR HDGNSB      ;GET # SECTORS THIS TRACK
53
+	STA HDTMPA      ;SAVE
54
+	STA HDTMPB      ;*
55
+	LDA SECTOR      ;CURRENT SECTOR
56
+	AND #$3F        ;TURN OFF HEAD BITS
57
+	CLC             ;ADD THE NUMBER AHEAD
58
+	ADC NAHEAD      ;*
59
+	CMP HDTMPA      ;CHK FOR WRAP
60
+	BCC GS1         ;BR IF NO WRAP AROUND
61
+	SEC             ;CALC # WRAPPED
62
+	SBC HDTMPA      ;*
63 63
 GS1
64
- STA HDTMPA ;SAVE DESIRED SECTOR #
65
- LDA SECTOR ;COPY PROPER HEAD BITS
66
- AND #$C0 ;*
67
- ORA HDTMPA ;*
68
- STA SECTOR ;*
69
- ;CALC # SECTORS TO SEARCH
70
- ;BETWEEN HERE AND END OF TRACK
71
- AND #$3F ;SECTOR # ONLY
72
- STA HDTMPA ;*
73
- SEC ;SUBTRACT FROM TOTAL ON TRK
74
- LDA HDTMPB
75
- SBC HDTMPA
76
- STA HDTMPA ;# TO END OF TRACK
77
- JSR SRCHET ;SEARCH TO END OF TRACK
78
- BEQ GS2 ;BR IF NOT FOUND
64
+	STA HDTMPA      ;SAVE DESIRED SECTOR #
65
+	LDA SECTOR      ;COPY PROPER HEAD BITS
66
+	AND #$C0        ;*
67
+	ORA HDTMPA      ;*
68
+	STA SECTOR      ;*
69
+;CALC # SECTORS TO SEARCH
70
+;BETWEEN HERE AND END OF TRACK
71
+	AND #$3F        ;SECTOR # ONLY
72
+	STA HDTMPA      ;*
73
+	SEC             ;SUBTRACT FROM TOTAL ON TRK
74
+	LDA HDTMPB
75
+	SBC HDTMPA
76
+	STA HDTMPA      ;# TO END OF TRACK
77
+	JSR SRCHET      ;SEARCH TO END OF TRACK
78
+	BEQ GS2         ;BR IF NOT FOUND
79 79
 GSGOT
80
- RTS ;EXIT (NZ=GOT ONE)
80
+	RTS             ;EXIT (NZ=GOT ONE)
81 81
 GS2
82
- LDA HDTMPB ;SEARCH WHOLE TRK
83
- STA HDTMPA ;*
84
- LDA SECTOR ;*
85
- AND #$C0 ;BEG AT SECTOR 00
86
- STA SECTOR ;*
87
- JSR SRCHET ;LOOK FOR ONE
88
- BNE GSGOT ;BR IF FOUND ONE
82
+	LDA HDTMPB      ;SEARCH WHOLE TRK
83
+	STA HDTMPA      ;*
84
+	LDA SECTOR      ;*
85
+	AND #$C0        ;BEG AT SECTOR 00
86
+	STA SECTOR      ;*
87
+	JSR SRCHET      ;LOOK FOR ONE
88
+	BNE GSGOT       ;BR IF FOUND ONE
89 89
 ;
90 90
 ;  COULD NOT FIND A SECTOR SO
91 91
 ;  GO BACK TO BEGINNING OF PROPER
@@ -96,47 +96,47 @@ GS2
96 96
 ;  IF DESIRED ZONE HAS AVAILABLE SECTORS
97 97
 ;
98 98
 HDGS2
99
- LDX HDCZN ;GET DESIRED ZONE #
100
- JSR HDCIND ;CALC INDEX VALUE
101
- LDA HDZFUL,X ;LOOK AT FULL SW.
102
- BEQ HDGS4 ;JMP IF NOT FULL
99
+	LDX HDCZN       ;GET DESIRED ZONE #
100
+	JSR HDCIND      ;CALC INDEX VALUE
101
+	LDA HDZFUL,X    ;LOOK AT FULL SW.
102
+	BEQ HDGS4       ;JMP IF NOT FULL
103 103
 HDGS3
104
- INC HDCZN ;BUMP TO NEXT ZONE
105
- LDX DRVNUM ;GET MAX ON THAT DRIVE
106
- LDA HDCZN ;CHK IF AT END OF MEDIA
107
- CMP HDNZA,X ;*
108
- BCC HDGS2 ;IF NOT GO CHK THAT ZONE
104
+	INC HDCZN       ;BUMP TO NEXT ZONE
105
+	LDX DRVNUM      ;GET MAX ON THAT DRIVE
106
+	LDA HDCZN       ;CHK IF AT END OF MEDIA
107
+	CMP HDNZA,X     ;*
108
+	BCC HDGS2       ;IF NOT GO CHK THAT ZONE
109 109
 ;
110 110
 ;  ZONES 1-N ARE FULL
111 111
 ;  TRY ZONE 0 UNLESS WE STARTED THERE
112 112
 ;
113
- DEC HDTYP ;CHK REQUEST TYPE
114
- LDA HDTYP ;SET PROPER ZONE
115
- STA HDCZN ;*
116
- BEQ HDGS2 ;GO GET FROM ZONE
113
+	DEC HDTYP       ;CHK REQUEST TYPE
114
+	LDA HDTYP       ;SET PROPER ZONE
115
+	STA HDCZN       ;*
116
+	BEQ HDGS2       ;GO GET FROM ZONE
117 117
 ;
118 118
 ;  GIVE DISK FULL ERROR
119 119
 ;
120
- LDA #DSKFUL ;ERROR MSG
121
- JMP CMDERR ;EXIT
120
+	LDA #DSKFUL     ;ERROR MSG
121
+	JMP CMDERR      ;EXIT
122 122
 ;
123 123
 ; ALLOCATE A SECTOR FROM THE ZONE
124 124
 ; THE TABLE INDEX IS IN REG X
125 125
 ;
126 126
 HDGS4
127
- JSR HDGTS ;GET A SECTOR
128
- BEQ HDGS5 ;JMP IF NONE ARE AVAIL
129
- STA SECTOR ;SAVE SECTOR #
130
- STY TRACK ;SAVE TRACK #
131
- RTS ;EXIT TO CALLER
127
+	JSR HDGTS       ;GET A SECTOR
128
+	BEQ HDGS5       ;JMP IF NONE ARE AVAIL
129
+	STA SECTOR      ;SAVE SECTOR #
130
+	STY TRACK       ;SAVE TRACK #
131
+	RTS             ;EXIT TO CALLER
132 132
 ;
133 133
 ;  ZONE IS FULLY ALLOCATED MARK IT & MOVE TO NEXT
134 134
 ;
135 135
 HDGS5
136
- LDA #1 ;NZ IS FULL
137
- STA HDZFUL,X ;*
138
- BNE HDGS3 ;JMP
139
- .PAG 'GET A SECTOR'
136
+	LDA #1          ;NZ IS FULL
137
+	STA HDZFUL,X    ;*
138
+	BNE HDGS3       ;JMP
139
+.PAG 'GET A SECTOR'
140 140
 ;  GET A SECTOR FROM THE CALC ZONE INDEX
141 141
 ;
142 142
 ;  ON EXIT:
@@ -150,18 +150,18 @@ HDGS5
150 150
 ;    HDCZN=UNCALCULATED ZONE #
151 151
 ;
152 152
 HDGTS
153
- JSR HDISU ;SET UP INDIRECT WORD
154
- JSR HDLBM ;LOAD THE DESIGNATED BAM
155
- LDY #HDBIT1 ;PT TO FIRST BIT
153
+	JSR HDISU       ;SET UP INDIRECT WORD
154
+	JSR HDLBM       ;LOAD THE DESIGNATED BAM
155
+	LDY #HDBIT1     ;PT TO FIRST BIT
156 156
 HDGTS1
157
- LDA (HDBMP),Y ;LOOK AT NEXT GROUP OF SECTS.
158
- BNE HDGTS2 ;JMP IF ANY AVAILABLE
159
- INY ;BUMP TO NEXT GROUP
160
- BNE HDGTS1 ;LOOP TILL WHOLE BAM CHKD
157
+	LDA (HDBMP),Y   ;LOOK AT NEXT GROUP OF SECTS.
158
+	BNE HDGTS2      ;JMP IF ANY AVAILABLE
159
+	INY             ;BUMP TO NEXT GROUP
160
+	BNE HDGTS1      ;LOOP TILL WHOLE BAM CHKD
161 161
 ;
162 162
 ;  NONE AVAILABLE IN THIS BAM
163 163
 ;
164
- RTS ;EXIT (Z IS SET)
164
+	RTS             ;EXIT (Z IS SET)
165 165
 ;
166 166
 ;  FOUND SOME AVAILABLE
167 167
 ;  SO CALCULATE THE TRACK & SECTOR ADDR OF ONE OF THEM
@@ -170,52 +170,52 @@ HDGTS1
170 170
 ;FIRST CALC THE BIT NUMBER
171 171
 ;
172 172
 HDGTS2
173
- LDX #0 ;BIT 0 = LEFTMOST BIT
173
+	LDX #0          ;BIT 0 = LEFTMOST BIT
174 174
 HDGTS4
175
- ASL A ;LOOK AT LEFTMOST
176
- BCS HDGTS3 ;BR IF BIT IS SET
177
- INX ;BUMP THE BIT NUMBER
178
- BNE HDGTS4 ;JMP
175
+	ASL A           ;LOOK AT LEFTMOST
176
+	BCS HDGTS3      ;BR IF BIT IS SET
177
+	INX             ;BUMP THE BIT NUMBER
178
+	BNE HDGTS4      ;JMP
179 179
 HDGTS3
180
- STX HDTMP1 ;SAVE THE BIT NUMBER
180
+	STX HDTMP1      ;SAVE THE BIT NUMBER
181 181
 ;
182 182
 ; TURN  THE BIT OFF TO INDICATE
183 183
 ; THAT THE SECTOR HAS BEEN ALLOCATED
184 184
 ;
185 185
 HDGT4
186
- LSR A ;MOVE A ZERO BACK
187
- DEX ;KEEP SHIFTING ZEROES BACK IN
188
- BPL HDGT4 ;LOOP TILL DONE
186
+	LSR A           ;MOVE A ZERO BACK
187
+	DEX             ;KEEP SHIFTING ZEROES BACK IN
188
+	BPL HDGT4       ;LOOP TILL DONE
189 189
 ;
190 190
 ;  PUT BYTE BACK INTO BAM
191 191
 ;
192
- STA (HDBMP),Y ;*
192
+	STA (HDBMP),Y   ;*
193 193
 ;
194 194
 ; CALCULATE THE BYTE NUMBER
195 195
 ;
196
- TYA ;BAM INDEX
197
- SEC ;PREP FOR SBC
198
- SBC #HDBIT1 ;INDEX TO FIRST BYTE
199
- STA HDTMP2 ;SAVE # BYTES
196
+	TYA             ;BAM INDEX
197
+	SEC             ;PREP FOR SBC
198
+	SBC #HDBIT1     ;INDEX TO FIRST BYTE
199
+	STA HDTMP2      ;SAVE # BYTES
200 200
 ;
201 201
 ; MULTIPLY NUMBER OF BYTES BY 8
202 202
 ;
203
- LDA #0 ;CLEAR HIGH BYTE
204
- STA HDTMP3 ;*
205
- ASL HDTMP2 ;SHIFT LEFT 3
206
- ROL HDTMP3 ;*
207
- ASL HDTMP2 ;*
208
- ROL HDTMP3 ;*
209
- ASL HDTMP2 ;*
210
- ROL HDTMP3 ;*
203
+	LDA #0          ;CLEAR HIGH BYTE
204
+	STA HDTMP3      ;*
205
+	ASL HDTMP2      ;SHIFT LEFT 3
206
+	ROL HDTMP3      ;*
207
+	ASL HDTMP2      ;*
208
+	ROL HDTMP3      ;*
209
+	ASL HDTMP2      ;*
210
+	ROL HDTMP3      ;*
211 211
 ;
212 212
 ; ADD IN THE NUMBER OF BITS
213 213
 ;
214
- LDA HDTMP1 ;*
215
- ADC HDTMP2 ;*
216
- STA HDTMP2
217
- BCC HDGT5 ;16 BIT ADD
218
- INC HDTMP3
214
+	LDA HDTMP1      ;*
215
+	ADC HDTMP2      ;*
216
+	STA HDTMP2
217
+	BCC HDGT5       ;16 BIT ADD
218
+	INC HDTMP3
219 219
 ;
220 220
 ;  HDTMP 2&3 ARE NOW EQ TO #BITS INTO BAM
221 221
 ;
@@ -223,22 +223,22 @@ HDGT5
223 223
 ;
224 224
 ;  GET # SECTORS PER CYLINDER
225 225
 ;
226
- LDY #HDNSEC ;NUMBER PER SURFACE
227
- LDA (HDBMP),Y ;*
228
- LDX DRVNUM ;DRIVE NUMBER
229
- PHA
230
- LDA HDNSUR,X ;GET NUMBER OF SURFACES
231
- AND #HDSURF ;LEAVE ONLY # SURFS
232
- TAY
233
- PLA
234
- DEY ;CHK FOR ONLY ONE SURFACE
235
- BEQ HDGT5A ;JMP IF ONLY ONE
236
- ASL A ;MULT # SECTORS * 2
237
- DEY ;CHK IF TWO SURFACES
238
- BEQ HDGT5A ;JMP IF TWO SURFACES
239
- ASL A ;MULTIPLIES THE # SECT * 4
226
+	LDY #HDNSEC     ;NUMBER PER SURFACE
227
+	LDA (HDBMP),Y   ;*
228
+	LDX DRVNUM      ;DRIVE NUMBER
229
+	PHA
230
+	LDA HDNSUR,X    ;GET NUMBER OF SURFACES
231
+	AND #HDSURF     ;LEAVE ONLY # SURFS
232
+	TAY
233
+	PLA
234
+	DEY             ;CHK FOR ONLY ONE SURFACE
235
+	BEQ HDGT5A      ;JMP IF ONLY ONE
236
+	ASL A           ;MULT # SECTORS * 2
237
+	DEY             ;CHK IF TWO SURFACES
238
+	BEQ HDGT5A      ;JMP IF TWO SURFACES
239
+	ASL A           ;MULTIPLIES THE # SECT * 4
240 240
 HDGT5A
241
- STA HDTMP4 ;SAVE NUMBER OF SECTS. PER CYL
241
+	STA HDTMP4      ;SAVE NUMBER OF SECTS. PER CYL
242 242
 ;
243 243
 ;  DIVIDE NUMBER OF BITS DISP INTO
244 244
 ;  BAM BY THE NUMBER OF SECTORS PER
@@ -250,128 +250,128 @@ HDGT5A
250 250
 ; 8 BITS IN HDTMP4&5
251 251
 ; RESULT GOES IN HDTMP1
252 252
 ;
253
- LDA #0 ;CLEAR HIGH RESULT
254
- STA HDTMP5 ;*
255
- STA HDTMP1 ;CLEAR RESULT
256
- LDA #2 ;SET SHIFT COUNTER INIT=2
257
- STA HDTMP ;*
253
+	LDA #0          ;CLEAR HIGH RESULT
254
+	STA HDTMP5      ;*
255
+	STA HDTMP1      ;CLEAR RESULT
256
+	LDA #2          ;SET SHIFT COUNTER INIT=2
257
+	STA HDTMP       ;*
258 258
 ;
259 259
 ;  ALIGN HIGH ORDER BITS
260 260
 ;
261 261
 HDGT6
262
- ASL HDTMP4 ;SHIFT 8 LEFT
263
- INC HDTMP ;BUMP SHIFT COUNTER
264
- BCC HDGT6 ;ASSUMES NOT DIV BY 0
265
- ROL HDTMP5 ;SHIFT THREE MORE TIMES
266
- ASL HDTMP4 ;*
267
- ROL HDTMP5 ;*
268
- ASL HDTMP4 ;*
269
- ROL HDTMP5 ;*
262
+	ASL HDTMP4      ;SHIFT 8 LEFT
263
+	INC HDTMP       ;BUMP SHIFT COUNTER
264
+	BCC HDGT6       ;ASSUMES NOT DIV BY 0
265
+	ROL HDTMP5      ;SHIFT THREE MORE TIMES
266
+	ASL HDTMP4      ;*
267
+	ROL HDTMP5      ;*
268
+	ASL HDTMP4      ;*
269
+	ROL HDTMP5      ;*
270 270
 ;
271 271
 ;  NOW SUBTRACT SHIFTED DIVISOR FROM DIVIDEND
272 272
 ;
273 273
 HDGT7
274
- SEC ;PREP FOR SBC
275
- LDA HDTMP2 ;LOW BYTE OF DIVIDEND
276
- SBC HDTMP4 ;LOW BYTE OF DIVISOR
277
- TAX ;DONT UPDATE YET
278
- LDA HDTMP3 ;HIGH BYTE DIVIDEND
279
- SBC HDTMP5 ;HIGH BYTE DIVISOR
280
- BCC HDGT8 ;BR IF RESULT WENT MINUS
281
- STA HDTMP3 ;ELSE UPDATE DIVIDEND
282
- STX HDTMP2 ;*
283
- INC HDTMP1 ;SET LOW BIT IN RESULT
284
- BNE HDGT7 ;JMP
274
+	SEC             ;PREP FOR SBC
275
+	LDA HDTMP2      ;LOW BYTE OF DIVIDEND
276
+	SBC HDTMP4      ;LOW BYTE OF DIVISOR
277
+	TAX             ;DONT UPDATE YET
278
+	LDA HDTMP3      ;HIGH BYTE DIVIDEND
279
+	SBC HDTMP5      ;HIGH BYTE DIVISOR
280
+	BCC HDGT8       ;BR IF RESULT WENT MINUS
281
+	STA HDTMP3      ;ELSE UPDATE DIVIDEND
282
+	STX HDTMP2      ;*
283
+	INC HDTMP1      ;SET LOW BIT IN RESULT
284
+	BNE HDGT7       ;JMP
285 285
 ;
286 286
 ;  SHIFT DIVISOR RIGHT
287 287
 ;
288 288
 HDGT8
289
- LSR HDTMP5 ;*
290
- ROR HDTMP4 ;*
289
+	LSR HDTMP5      ;*
290
+	ROR HDTMP4      ;*
291 291
 ;
292 292
 ;  DECR SHIFT COUNTER
293 293
 ;
294
- DEC HDTMP ;*
295
- BMI HDGT9 ;JMP IF ALL DONE
294
+	DEC HDTMP       ;*
295
+	BMI HDGT9       ;JMP IF ALL DONE
296 296
 ;
297 297
 ;  SHIFT RESULT LEFT ONE
298 298
 ;
299
- ASL HDTMP1 ;*
300
- JMP HDGT7 ;LOOP TILL DONE
299
+	ASL HDTMP1      ;*
300
+	JMP HDGT7       ;LOOP TILL DONE
301 301
 ;
302 302
 ; DIVIDE DONE NOW CALC TRACK #
303 303
 ;
304 304
 HDGT9
305
- LDY #HDCYL ;GET BEG CYL #
306
- LDA (HDBMP),Y ;*
307
- CLC ;PREP FOR ADC
308
- ADC HDTMP1 ;ADD QUOTIENT
309
- PHA ;SAVE TRACK (CYLINDER)
305
+	LDY #HDCYL      ;GET BEG CYL #
306
+	LDA (HDBMP),Y   ;*
307
+	CLC             ;PREP FOR ADC
308
+	ADC HDTMP1      ;ADD QUOTIENT
309
+	PHA             ;SAVE TRACK (CYLINDER)
310 310
 ;
311 311
 ;  REMAINDER DIVIDED BY # SECTORS PER SURFACE = HEAD #
312 312
 ;
313
- LDY #HDNSEC ;PT TO # SECTS PER SURF
314
- LDA HDTMP2 ;REMAINDER FROM DIVIDE
315
- LDX #255 ;RESULT
313
+	LDY #HDNSEC     ;PT TO # SECTS PER SURF
314
+	LDA HDTMP2      ;REMAINDER FROM DIVIDE
315
+	LDX #255        ;RESULT
316 316
 HDGT10
317
- SEC ;PREP FOR SBC
318
- SBC (HDBMP),Y ;SUB LOOP
319
- INX ;*
320
- BCS HDGT10 ;LOOP TILL DONE
317
+	SEC             ;PREP FOR SBC
318
+	SBC (HDBMP),Y   ;SUB LOOP
319
+	INX             ;*
320
+	BCS HDGT10      ;LOOP TILL DONE
321 321
 ;
322 322
 ;  X = HEAD NUMBER
323 323
 ;
324
- ADC (HDBMP),Y ;MAKE POSITIVE
325
- ORA HDXLT,X ;OR HEAD INTO SECTOR #
326
- STA HDTMP ;SAVE HEAD & SECTOR
324
+	ADC (HDBMP),Y   ;MAKE POSITIVE
325
+	ORA HDXLT,X     ;OR HEAD INTO SECTOR #
326
+	STA HDTMP       ;SAVE HEAD & SECTOR
327 327
 ;
328 328
 ; MARK BAM AS MODIFIED & CALC NEW LRC
329 329
 ;
330
- JSR HDCLRC ;*
330
+	JSR HDCLRC      ;*
331 331
 ;
332 332
 ;
333 333
 ;  NOW DECREMENT # SECTORS AVAIL
334 334
 ;
335
- JSR HDDBC ;DO IT
335
+	JSR HDDBC       ;DO IT
336 336
 ;
337 337
 ; NOW RETURN NZ,A=SECTOR,Y=CYLINDER,X=INDEX
338 338
 ;
339
- PLA ;Y=CYLINDER (TRACK)
340
- TAY ;*
341
- LDX HDCZN ;ORIG ZONE
342
- JSR HDCIND ;CALC INDEX
343
- LDA HDTMP ;A=SECTOR (&HEAD)
344
- CMP #$FF ;SET NZ
345
- RTS ;EXIT TO CALLER
339
+	PLA             ;Y=CYLINDER (TRACK)
340
+	TAY             ;*
341
+	LDX HDCZN       ;ORIG ZONE
342
+	JSR HDCIND      ;CALC INDEX
343
+	LDA HDTMP       ;A=SECTOR (&HEAD)
344
+	CMP #$FF        ;SET NZ
345
+	RTS             ;EXIT TO CALLER
346 346
 ;
347
-HDXLT .BYT 0,$40,$80,$C0 ;HEAD TRANSLATE
347
+HDXLT	.BYT 0,$40,$80,$C0 ;HEAD TRANSLATE
348 348
 ;
349 349
 ;   SEARCH FROM CURRENT T&S TO END OF TRACK
350 350
 ;
351 351
 SRCHET
352
- JSR FINDTS ;SET POINTERS TO CURNT POS.
353
- LDX SECTOR ;SAVE SECTOR
354
- STX HDTMP1 ;*
355
- STA HDTMP2 ;SAVE BIT
352
+	JSR FINDTS      ;SET POINTERS TO CURNT POS.
353
+	LDX SECTOR      ;SAVE SECTOR
354
+	STX HDTMP1      ;*
355
+	STA HDTMP2      ;SAVE BIT
356 356
 SRCHE1
357
- LDA (HDBMP),Y ;GET THE BYTE
358
- BIT HDTMP2 ;TEST IF AVAILABLE
359
- BNE SRCHE3 ;BR IF AVAIL
360
- DEC HDTMPA ;DEC # SECTORS TO CHECK
361
- BEQ SRCHE2 ;BR IF DONE WITH SCAN
362
- INC HDTMP1 ;BUMP CURNT SECTOR
363
- ROR HDTMP2 ;MOVE MASK BIT TO THE RIGHT
364
- BNE SRCHE1 ;LOOP TILL DONE/FOUND
365
- ROR HDTMP2 ;PUT BIT BACK INTO BIT 7
366
- INY ;BUMP TO NEXT BYTE
367
- BNE SRCHE1 ;JMP
357
+	LDA (HDBMP),Y   ;GET THE BYTE
358
+	BIT HDTMP2      ;TEST IF AVAILABLE
359
+	BNE SRCHE3      ;BR IF AVAIL
360
+	DEC HDTMPA      ;DEC # SECTORS TO CHECK
361
+	BEQ SRCHE2      ;BR IF DONE WITH SCAN
362
+	INC HDTMP1      ;BUMP CURNT SECTOR
363
+	ROR HDTMP2      ;MOVE MASK BIT TO THE RIGHT
364
+	BNE SRCHE1      ;LOOP TILL DONE/FOUND
365
+	ROR HDTMP2      ;PUT BIT BACK INTO BIT 7
366
+	INY             ;BUMP TO NEXT BYTE
367
+	BNE SRCHE1      ;JMP
368 368
 SRCHE2
369
- RTS ;EXIT NZ=FOUND Z=NOT FOUND
369
+	RTS             ;EXIT NZ=FOUND Z=NOT FOUND
370 370
 SRCHE3
371
- LDA HDTMP2 ;BIT MASK
372
- LDX HDTMP1
373
- STX SECTOR ;SECTOR TO USE
374
- JSR HDCBIK ;ALLOC SECTOR & GEN LRC
375
- LDA #1 ;NZ
376
- RTS
377
- .END
371
+	LDA HDTMP2      ;BIT MASK
372
+	LDX HDTMP1
373
+	STX SECTOR      ;SECTOR TO USE
374
+	JSR HDCBIK      ;ALLOC SECTOR & GEN LRC
375
+	LDA #1          ;NZ
376
+	RTS
377
+.END

+ 29
- 29
DOS_8070/hdautoit View File

@@ -4,22 +4,22 @@
4 4
 ;
5 5
 ;*************************************
6 6
 AUTOIT
7
- LDA DRVNUM ;GET DRIVE #
8
- ASL A ;TIMES TWO
9
- TAX ;*
10
- LDA DSKID,X ;CURNT DISK ID
11
- CMP REALID,X ;SAME DISKETTE ?
12
- BNE AUTOI1 ;BR IF NOT SAME
13
- LDA DSKID+1,X ;CURNT DISK ID
14
- CMP REALID+1,X ;SAME ?
15
- BNE AUTOI1 ;BR IF NOT SAME
16
- RTS ;EXIT NO INIT NEEDED
7
+	LDA DRVNUM      ;GET DRIVE #
8
+	ASL A           ;TIMES TWO
9
+	TAX             ;*
10
+	LDA DSKID,X     ;CURNT DISK ID
11
+	CMP REALID,X    ;SAME DISKETTE ?
12
+	BNE AUTOI1      ;BR IF NOT SAME
13
+	LDA DSKID+1,X   ;CURNT DISK ID
14
+	CMP REALID+1,X  ;SAME ?
15
+	BNE AUTOI1      ;BR IF NOT SAME
16
+	RTS             ;EXIT NO INIT NEEDED
17 17
 ;
18 18
 ;  DISKETTES HAVE BEEN CHANGED
19 19
 ;  DO AN AUTOMATIC INIT TO DRIVE X
20 20
 ;
21 21
 AUTOI1
22
- JMP INITDR ;THIS WILL CLOSE ANY OPEN CHNLS
22
+	JMP INITDR      ;THIS WILL CLOSE ANY OPEN CHNLS
23 23
 ;*************************************
24 24
 ;
25 25
 ;  CHECK THE STATUS OF THE DISK
@@ -30,24 +30,24 @@ AUTOI1
30 30
 ;
31 31
 ;*************************************
32 32
 TRDY
33
- LDX DRVNUM ;GET THE DRIVE #
34
- LDA DOMSK,X ;DOOR OPEN MASK
35
- AND DOOPSW ;CHK IF DOOR OPEN
36
- BEQ TRDY1 ;BR IF NOT OPEN
33
+	LDX DRVNUM      ;GET THE DRIVE #
34
+	LDA DOMSK,X     ;DOOR OPEN MASK
35
+	AND DOOPSW      ;CHK IF DOOR OPEN
36
+	BEQ TRDY1       ;BR IF NOT OPEN
37 37
 TREX
38
- ORA #$FF ;SET NON ZERO
39
- RTS ;EXIT NOT READY
38
+	ORA #$FF        ;SET NON ZERO
39
+	RTS             ;EXIT NOT READY
40 40
 TRDY1
41
- TXA ;DRIVE #
42
- ASL A ;TIMES 2
43
- TAX ;*
44
- LDA #$FF ;CHK IF VOL LBL READABLE
45
- CMP REALID,X ;*
46
- BNE TRDY2 ;BR IF READABLE
47
- CMP REALID+1,X ;CHK 2ND BYTE TOO
48
- BEQ TREX ;BR IF NOT READABLE
41
+	TXA             ;DRIVE #
42
+	ASL A           ;TIMES 2
43
+	TAX             ;*
44
+	LDA #$FF        ;CHK IF VOL LBL READABLE
45
+	CMP REALID,X    ;*
46
+	BNE TRDY2       ;BR IF READABLE
47
+	CMP REALID+1,X  ;CHK 2ND BYTE TOO
48
+	BEQ TREX        ;BR IF NOT READABLE
49 49
 TRDY2
50
- JSR AUTOIT ;INITIALIZE IT IF NECESSARY
51
- LDA #0 ;ZERO RETURN CODE
52
- RTS ;EXIT
53
- .END
50
+	JSR AUTOIT      ;INITIALIZE IT IF NECESSARY
51
+	LDA #0          ;ZERO RETURN CODE
52
+	RTS             ;EXIT
53
+.END

+ 13
- 13
DOS_8070/hdchanges View File

@@ -4,16 +4,16 @@
4 4
 ;  ASSEMBLE ALL HARD DISK CHANGES
5 5
 ;
6 6
 ;***************************************
7
- .LIB HDDUMMY
8
- .LIB HDDSECT
9
- .LIB HDEQU
10
- .LIB HDPAGE0
11
- .LIB HDRAM
12
- .LIB HDCOM
13
- .LIB HDALLOC
14
- .LIB HDFREUSED
15
- .LIB HDFORMAT
16
- .LIB HDFMTSUBS
17
- .LIB HDFMTTBLS
18
- .LIB HDSUB1
19
- .END
7
+.LIB HDDUMMY
8
+.LIB HDDSECT
9
+.LIB HDEQU
10
+.LIB HDPAGE0
11
+.LIB HDRAM
12
+.LIB HDCOM
13
+.LIB HDALLOC
14
+.LIB HDFREUSED
15
+.LIB HDFORMAT
16
+.LIB HDFMTSUBS
17
+.LIB HDFMTTBLS
18
+.LIB HDSUB1
19
+.END

+ 174
- 174
DOS_8070/hdclose View File

@@ -1,207 +1,207 @@
1 1
 ; CLOSE THE FILE ASSOCIATED WITH SA
2 2
 ;
3
-CLOSE LDA SA
4
- BNE CLS10 ; DIRECTORY CLOSE
5
- LDA #0
6
- STA DIRLST ;CLEAR DIR LIST
7
- JSR FRECHN
3
+CLOSE	LDA SA
4
+	BNE CLS10       ; DIRECTORY CLOSE
5
+	LDA #0
6
+	STA DIRLST      ;CLEAR DIR LIST
7
+	JSR FRECHN
8 8
 CLS05
9
- JMP FREICH
9