Eliminate AUXBLK. Fix #221.

This commit is contained in:
Bobbi Webber-Manners 2022-12-22 19:02:33 -05:00
parent bcc74e1582
commit 3d84e270bc
4 changed files with 15 additions and 17 deletions

Binary file not shown.

View File

@ -758,20 +758,24 @@ FREERET >>> ENTAUX
* Disk size is two-byte 512-byte block count
* Maximum disk size is $FFFF blocks = 1FFFF00 bytes = 33554176 bytes = 32M-512
:NOERR SEC
LDA AUXBLK+2 ; LSB of total blocks
SBC AUXBLK+0 ; LSB of blocks used
>>> RDMAIN
LDA BLKBUF+2 ; LSB of total blocks
SBC BLKBUF+0 ; LSB of blocks used
TAX ; X=b0-b7 of blocks free
LDA AUXBLK+3 ; MSB of total blocks
SBC AUXBLK+1 ; MSB of blocks used
LDA BLKBUF+3 ; MSB of total blocks
SBC BLKBUF+1 ; MSB of blocks used
TAY ; Y=b8-b15 of blocks free
>>> RDAUX
LDA #$00 ; A=b16-b23 of blocks free
JSR :FREEDEC ; Print 'AAYYXX blocks aaayyyxxx bytes '
LDX #<:FREE
LDY #>:FREE
JSR OUTSTR ; Print 'free'<nl>
LDX AUXBLK+0 ; X=b0-b7 of blocks used
LDY AUXBLK+1 ; Y=b8-b15 of blocks used
>>> RDMAIN
LDX BLKBUF+0 ; X=b0-b7 of blocks used
LDY BLKBUF+1 ; Y=b8-b15 of blocks used
>>> RDAUX
LDA #$00 ; A=b16-b23 of blocks used
JSR :FREEDEC ; Print 'AAYYXX blocks aaayyyxxx bytes '
LDX #<:USED

View File

@ -535,8 +535,5 @@ MOSEND
DW IRQBRKHDLR ; FFFE IRQVEC
MOSVEND
* Buffer for one 512 byte disk block in aux mem
AUXBLK
; ASC '**ENDOFCODE**'
; DS $200-13
* ASC '**ENDOFCODE**'

View File

@ -1114,17 +1114,14 @@ DRVINFO >>> ENTMAIN
LDA GINFOPL+7
CMP #$0F
BNE :EXIT1 ; Not a drive, exit with 'Bad drive'
>>> ALTZP ; Alt ZP & Alt LC on
LDA GINFOPL+8 ; Blocks used LSB
STA AUXBLK+0
STA BLKBUF+0
LDA GINFOPL+9 ; Blocks used MSB
STA AUXBLK+1
STA BLKBUF+1
LDA GINFOPL+5 ; Total blocks LSB
STA AUXBLK+2
STA BLKBUF+2
LDA GINFOPL+6 ; Total blocks MSB
STA AUXBLK+3
>>> MAINZP ; ALt ZP off, ROM back in
STA BLKBUF+3
LDA #$00 ; $00=Ok
:EXIT CMP #$46