OpenCores
URL https://opencores.org/ocsvn/System09/System09/trunk

Subversion Repositories System09

[/] [System09/] [trunk/] [src/] [Flex9/] [f9-fms.asm] - Diff between revs 59 and 66

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 59 Rev 66
*
*
** FILE MANAGEMENT SYSTEM
** FILE MANAGEMENT SYSTEM
*
*
ZD400 JMP >ZD436
ZD400 JMP >ZD436
FMSCLS JMP >ZD459
FMSCLS JMP >ZD459
FMS JMP >FMS1
FMS JMP >FMS1
CPYMSG FCC / DISK OPERATING SYSTEM/
CPYMSG FCC / DISK OPERATING SYSTEM/
 FCC / COPYRIGHT (C) 1980 BY/
 FCC / COPYRIGHT (C) 1980 BY/
 FCC / TECHNICAL SYSTEMS CONSULTANTS/
 FCC / TECHNICAL SYSTEMS CONSULTANTS/
 ORG CPYMSG
 ORG CPYMSG
FCBPTR RMB 2
FCBPTR RMB 2
CURFCB RMB 4
CURFCB RMB 4
ZD40F RMB 2
ZD40F RMB 2
ZD411 RMB 1
ZD411 RMB 1
ZD412 RMB 1
ZD412 RMB 1
ZD413 RMB 1
ZD413 RMB 1
ZD414 RMB 1
ZD414 RMB 1
ZD415 RMB 2
ZD415 RMB 2
ZD417 RMB 1
ZD417 RMB 1
ZD418 RMB 2
ZD418 RMB 2
ZD41A RMB 1
ZD41A RMB 1
ZD41B RMB 2
ZD41B RMB 2
ZD41D RMB 24
ZD41D RMB 24
VERFLG FCB $FF
VERFLG FCB $FF
*
*
**
**
*
*
ZD436 JSR >COLDDR
ZD436 JSR >COLDDR
 LDX #FCBPTR
 LDX #FCBPTR
 LDB #$0A
 LDB #$0A
 BSR ZD451
 BSR ZD451
 LDX #Z0005
 LDX #Z0005
 STX >ZD413
 STX >ZD413
 STX >ZD415
 STX >ZD415
 CLR >ZD41A
 CLR >ZD41A
ZD44C LDX #ZD41B
ZD44C LDX #ZD41B
 LDB #$1A
 LDB #$1A
ZD451 CLR ,X+
ZD451 CLR ,X+
 DECB
 DECB
 BNE ZD451
 BNE ZD451
 JMP >PRSPL5
 JMP >PRSPL5
ZD459 JSR >PRSPL4
ZD459 JSR >PRSPL4
ZD45C LDX >FCBPTR
ZD45C LDX >FCBPTR
 BEQ ZD44C
 BEQ ZD44C
 LEAX -$1C,X
 LEAX -$1C,X
 STX >CURFCB
 STX >CURFCB
 PSHS Y
 PSHS Y
 JSR >CLOSE
 JSR >CLOSE
 PULS Y
 PULS Y
 BCC ZD45C
 BCC ZD45C
 LDX >CURFCB
 LDX >CURFCB
 CLR $02,X
 CLR $02,X
 JSR >PRSPL5
 JSR >PRSPL5
 LDB #$FF
 LDB #$FF
 RTS
 RTS
*
*
** FMS CALL, PROCESSING
** FMS CALL, PROCESSING
*
*
FMS1 TST >ZCCFC
FMS1 TST >ZCCFC
 BEQ ZD483
 BEQ ZD483
 JSR >PRSPL4
 JSR >PRSPL4
ZD483 PSHS Y,B
ZD483 PSHS Y,B
 STX >CURFCB
 STX >CURFCB
 CLR $01,X
 CLR $01,X
 LDB ,X
 LDB ,X
 BNE DOFUNC
 BNE DOFUNC
*
*
** READ/WRITE CHAR/BYTE
** READ/WRITE CHAR/BYTE
*
*
 LDB $02,X
 LDB $02,X
 BEQ ZD4AC
 BEQ ZD4AC
 CMPB #$02
 CMPB #$02
 BEQ ZD4A7
 BEQ ZD4A7
 JSR >ZD5B4
 JSR >ZD5B4
ZD499 LDX >CURFCB
ZD499 LDX >CURFCB
 BCS ZD4C4
 BCS ZD4C4
 TST >ZCCFC
 TST >ZCCFC
 BNE ZD4C6
 BNE ZD4C6
 CLRB
 CLRB
 PULS Y,B
 PULS Y,B
 RTS
 RTS
ZD4A7 JSR >ZD6CF
ZD4A7 JSR >ZD6CF
 BRA ZD499
 BRA ZD499
ZD4AC LDB #$12
ZD4AC LDB #$12
 BRA ZD4C4
 BRA ZD4C4
DOFUNC CMPB #$16
DOFUNC CMPB #$16
 BLS DOFUN1
 BLS DOFUN1
 LDB #$01
 LDB #$01
 BRA ZD4C4
 BRA ZD4C4
DOFUN1 DECB
DOFUN1 DECB
 ASLB
 ASLB
 LDX #FMSTBL
 LDX #FMSTBL
 JSR [B,X]
 JSR [B,X]
 LDX >CURFCB
 LDX >CURFCB
 BCC ZD4C6
 BCC ZD4C6
ZD4C4 STB $01,X
ZD4C4 STB $01,X
ZD4C6 JSR >PRSPL5
ZD4C6 JSR >PRSPL5
 TST $01,X
 TST $01,X
 PULS Y,B
 PULS Y,B
 RTS
 RTS
*
*
** FMS COMMAND VECTOR TABLE
** FMS COMMAND VECTOR TABLE
*
*
FMSTBL FDB OPENRD FC 1
FMSTBL FDB OPENRD FC 1
 FDB OPENWR FC 2
 FDB OPENWR FC 2
 FDB OPENUD FC 3
 FDB OPENUD FC 3
 FDB CLOSE FC 4
 FDB CLOSE FC 4
 FDB REWIND FC 5
 FDB REWIND FC 5
 FDB OPNDIR FC 6
 FDB OPNDIR FC 6
 FDB GETREC FC 7
 FDB GETREC FC 7
 FDB PUTREC FC 8
 FDB PUTREC FC 8
 FDB RDSECT FC 9
 FDB RDSECT FC 9
 FDB WRSECT FC 10
 FDB WRSECT FC 10
 FDB RESV1 FC 11
 FDB RESV1 FC 11
 FDB DELETE FC 12
 FDB DELETE FC 12
 FDB RENAME FC 13
 FDB RENAME FC 13
 FDB RESV2 FC 14
 FDB RESV2 FC 14
 FDB NXTSEC FC 15
 FDB NXTSEC FC 15
 FDB OPNREC FC 16
 FDB OPNREC FC 16
 FDB GETBYT FC 17
 FDB GETBYT FC 17
 FDB PUTBYT FC 18
 FDB PUTBYT FC 18
 FDB RESV3 FC 19
 FDB RESV3 FC 19
 FDB NXTDRV FC 20
 FDB NXTDRV FC 20
 FDB POSREC FC 21
 FDB POSREC FC 21
 FDB BAKREC FC 22
 FDB BAKREC FC 22
*
*
**
**
*
*
ZD4FA BSR ZD51C
ZD4FA BSR ZD51C
 BNE ZD503
 BNE ZD503
 LDB #$02
 LDB #$02
 ORCC #$01
 ORCC #$01
 RTS
 RTS
ZD503 STD ,X
ZD503 STD ,X
 LDX ,X
 LDX ,X
 CLR ,X
 CLR ,X
 CLR $01,X
 CLR $01,X
 RTS
 RTS
ZD50C BSR ZD51C
ZD50C BSR ZD51C
 BEQ ZD515
 BEQ ZD515
 LDB #$0D
 LDB #$0D
 ORCC #$01
 ORCC #$01
 RTS
 RTS
ZD515 LDD [,X]
ZD515 LDD [,X]
 STD ,X
 STD ,X
 ANDCC #$FE
 ANDCC #$FE
 RTS
 RTS
ZD51C LDD >CURFCB
ZD51C LDD >CURFCB
 ADDD #$001C
 ADDD #$001C
 LDX #FCBPTR
 LDX #FCBPTR
ZD525 LDY ,X
ZD525 LDY ,X
 BNE ZD52D
 BNE ZD52D
 ANDCC #$FB
 ANDCC #$FB
 RTS
 RTS
ZD52D CMPD ,X
ZD52D CMPD ,X
 BNE ZD533
 BNE ZD533
 RTS
 RTS
ZD533 LDX ,X
ZD533 LDX ,X
 BRA ZD525
 BRA ZD525
ZD537 LDX >CURFCB
ZD537 LDX >CURFCB
 CLRA
 CLRA
 CLRB
 CLRB
 BSR ZD540
 BSR ZD540
 LDB #$2F
 LDB #$2F
ZD540 STA $11,X
ZD540 STA $11,X
 LEAX $01,X
 LEAX $01,X
 DECB
 DECB
 BNE ZD540
 BNE ZD540
 RTS
 RTS
ZD549 LDX >CURFCB
ZD549 LDX >CURFCB
 LDB #$0B
 LDB #$0B
ZD54E LDA $04,X
ZD54E LDA $04,X
 STA $24,X
 STA $24,X
 LEAX $01,X
 LEAX $01,X
 DECB
 DECB
 BNE ZD54E
 BNE ZD54E
 RTS
 RTS
ZD559 LDX >CURFCB
ZD559 LDX >CURFCB
 LDB #$0B
 LDB #$0B
ZD55E LDA $04,X
ZD55E LDA $04,X
 PSHS A
 PSHS A
 LDA $24,X
 LDA $24,X
 CMPA ,S+
 CMPA ,S+
 BNE ZD56E
 BNE ZD56E
 LEAX $01,X
 LEAX $01,X
 DECB
 DECB
 BNE ZD55E
 BNE ZD55E
ZD56E RTS
ZD56E RTS
*
*
** GET RANDOM BYTE FROM SECTOR
** GET RANDOM BYTE FROM SECTOR
*
*
GETBYT LDX >CURFCB
GETBYT LDX >CURFCB
 LDB $02,X
 LDB $02,X
 LSRB
 LSRB
 BCC ZD5F0
 BCC ZD5F0
 LDB $23,X
 LDB $23,X
 JMP >ZD600
 JMP >ZD600
ZD57D LDX >CURFCB
ZD57D LDX >CURFCB
 LDB $22,X
 LDB $22,X
 INC $22,X
 INC $22,X
 ABX
 ABX
 STA $40,X
 STA $40,X
 INCB
 INCB
 BNE ZD5AC
 BNE ZD5AC
 ORCC #$01
 ORCC #$01
 RTS
 RTS
*
*
** PUT RANDOM BYTE IN SECTOR
** PUT RANDOM BYTE IN SECTOR
*
*
PUTBYT LDX >CURFCB
PUTBYT LDX >CURFCB
 LDB $02,X
 LDB $02,X
 ANDB #$03
 ANDB #$03
 CMPB #$03
 CMPB #$03
 BNE ZD5F0
 BNE ZD5F0
 ORB #$80
 ORB #$80
 STB $02,X
 STB $02,X
 LDB $0F,X
 LDB $0F,X
 BITB #$80
 BITB #$80
 BNE ZD5AF
 BNE ZD5AF
 LDB $23,X
 LDB $23,X
 ABX
 ABX
 STA $40,X
 STA $40,X
ZD5AC ANDCC #$FE
ZD5AC ANDCC #$FE
 RTS
 RTS
ZD5AF LDB #$0B
ZD5AF LDB #$0B
 ORCC #$01
 ORCC #$01
 RTS
 RTS
ZD5B4 LDA $3B,X
ZD5B4 LDA $3B,X
 BMI ZD5F5
 BMI ZD5F5
 BEQ ZD5C2
 BEQ ZD5C2
 DEC $3B,X
 DEC $3B,X
 LDA #$20
 LDA #$20
 BRA ZD5DF
 BRA ZD5DF
ZD5C2 BSR ZD5F5
ZD5C2 BSR ZD5F5
 BCS ZD5E1
 BCS ZD5E1
 CMPA #$18
 CMPA #$18
 BHI ZD5DF
 BHI ZD5DF
 BEQ ZD5C2
 BEQ ZD5C2
 CMPA #$09
 CMPA #$09
 BNE ZD5DC
 BNE ZD5DC
 BSR ZD5F5
 BSR ZD5F5
 BCS ZD5E1
 BCS ZD5E1
 LDX >CURFCB
 LDX >CURFCB
 STA $3B,X
 STA $3B,X
 BRA ZD5B4
 BRA ZD5B4
ZD5DC TSTA
ZD5DC TSTA
 BEQ ZD5C2
 BEQ ZD5C2
ZD5DF ANDCC #$FE
ZD5DF ANDCC #$FE
ZD5E1 RTS
ZD5E1 RTS
*
*
** REWIND FILE
** REWIND FILE
*
*
REWIND JSR >ZDAB1
REWIND JSR >ZDAB1
 BCS ZD5F0
 BCS ZD5F0
 BITA #$01
 BITA #$01
 BEQ ZD5F0
 BEQ ZD5F0
 STA ,X
 STA ,X
 JMP >ZD9A0
 JMP >ZD9A0
ZD5F0 LDB #$12
ZD5F0 LDB #$12
 ORCC #$01
 ORCC #$01
 RTS
 RTS
ZD5F5 LDX >CURFCB
ZD5F5 LDX >CURFCB
 LDB $22,X
 LDB $22,X
 BEQ ZD607
 BEQ ZD607
 INC $22,X
 INC $22,X
ZD600 ABX
ZD600 ABX
 LDA $40,X
 LDA $40,X
 ANDCC #$FE
 ANDCC #$FE
 RTS
 RTS
ZD607 BSR ZD60C
ZD607 BSR ZD60C
 BCC ZD5F5
 BCC ZD5F5
 RTS
 RTS
ZD60C LDX >CURFCB
ZD60C LDX >CURFCB
 LDD $40,X
 LDD $40,X
 INC $21,X
 INC $21,X
 BNE ZD61A
 BNE ZD61A
 INC $20,X
 INC $20,X
ZD61A CMPD #$0000
ZD61A CMPD #$0000
 BEQ ZD63C
 BEQ ZD63C
ZD620 STD $1E,X
ZD620 STD $1E,X
 PSHS A
 PSHS A
 LDA #$04
 LDA #$04
 STA $22,X
 STA $22,X
 PULS A
 PULS A
 BSR RDSECT
 BSR RDSECT
 BCC ZD640
 BCC ZD640
 BITB #$80
 BITB #$80
 BEQ ZD638
 BEQ ZD638
 LDB #$10
 LDB #$10
 BRA ZD63E
 BRA ZD63E
ZD638 LDB #$09
ZD638 LDB #$09
 BRA ZD63E
 BRA ZD63E
ZD63C LDB #$08
ZD63C LDB #$08
ZD63E ORCC #$01
ZD63E ORCC #$01
ZD640 RTS
ZD640 RTS
*
*
** READ SINGLE SECTOR
** READ SINGLE SECTOR
*
*
RDSECT BSR ZD668
RDSECT BSR ZD668
 LDX >CURFCB
 LDX >CURFCB
 JSR >DRIVE
 JSR >DRIVE
 BCS ZD65D
 BCS ZD65D
ZD64B BSR ZD65E
ZD64B BSR ZD65E
 JSR >READ
 JSR >READ
 BNE ZD655
 BNE ZD655
 ANDCC #$FE
 ANDCC #$FE
 RTS
 RTS
ZD655 PSHS B
ZD655 PSHS B
 BSR ZD670
 BSR ZD670
 PULS B
 PULS B
 BCC ZD64B
 BCC ZD64B
ZD65D RTS
ZD65D RTS
ZD65E LDX >CURFCB
ZD65E LDX >CURFCB
 LDD $1E,X
 LDD $1E,X
 LEAX $40,X
 LEAX $40,X
 RTS
 RTS
ZD668 CLRA
ZD668 CLRA
 STA >ZD411
 STA >ZD411
 STA >ZD412
 STA >ZD412
 RTS
 RTS
ZD670 BITB #$10
ZD670 BITB #$10
 BNE ZD685
 BNE ZD685
 BITB #$80
 BITB #$80
 BNE ZD69C
 BNE ZD69C
 LDB >ZD411
 LDB >ZD411
 INCB
 INCB
 CMPB #$07
 CMPB #$07
 BEQ ZD685
 BEQ ZD685
 STB >ZD411
 STB >ZD411
 BRA RESV2
 BRA RESV2
ZD685 CLR >ZD411
ZD685 CLR >ZD411
 LDB >ZD412
 LDB >ZD412
 INCB
 INCB
 CMPB #$04
 CMPB #$04
 BEQ ZD69C
 BEQ ZD69C
 STB >ZD412
 STB >ZD412
 LDX >CURFCB
 LDX >CURFCB
 JSR >RESTOR
 JSR >RESTOR
*
*
** RESERVED
** RESERVED
*
*
RESV2 ANDCC #$FE
RESV2 ANDCC #$FE
 RTS
 RTS
ZD69C ORCC #$01
ZD69C ORCC #$01
 RTS
 RTS
*
*
** WRITE SINGLE SECTOR
** WRITE SINGLE SECTOR
*
*
WRSECT BSR ZD668
WRSECT BSR ZD668
 LDX >CURFCB
 LDX >CURFCB
 JSR >DRIVE
 JSR >DRIVE
 BCS ZD6C9
 BCS ZD6C9
ZD6A9 LDX >CURFCB
ZD6A9 LDX >CURFCB
 BSR ZD65E
 BSR ZD65E
 JSR >WRITE
 JSR >WRITE
 BNE ZD6BD
 BNE ZD6BD
 LDA >VERFLG
 LDA >VERFLG
 BEQ ZD6EF
 BEQ ZD6EF
 JSR >VERIFY
 JSR >VERIFY
 BEQ ZD6EF
 BEQ ZD6EF
ZD6BD BITB #$40
ZD6BD BITB #$40
 BNE ZD6CC
 BNE ZD6CC
 PSHS B
 PSHS B
 BSR ZD670
 BSR ZD670
 PULS B
 PULS B
 BCC ZD6A9
 BCC ZD6A9
ZD6C9 RTS
ZD6C9 RTS
 LDB #$20
 LDB #$20
ZD6CC ORCC #$01
ZD6CC ORCC #$01
 RTS
 RTS
ZD6CF LDX >CURFCB
ZD6CF LDX >CURFCB
 LDB $3B,X
 LDB $3B,X
 BMI ZD714
 BMI ZD714
 CMPA #$20
 CMPA #$20
 BNE ZD6EA
 BNE ZD6EA
 INCB
 INCB
 STB $3B,X
 STB $3B,X
 CMPB #$7F
 CMPB #$7F
 BNE ZD6EF
 BNE ZD6EF
 BRA ZD6F2
 BRA ZD6F2
ZD6E5 BSR ZD6F2
ZD6E5 BSR ZD6F2
 BCC ZD6CF
 BCC ZD6CF
 RTS
 RTS
ZD6EA TSTB
ZD6EA TSTB
 BEQ ZD714
 BEQ ZD714
 BRA ZD6E5
 BRA ZD6E5
ZD6EF ANDCC #$FE
ZD6EF ANDCC #$FE
 RTS
 RTS
ZD6F2 PSHS A
ZD6F2 PSHS A
 CMPB #$01
 CMPB #$01
 BNE ZD6FC
 BNE ZD6FC
 LDA #$20
 LDA #$20
 BRA ZD70C
 BRA ZD70C
ZD6FC LDA #$09
ZD6FC LDA #$09
 BSR ZD714
 BSR ZD714
 PULS A
 PULS A
 BCS ZD713
 BCS ZD713
 PSHS A
 PSHS A
 LDX >CURFCB
 LDX >CURFCB
 LDA $3B,X
 LDA $3B,X
ZD70C CLR $3B,X
ZD70C CLR $3B,X
 BSR ZD714
 BSR ZD714
 PULS A
 PULS A
ZD713 RTS
ZD713 RTS
ZD714 LDX >CURFCB
ZD714 LDX >CURFCB
 LDB $02,X
 LDB $02,X
 CMPB #$02
 CMPB #$02
 LBNE ZD5F0
 LBNE ZD5F0
 LDB $22,X
 LDB $22,X
 CMPB #$04
 CMPB #$04
 BNE ZD72E
 BNE ZD72E
 PSHS A
 PSHS A
 BSR ZD74B
 BSR ZD74B
 PULS A
 PULS A
 BCS ZD73D
 BCS ZD73D
ZD72E JSR >ZD57D
ZD72E JSR >ZD57D
 BCC ZD73D
 BCC ZD73D
 LDB #$04
 LDB #$04
 LDX >CURFCB
 LDX >CURFCB
 STB $22,X
 STB $22,X
 ANDCC #$FE
 ANDCC #$FE
ZD73D RTS
ZD73D RTS
ZD73E LDX >CURFCB
ZD73E LDX >CURFCB
 CLRA
 CLRA
 CLRB
 CLRB
 STD $20,X
 STD $20,X
 STD $42,X
 STD $42,X
 BRA ZD772
 BRA ZD772
ZD74B LDB $12,X
ZD74B LDB $12,X
 BNE ZD772
 BNE ZD772
 LDB $17,X
 LDB $17,X
 BEQ ZD799
 BEQ ZD799
 CLR $17,X
 CLR $17,X
 BSR ZD799
 BSR ZD799
 BCS ZD786
 BCS ZD786
 BSR ZD73E
 BSR ZD73E
 BCS ZD786
 BCS ZD786
 BSR ZD73E
 BSR ZD73E
 BCS ZD786
 BCS ZD786
 LDX >CURFCB
 LDX >CURFCB
 LDB #$02
 LDB #$02
 STB $17,X
 STB $17,X
 LDD $11,X
 LDD $11,X
 JMP >ZDC82
 JMP >ZDC82
ZD772 BSR ZD782
ZD772 BSR ZD782
 LDX >CURFCB
 LDX >CURFCB
 STD $40,X
 STD $40,X
 JSR >WRSECT
 JSR >WRSECT
 BCC ZD799
 BCC ZD799
 JMP >ZDBC1
 JMP >ZDBC1
ZD782 BSR ZD787
ZD782 BSR ZD787
 LDD ,X
 LDD ,X
ZD786 RTS
ZD786 RTS
ZD787 LDX >CURFCB
ZD787 LDX >CURFCB
 LDB $03,X
 LDB $03,X
 LDA #$06
 LDA #$06
 MUL
 MUL
 LDX #ZD41D
 LDX #ZD41D
 ABX
 ABX
 STX >ZD41B
 STX >ZD41B
 TST ,X
 TST ,X
 RTS
 RTS
ZD799 BSR ZD782
ZD799 BSR ZD782
 BNE ZD7A2
 BNE ZD7A2
 LDB #$07
 LDB #$07
ZD79F ORCC #$01
ZD79F ORCC #$01
 RTS
 RTS
ZD7A2 LDX >CURFCB
ZD7A2 LDX >CURFCB
 STD $13,X
 STD $13,X
 TST $12,X
 TST $12,X
 BNE ZD7B0
 BNE ZD7B0
 STD $11,X
 STD $11,X
ZD7B0 INC $16,X
ZD7B0 INC $16,X
 BNE ZD7B8
 BNE ZD7B8
 INC $15,X
 INC $15,X
ZD7B8 TST $17,X
ZD7B8 TST $17,X
 BEQ ZD7C8
 BEQ ZD7C8
 JSR >ZDC43
 JSR >ZDC43
 BCS ZD79F
 BCS ZD79F
 LDX >CURFCB
 LDX >CURFCB
 LDD $13,X
 LDD $13,X
ZD7C8 JSR >ZD620
ZD7C8 JSR >ZD620
 BCS ZD79F
 BCS ZD79F
 LDX >CURFCB
 LDX >CURFCB
 LDD $40,X
 LDD $40,X
 PSHS B,A
 PSHS B,A
 BSR ZD787
 BSR ZD787
 PULS B,A
 PULS B,A
 STD ,X
 STD ,X
 BNE ZD7E7
 BNE ZD7E7
 CLR $02,X
 CLR $02,X
 CLR $03,X
 CLR $03,X
 CLR $04,X
 CLR $04,X
 CLR $05,X
 CLR $05,X
 BRA ZD7EF
 BRA ZD7EF
ZD7E7 LDY $04,X
ZD7E7 LDY $04,X
 LEAY -$01,Y
 LEAY -$01,Y
 STY $04,X
 STY $04,X
ZD7EF CLRA
ZD7EF CLRA
 LDX >CURFCB
 LDX >CURFCB
 INC $21,X
 INC $21,X
 BNE ZD7FB
 BNE ZD7FB
 INC $20,X
 INC $20,X
ZD7FB CLRB
ZD7FB CLRB
ZD7FC STA $40,X
ZD7FC STA $40,X
 LEAX $01,X
 LEAX $01,X
 DECB
 DECB
 BNE ZD7FC
 BNE ZD7FC
 LDX >CURFCB
 LDX >CURFCB
 LDD $20,X
 LDD $20,X
 STD $42,X
 STD $42,X
 ANDCC #$FE
 ANDCC #$FE
 RTS
 RTS
*
*
** OPEN SYSTEM INFO. RECORD
** OPEN SYSTEM INFO. RECORD
*
*
OPNREC CLRB
OPNREC CLRB
 PSHS B
 PSHS B
 LDB #$03
 LDB #$03
 BRA ZD825
 BRA ZD825
 LDX >ZD415
 LDX >ZD415
 STX >ZD413
 STX >ZD413
OPNDIR LDB >ZD413
OPNDIR LDB >ZD413
 PSHS B
 PSHS B
 LDB >ZD414
 LDB >ZD414
ZD825 LDX >CURFCB
ZD825 LDX >CURFCB
 STB $41,X
 STB $41,X
 PULS B
 PULS B
 STB $40,X
 STB $40,X
 CLR >ZD418
 CLR >ZD418
 CLRB
 CLRB
 STB $22,X
 STB $22,X
 RTS
 RTS
*
*
** GET INFO RECORD
** GET INFO RECORD
*
*
GETREC LDX >CURFCB
GETREC LDX >CURFCB
 LDB $22,X
 LDB $22,X
 BNE ZD85D
 BNE ZD85D
 JSR >ZD60C
 JSR >ZD60C
 BCS ZD875
 BCS ZD875
 LDX >CURFCB
 LDX >CURFCB
 TST >ZD418
 TST >ZD418
 BNE ZD852
 BNE ZD852
 LDD 
 LDD 
 STD >ZD418
 STD >ZD418
ZD852 LDA #$10
ZD852 LDA #$10
 STA $22,X
 STA $22,X
 LDD $1E,X
 LDD $1E,X
 STD $2F,X
 STD $2F,X
ZD85D LDA $22,X
ZD85D LDA $22,X
 STA $31,X
 STA $31,X
 LDB #$18
 LDB #$18
ZD865 PSHS X,B
ZD865 PSHS X,B
 JSR >ZD5F5
 JSR >ZD5F5
 PULS X,B
 PULS X,B
 STA $04,X
 STA $04,X
 LEAX $01,X
 LEAX $01,X
 DECB
 DECB
 BNE ZD865
 BNE ZD865
 ANDCC #$FE
 ANDCC #$FE
ZD875 RTS
ZD875 RTS
*
*
** PUT INFORMATION RECORD
** PUT INFORMATION RECORD
*
*
PUTREC LDX >CURFCB
PUTREC LDX >CURFCB
 LDA $31,X
 LDA $31,X
 STA $22,X
 STA $22,X
 LDB #$18
 LDB #$18
ZD881 PSHS X,B
ZD881 PSHS X,B
 LDA $04,X
 LDA $04,X
 JSR >ZD714
 JSR >ZD714
 PULS X,B
 PULS X,B
 LEAX $01,X
 LEAX $01,X
 DECB
 DECB
 BNE ZD881
 BNE ZD881
 JMP >WRSECT
 JMP >WRSECT
ZD892 LDX >CURFCB
ZD892 LDX >CURFCB
 LDA $03,X
 LDA $03,X
 STA $23,X
 STA $23,X
 LDA >ZD417
 LDA >ZD417
 TST >ZD41A
 TST >ZD41A
 BNE ZD8D3
 BNE ZD8D3
 STA $03,X
 STA $03,X
 LDX >ZD415
 LDX >ZD415
 STX >ZD413
 STX >ZD413
ZD8AA CMPX #Z0005
ZD8AA CMPX #Z0005
 BEQ ZD8BB
 BEQ ZD8BB
 BSR ZD8D3
 BSR ZD8D3
 BLS ZD8EA
 BLS ZD8EA
 LDX >ZD418
 LDX >ZD418
 STX >ZD413
 STX >ZD413
 BRA ZD8AA
 BRA ZD8AA
ZD8BB LDX >CURFCB
ZD8BB LDX >CURFCB
 LDA $23,X
 LDA $23,X
 STA $03,X
 STA $03,X
 BPL ZD8D3
 BPL ZD8D3
ZD8C5 JSR >NXTDRV
ZD8C5 JSR >NXTDRV
 BCS ZD900
 BCS ZD900
 BSR ZD8D3
 BSR ZD8D3
 BLS ZD8EA
 BLS ZD8EA
 JSR >ZDDAD
 JSR >ZDDAD
 BRA ZD8C5
 BRA ZD8C5
ZD8D3 LDX >CURFCB
ZD8D3 LDX >CURFCB
 CLR >ZD41A
 CLR >ZD41A
 JSR >ZD549
 JSR >ZD549
 JSR >OPNDIR
 JSR >OPNDIR
ZD8DF JSR >GETREC
ZD8DF JSR >GETREC
 BCC ZD8EB
 BCC ZD8EB
 CMPB #$08
 CMPB #$08
 BEQ ZD900
 BEQ ZD900
 ORCC #$01
 ORCC #$01
ZD8EA RTS
ZD8EA RTS
ZD8EB LDX >CURFCB
ZD8EB LDX >CURFCB
 LDA $04,X
 LDA $04,X
 BEQ ZD8FE
 BEQ ZD8FE
 BPL ZD8F6
 BPL ZD8F6
 BSR ZD905
 BSR ZD905
ZD8F6 JSR >ZD559
ZD8F6 JSR >ZD559
 BNE ZD8DF
 BNE ZD8DF
 ANDCC #$FE
 ANDCC #$FE
 RTS
 RTS
ZD8FE BSR ZD905
ZD8FE BSR ZD905
ZD900 ANDCC #$FB
ZD900 ANDCC #$FB
 ANDCC #$FE
 ANDCC #$FE
 RTS
 RTS
ZD905 LDA $33,X
ZD905 LDA $33,X
 BNE ZD916
 BNE ZD916
 LDD $2F,X
 LDD $2F,X
 STD $32,X
 STD $32,X
 LDA $31,X
 LDA $31,X
 STA $34,X
 STA $34,X
ZD916 RTS
ZD916 RTS
ZD917 JSR >ZD787
ZD917 JSR >ZD787
 BNE ZD933
 BNE ZD933
 BSR ZD936
 BSR ZD936
 BCS ZD935
 BCS ZD935
 LDB #$06
 LDB #$06
 LDY >CURFCB
 LDY >CURFCB
 LDX >ZD41B
 LDX >ZD41B
ZD929 LDA $5D,Y
ZD929 LDA $5D,Y
 LEAY $01,Y
 LEAY $01,Y
 STA ,X+
 STA ,X+
 DECB
 DECB
 BNE ZD929
 BNE ZD929
ZD933 ANDCC #$FE
ZD933 ANDCC #$FE
ZD935 RTS
ZD935 RTS
ZD936 JSR >OPNREC
ZD936 JSR >OPNREC
 JSR >ZD60C
 JSR >ZD60C
 BCS ZD946
 BCS ZD946
 LDX >CURFCB
 LDX >CURFCB
 LDB #$10
 LDB #$10
 STB $22,X
 STB $22,X
ZD946 RTS
ZD946 RTS
ZD947 JSR >ZD787
ZD947 JSR >ZD787
 BSR ZD936
 BSR ZD936
 BCS ZD946
 BCS ZD946
 LDB #$06
 LDB #$06
 LDY >CURFCB
 LDY >CURFCB
 LDX >ZD41B
 LDX >ZD41B
ZD957 LDA ,X+
ZD957 LDA ,X+
 STA $5D,Y
 STA $5D,Y
 LEAY $01,Y
 LEAY $01,Y
 DECB
 DECB
 BNE ZD957
 BNE ZD957
 JSR >WRSECT
 JSR >WRSECT
 BCC ZD946
 BCC ZD946
 JMP >ZDBC1
 JMP >ZDBC1
*
*
**
**
*
*
RESV1 LDX >CURFCB
RESV1 LDX >CURFCB
 LDA #$02
 LDA #$02
 STA $02,X
 STA $02,X
 LDD $2F,X
 LDD $2F,X
 STD $1E,X
 STD $1E,X
 JSR >RDSECT
 JSR >RDSECT
 BCS ZD983
 BCS ZD983
 JSR >PUTREC
 JSR >PUTREC
 BCC ZD985
 BCC ZD985
 JMP >ZDBC1
 JMP >ZDBC1
ZD983 LDB #$0A
ZD983 LDB #$0A
ZD985 RTS
ZD985 RTS
*
*
** OPEN FOR READ
** OPEN FOR READ
*
*
OPENRD JSR >ZD4FA
OPENRD JSR >ZD4FA
 BCS ZD9C8
 BCS ZD9C8
 JSR >ZD892
 JSR >ZD892
 BCS ZD9C8
 BCS ZD9C8
 BNE ZD9CD
 BNE ZD9CD
 LDX >CURFCB
 LDX >CURFCB
 TST >ZD41A
 TST >ZD41A
 BEQ ZD9A0
 BEQ ZD9A0
 LDA $0F,X
 LDA $0F,X
 BITA #$20
 BITA #$20
 BNE ZD9C9
 BNE ZD9C9
ZD9A0 JSR >ZDCC0
ZD9A0 JSR >ZDCC0
 BCS ZD9CF
 BCS ZD9CF
 LDD $11,X
 LDD $11,X
 STD $40,X
 STD $40,X
 JSR >ZDA76
 JSR >ZDA76
 LDB $17,X
 LDB $17,X
 BEQ ZD9C6
 BEQ ZD9C6
ZD9B3 PSHS B
ZD9B3 PSHS B
 JSR >ZD60C
 JSR >ZD60C
 PULS B
 PULS B
 BCS ZD9C8
 BCS ZD9C8
 DECB
 DECB
 BNE ZD9B3
 BNE ZD9B3
 LDX >CURFCB
 LDX >CURFCB
 CLRB
 CLRB
 STB $22,X
 STB $22,X
ZD9C6 ANDCC #$FE
ZD9C6 ANDCC #$FE
ZD9C8 RTS
ZD9C8 RTS
ZD9C9 LDB #$11
ZD9C9 LDB #$11
 BRA ZD9CF
 BRA ZD9CF
ZD9CD LDB #$04
ZD9CD LDB #$04
ZD9CF PSHS B
ZD9CF PSHS B
 JSR >ZD50C
 JSR >ZD50C
 PULS B
 PULS B
 ORCC #$01
 ORCC #$01
 RTS
 RTS
OPENWR LDX >CURFCB
OPENWR LDX >CURFCB
 TST $03,X
 TST $03,X
 BPL ZD9E8
 BPL ZD9E8
 JSR >NXTDRV
 JSR >NXTDRV
 BCC ZD9E8
 BCC ZD9E8
 LDB #$10
 LDB #$10
 RTS
 RTS
ZD9E8 JSR >ZD4FA
ZD9E8 JSR >ZD4FA
 BCS ZD9CF
 BCS ZD9CF
 JSR >ZD537
 JSR >ZD537
 JSR >ZD917
 JSR >ZD917
 BCS ZD9CF
 BCS ZD9CF
 JSR >ZD892
 JSR >ZD892
 BCS ZD9CF
 BCS ZD9CF
 BNE ZDA00
 BNE ZDA00
 LDB #$03
 LDB #$03
 BRA ZD9CF
 BRA ZD9CF
ZDA00 JSR >ZDCC0
ZDA00 JSR >ZDCC0
 BCS ZD9CF
 BCS ZD9CF
 LDX >CURFCB
 LDX >CURFCB
 LDB #$0A
 LDB #$0A
ZDA0A CLR $0F,X
ZDA0A CLR $0F,X
 LEAX $01,X
 LEAX $01,X
 DECB
 DECB
 BNE ZDA0A
 BNE ZDA0A
 LDX >CURFCB
 LDX >CURFCB
 LDD $32,X
 LDD $32,X
 BEQ ZDA40
 BEQ ZDA40
 STD $2F,X
 STD $2F,X
 LDA $34,X
 LDA $34,X
 STA $31,X
 STA $31,X
 LDD >DATERG
 LDD >DATERG
 STD $19,X
 STD $19,X
 LDA >YEAR
 LDA >YEAR
 STA $1B,X
 STA $1B,X
 JSR >ZDDAD
 JSR >ZDDAD
 JSR >RESV1
 JSR >RESV1
 BCS ZD9CF
 BCS ZD9CF
 BSR ZDA76
 BSR ZDA76
 LDA #$04
 LDA #$04
 STA $22,X
 STA $22,X
 ANDCC #$FE
 ANDCC #$FE
 RTS
 RTS
ZDA40 LDX >CURFCB
ZDA40 LDX >CURFCB
 CLR $17,X
 CLR $17,X
 INC $12,X
 INC $12,X
 LDD $2F,X
 LDD $2F,X
 JSR >ZD620
 JSR >ZD620
 BCS ZDA5E
 BCS ZDA5E
 JSR >ZD772
 JSR >ZD772
 BCS ZDA5E
 BCS ZDA5E
 JSR >WRSECT
 JSR >WRSECT
 BCC ZDA61
 BCC ZDA61
 JSR >ZDBC1
 JSR >ZDBC1
ZDA5E JMP >ZD9CF
ZDA5E JMP >ZD9CF
ZDA61 LDX >CURFCB
ZDA61 LDX >CURFCB
 LDD $1E,X
 LDD $1E,X
 STD $32,X
 STD $32,X
 LDA #$10
 LDA #$10
 STA $34,X
 STA $34,X
 JSR >ZD947
 JSR >ZD947
 BCS ZDA5E
 BCS ZDA5E
 BRA ZDA00
 BRA ZDA00
ZDA76 LDX >CURFCB
ZDA76 LDX >CURFCB
 LDA ,X
 LDA ,X
 STA $02,X
 STA $02,X
 CLR ,X
 CLR ,X
 CLR $3B,X
 CLR $3B,X
 CLRA
 CLRA
 STA $22,X
 STA $22,X
 RTS
 RTS
*
*
** READ/WRITE NEXT SECTOR
** READ/WRITE NEXT SECTOR
*
*
NXTSEC BSR ZDAB1
NXTSEC BSR ZDAB1
 BCS ZDA99
 BCS ZDA99
 CLR ,X
 CLR ,X
 LSRA
 LSRA
 LBCS ZD60C
 LBCS ZD60C
 LDB #$04
 LDB #$04
 STB $22,X
 STB $22,X
 ANDCC #$FE
 ANDCC #$FE
ZDA99 RTS
ZDA99 RTS
ZDA9A LDX >CURFCB
ZDA9A LDX >CURFCB
 LDA $02,X
 LDA $02,X
 CMPA #$83
 CMPA #$83
 BNE ZDAAE
 BNE ZDAAE
 LDA #$03
 LDA #$03
 STA $02,X
 STA $02,X
ZDAA7 JSR >WRSECT
ZDAA7 JSR >WRSECT
 LBCS ZDBC1
 LBCS ZDBC1
ZDAAE ANDCC #$FE
ZDAAE ANDCC #$FE
 RTS
 RTS
ZDAB1 BSR ZDA9A
ZDAB1 BSR ZDA9A
 BCS ZDAC2
 BCS ZDAC2
 LDX >CURFCB
 LDX >CURFCB
 LDA $02,X
 LDA $02,X
 CMPA #$03
 CMPA #$03
 BLS ZDAAE
 BLS ZDAAE
 LDB #$12
 LDB #$12
 ORCC #$01
 ORCC #$01
ZDAC2 RTS
ZDAC2 RTS
CLOSE BSR ZDAB1
CLOSE BSR ZDAB1
 BCS ZDAF8
 BCS ZDAF8
 CMPA #$02
 CMPA #$02
 BEQ ZDAD3
 BEQ ZDAD3
ZDACB LDX >CURFCB
ZDACB LDX >CURFCB
 CLR $02,X
 CLR $02,X
 JMP >ZD50C
 JMP >ZD50C
ZDAD3 LDA $12,X
ZDAD3 LDA $12,X
 BNE ZDADD
 BNE ZDADD
 JSR >ZDBA7
 JSR >ZDBA7
 BRA ZDAF6
 BRA ZDAF6
ZDADD BSR ZDAA7
ZDADD BSR ZDAA7
 BCS ZDAF8
 BCS ZDAF8
 LDX >CURFCB
 LDX >CURFCB
 TST $17,X
 TST $17,X
 BEQ ZDAEE
 BEQ ZDAEE
 JSR >ZDC98
 JSR >ZDC98
 BCS ZDAF8
 BCS ZDAF8
ZDAEE JSR >RESV1
ZDAEE JSR >RESV1
 BCS ZDAF8
 BCS ZDAF8
 JSR >ZD947
 JSR >ZD947
ZDAF6 BCC ZDACB
ZDAF6 BCC ZDACB
ZDAF8 RTS
ZDAF8 RTS
*
*
** OPEN FOR UPDATE
** OPEN FOR UPDATE
*
*
OPENUD JSR >OPENRD
OPENUD JSR >OPENRD
 BCS ZDB26
 BCS ZDB26
 JSR >ZD60C
 JSR >ZD60C
 BCS ZDB26
 BCS ZDB26
 LDA #$03
 LDA #$03
 BRA ZDB1F
 BRA ZDB1F
*
*
**
**
*
*
RESV3 JSR >OPENRD
RESV3 JSR >OPENRD
 BCS ZDB26
 BCS ZDB26
 LDX >CURFCB
 LDX >CURFCB
 LDA $0F,X
 LDA $0F,X
 BITA #$80
 BITA #$80
 BNE ZDB27
 BNE ZDB27
 LDD $13,X
 LDD $13,X
 JSR >ZD620
 JSR >ZD620
 BCS ZDB26
 BCS ZDB26
 LDA #$02
 LDA #$02
ZDB1F LDX >CURFCB
ZDB1F LDX >CURFCB
 STA $02,X
 STA $02,X
 ANDCC #$FE
 ANDCC #$FE
ZDB26 RTS
ZDB26 RTS
ZDB27 LDB #$0B
ZDB27 LDB #$0B
 ORCC #$01
 ORCC #$01
 RTS
 RTS
*
*
** RENAME FILE
** RENAME FILE
*
*
RENAME BSR ZDB63
RENAME BSR ZDB63
 JSR >ZD892
 JSR >ZD892
 BCS ZDB5D
 BCS ZDB5D
 BEQ ZDB59
 BEQ ZDB59
 LDX >CURFCB
 LDX >CURFCB
 LDB #$0B
 LDB #$0B
ZDB3A LDA $24,X
ZDB3A LDA $24,X
 STA $04,X
 STA $04,X
 LEAX $01,X
 LEAX $01,X
 DECB
 DECB
 BNE ZDB3A
 BNE ZDB3A
 BSR ZDB93
 BSR ZDB93
 BCS ZDB5D
 BCS ZDB5D
 LDX >CURFCB
 LDX >CURFCB
 LDA $0F,X
 LDA $0F,X
 BITA #$80
 BITA #$80
 BNE ZDB27
 BNE ZDB27
 BITA #$60
 BITA #$60
 BNE ZDB5E
 BNE ZDB5E
 BSR ZDB63
 BSR ZDB63
 BRA ZDBAE
 BRA ZDBAE
ZDB59 LDB #$03
ZDB59 LDB #$03
 ORCC #$01
 ORCC #$01
ZDB5D RTS
ZDB5D RTS
ZDB5E LDB #$0C
ZDB5E LDB #$0C
 ORCC #$01
 ORCC #$01
 RTS
 RTS
ZDB63 LDX >CURFCB
ZDB63 LDX >CURFCB
 LDA #$0B
 LDA #$0B
 STA >ZD411
 STA >ZD411
ZDB6B LDA $04,X
ZDB6B LDA $04,X
 LDB $35,X
 LDB $35,X
 STA $35,X
 STA $35,X
 STB $04,X
 STB $04,X
 LEAX $01,X
 LEAX $01,X
 DEC >ZD411
 DEC >ZD411
 BNE ZDB6B
 BNE ZDB6B
 LDX >CURFCB
 LDX >CURFCB
 LDA $0C,X
 LDA $0C,X
 BNE ZDB8F
 BNE ZDB8F
 LDB #$03
 LDB #$03
ZDB85 LDA $3D,X
ZDB85 LDA $3D,X
 STA $0C,X
 STA $0C,X
 LEAX $01,X
 LEAX $01,X
 DECB
 DECB
 BNE ZDB85
 BNE ZDB85
ZDB8F LDX >CURFCB
ZDB8F LDX >CURFCB
 RTS
 RTS
ZDB93 BSR ZDB63
ZDB93 BSR ZDB63
ZDB95 JSR >ZD892
ZDB95 JSR >ZD892
 BCS ZDBA1
 BCS ZDBA1
 BNE ZDBA2
 BNE ZDBA2
 LDX >CURFCB
 LDX >CURFCB
 ANDCC #$FE
 ANDCC #$FE
ZDBA1 RTS
ZDBA1 RTS
ZDBA2 LDB #$04
ZDBA2 LDB #$04
 ORCC #$01
 ORCC #$01
 RTS
 RTS
ZDBA7 LDX >CURFCB
ZDBA7 LDX >CURFCB
 LDA #$FF
 LDA #$FF
 STA $04,X
 STA $04,X
ZDBAE JSR >RESV1
ZDBAE JSR >RESV1
 LDX >CURFCB
 LDX >CURFCB
 LDA #$00
 LDA #$00
 STA $02,X
 STA $02,X
 RTS
 RTS
ZDBB9 STD $40,X
ZDBB9 STD $40,X
 JSR >WRSECT
 JSR >WRSECT
 BCC ZDBD5
 BCC ZDBD5
ZDBC1 BITB #$40
ZDBC1 BITB #$40
 BNE ZDBCD
 BNE ZDBCD
 BITB #$80
 BITB #$80
 BEQ ZDBD3
 BEQ ZDBD3
 LDB #$10
 LDB #$10
 BRA ZDBD3
 BRA ZDBD3
ZDBCD LDB #$0B
ZDBCD LDB #$0B
 BRA ZDBD3
 BRA ZDBD3
 LDB #$0A
 LDB #$0A
ZDBD3 ORCC #$01
ZDBD3 ORCC #$01
ZDBD5 RTS
ZDBD5 RTS
*
*
** DELETE FILE
** DELETE FILE
*
*
DELETE JSR >ZD917
DELETE JSR >ZD917
 BCS ZDC39
 BCS ZDC39
 BSR ZDB95
 BSR ZDB95
 BCS ZDC39
 BCS ZDC39
 LDX >CURFCB
 LDX >CURFCB
 LDA $0F,X
 LDA $0F,X
 BITA #$80
 BITA #$80
 BNE ZDC3A
 BNE ZDC3A
 BITA #$60
 BITA #$60
 BNE ZDC3E
 BNE ZDC3E
 JSR >ZD787
 JSR >ZD787
 LDX >ZD41B
 LDX >ZD41B
 LDD $02,X
 LDD $02,X
 BNE ZDC05
 BNE ZDC05
 LDX >CURFCB
 LDX >CURFCB
 LDD $11,X
 LDD $11,X
 BEQ ZDC31
 BEQ ZDC31
 LDX >ZD41B
 LDX >ZD41B
 STD ,X
 STD ,X
 BRA ZDC19
 BRA ZDC19
ZDC05 LDX >CURFCB
ZDC05 LDX >CURFCB
 JSR >ZD620
 JSR >ZD620
 BCS ZDC39
 BCS ZDC39
 LDX >CURFCB
 LDX >CURFCB
 LDD $11,X
 LDD $11,X
 BEQ ZDC31
 BEQ ZDC31
 BSR ZDBB9
 BSR ZDBB9
 BCS ZDC39
 BCS ZDC39
ZDC19 LDX >CURFCB
ZDC19 LDX >CURFCB
 LDD $13,X
 LDD $13,X
 LDX >ZD41B
 LDX >ZD41B
 STD $02,X
 STD $02,X
 LDX >CURFCB
 LDX >CURFCB
 LDD $15,X
 LDD $15,X
 LDX >ZD41B
 LDX >ZD41B
 ADDD $04,X
 ADDD $04,X
 STD $04,X
 STD $04,X
ZDC31 JSR >ZDBA7
ZDC31 JSR >ZDBA7
 BCS ZDC39
 BCS ZDC39
 JSR >ZD947
 JSR >ZD947
ZDC39 RTS
ZDC39 RTS
ZDC3A LDB #$0B
ZDC3A LDB #$0B
 BRA ZDC40
 BRA ZDC40
ZDC3E LDB #$0C
ZDC3E LDB #$0C
ZDC40 ORCC #$01
ZDC40 ORCC #$01
 RTS
 RTS
ZDC43 LDD $1E,X
ZDC43 LDD $1E,X
 INCB
 INCB
 CMPB $3C,X
 CMPB $3C,X
 BLS ZDC4F
 BLS ZDC4F
 LDB #$01
 LDB #$01
 INCA
 INCA
ZDC4F CMPD $13,X
ZDC4F CMPD $13,X
 BNE ZDC63
 BNE ZDC63
 LDA $37,X
 LDA $37,X
 CMPA #$FF
 CMPA #$FF
 BEQ ZDC63
 BEQ ZDC63
 INCA
 INCA
 STA $37,X
 STA $37,X
 ANDCC #$FE
 ANDCC #$FE
 RTS
 RTS
ZDC63 BSR ZDC98
ZDC63 BSR ZDC98
 BCS ZDC97
 BCS ZDC97
 LDX >CURFCB
 LDX >CURFCB
 LDA $3A,X
 LDA $3A,X
 ADDA #$03
 ADDA #$03
 BNE ZDC87
 BNE ZDC87
 LDD $1E,X
 LDD $1E,X
 CMPD $11,X
 CMPD $11,X
 BEQ ZDC7F
 BEQ ZDC7F
 LDB #$17
 LDB #$17
 ORCC #$01
 ORCC #$01
 RTS
 RTS
ZDC7F LDD $40,X
ZDC7F LDD $40,X
ZDC82 STD $38,X
ZDC82 STD $38,X
 LDA #$04
 LDA #$04
ZDC87 STA $3A,X
ZDC87 STA $3A,X
 LDD $13,X
 LDD $13,X
 STD $35,X
 STD $35,X
 LDA #$01
 LDA #$01
 STA $37,X
 STA $37,X
 ANDCC #$FE
 ANDCC #$FE
ZDC97 RTS
ZDC97 RTS
ZDC98 LDD $38,X
ZDC98 LDD $38,X
 JSR >ZD620
 JSR >ZD620
 BCS ZDC97
 BCS ZDC97
 LDX >CURFCB
 LDX >CURFCB
 TFR X,Y
 TFR X,Y
 LDB $3A,X
 LDB $3A,X
 ABX
 ABX
 LDB #$03
 LDB #$03
ZDCAB LDA $35,Y
ZDCAB LDA $35,Y
 LEAY $01,Y
 LEAY $01,Y
 STA $40,X
 STA $40,X
 LEAX $01,X
 LEAX $01,X
 DECB
 DECB
 BNE ZDCAB
 BNE ZDCAB
 JSR >WRSECT
 JSR >WRSECT
 BCC ZDC97
 BCC ZDC97
 JMP >ZDBC1
 JMP >ZDBC1
ZDCC0 JSR >OPNREC
ZDCC0 JSR >OPNREC
 JSR >ZD60C
 JSR >ZD60C
 BCS ZDD0E
 BCS ZDD0E
 LDX >CURFCB
 LDX >CURFCB
 CLRA
 CLRA
 CLRB
 CLRB
 STD $20,X
 STD $20,X
 LDA $67,X
 LDA $67,X
 STA $3C,X
 STA $3C,X
 CLRB
 CLRB
ZDCD7 CLR $40,X
ZDCD7 CLR $40,X
 LEAX $01,X
 LEAX $01,X
 DECB
 DECB
 BNE ZDCD7
 BNE ZDCD7
 LDX >CURFCB
 LDX >CURFCB
 ANDCC #$FE
 ANDCC #$FE
 RTS
 RTS
*
*
** BACKUP ONE RECORD
** BACKUP ONE RECORD
*
*
BAKREC LDX >CURFCB
BAKREC LDX >CURFCB
 LDA $17,X
 LDA $17,X
 BEQ ZDD0A
 BEQ ZDD0A
 LDD $20,X
 LDD $20,X
 SUBD #$0001
 SUBD #$0001
 BPL ZDCF8
 BPL ZDCF8
 JMP >ZDD9A
 JMP >ZDD9A
*
*
** POSITION TO RECORD N
** POSITION TO RECORD N
*
*
ZDCF8 STD $20,X
ZDCF8 STD $20,X
POSREC JSR >ZDAB1
POSREC JSR >ZDAB1
 BCS ZDD0E
 BCS ZDD0E
 RORA
 RORA
 BCC ZDD0A
 BCC ZDD0A
 CLR ,X
 CLR ,X
 LDA $17,X
 LDA $17,X
 BNE ZDD0F
 BNE ZDD0F
ZDD0A LDB #$12
ZDD0A LDB #$12
 ORCC #$01
 ORCC #$01
ZDD0E RTS
ZDD0E RTS
ZDD0F CLR >ZD411
ZDD0F CLR >ZD411
 LDD $11,X
 LDD $11,X
 LDY $20,X
 LDY $20,X
 BEQ ZDD85
 BEQ ZDD85
 JSR >ZDD9F
 JSR >ZDD9F
 BCS ZDD0E
 BCS ZDD0E
 CLRA
 CLRA
 CLRB
 CLRB
ZDD22 TST $02,X
ZDD22 TST $02,X
 BEQ ZDD9A
 BEQ ZDD9A
 ADDB $02,X
 ADDB $02,X
 ADCA #$00
 ADCA #$00
 STX >ZD40F
 STX >ZD40F
 LDX >CURFCB
 LDX >CURFCB
 CMPD $20,X
 CMPD $20,X
 BCC ZDD62
 BCC ZDD62
 LDX >ZD40F
 LDX >ZD40F
 LEAX $03,X
 LEAX $03,X
 PSHS A
 PSHS A
 LDA >ZD411
 LDA >ZD411
 INCA
 INCA
 STA >ZD411
 STA >ZD411
 CMPA #$54
 CMPA #$54
 BEQ ZDD50
 BEQ ZDD50
 CMPA #$A8
 CMPA #$A8
 PULS A
 PULS A
 BEQ ZDD9A
 BEQ ZDD9A
 BRA ZDD22
 BRA ZDD22
ZDD50 PSHS B
ZDD50 PSHS B
 LDX >CURFCB
 LDX >CURFCB
 LDD $40,X
 LDD $40,X
 BSR ZDD9F
 BSR ZDD9F
 BCS ZDD9A
 BCS ZDD9A
 PULS B
 PULS B
 PULS A
 PULS A
 BRA ZDD22
 BRA ZDD22
ZDD62 SUBD $20,X
ZDD62 SUBD $20,X
 LDX >ZD40F
 LDX >ZD40F
 LDA $02,X
 LDA $02,X
 PSHS B
 PSHS B
 SUBA ,S+
 SUBA ,S+
 DECA
 DECA
 TFR A,B
 TFR A,B
 LDA ,X
 LDA ,X
 ADDB $01,X
 ADDB $01,X
 LDX >CURFCB
 LDX >CURFCB
 BCS ZDD7F
 BCS ZDD7F
ZDD7A CMPB $3C,X
ZDD7A CMPB $3C,X
 BLS ZDD85
 BLS ZDD85
ZDD7F SUBB $3C,X
ZDD7F SUBB $3C,X
 INCA
 INCA
 BRA ZDD7A
 BRA ZDD7A
ZDD85 JSR >ZD620
ZDD85 JSR >ZD620
 BCS ZDD9E
 BCS ZDD9E
 LDX >CURFCB
 LDX >CURFCB
 LDD $42,X
 LDD $42,X
 CMPD $20,X
 CMPD $20,X
 BEQ ZDDAA
 BEQ ZDDAA
 LDB #$19
 LDB #$19
 BRA ZDD9C
 BRA ZDD9C
ZDD9A LDB #$18
ZDD9A LDB #$18
ZDD9C ORCC #$01
ZDD9C ORCC #$01
ZDD9E RTS
ZDD9E RTS
ZDD9F JSR >ZD620
ZDD9F JSR >ZD620
 BCS ZDDAC
 BCS ZDDAC
 LDX >CURFCB
 LDX >CURFCB
 LDB #$44
 LDB #$44
 ABX
 ABX
ZDDAA ANDCC #$FE
ZDDAA ANDCC #$FE
ZDDAC RTS
ZDDAC RTS
ZDDAD LDX >CURFCB
ZDDAD LDX >CURFCB
 LDB #$0B
 LDB #$0B
ZDDB2 LDA $24,X
ZDDB2 LDA $24,X
 STA $04,X
 STA $04,X
 LEAX $01,X
 LEAX $01,X
 DECB
 DECB
 BNE ZDDB2
 BNE ZDDB2
 RTS
 RTS
*
*
** FIND NEXT DRIVE
** FIND NEXT DRIVE
*
*
NXTDRV LDX >CURFCB
NXTDRV LDX >CURFCB
 LDA $03,X
 LDA $03,X
 INCA
 INCA
 CMPA #$04
 CMPA #$04
 BCC ZDDD6
 BCC ZDDD6
 STA $03,X
 STA $03,X
 BNE ZDDD0
 BNE ZDDD0
 JSR >DRVRDY
 JSR >DRVRDY
 BRA ZDDD3
 BRA ZDDD3
ZDDD0 JSR >QUICK
ZDDD0 JSR >QUICK
ZDDD3 BCS NXTDRV
ZDDD3 BCS NXTDRV
 RTS
 RTS
ZDDD6 LDB #$10
ZDDD6 LDB #$10
 ORCC #$01
 ORCC #$01
 RTS
 RTS
 END
 END
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.