mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2025-02-21 09:29:02 +00:00
Eliminated AUXBLK from *CAT/*EX/*INFO code
This commit is contained in:
parent
79278f124d
commit
bcc74e1582
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
@ -476,16 +476,18 @@ STARCATRET >>> ENTAUX
|
||||
RTS
|
||||
|
||||
* Print one block of a catalog. Called by CATALOG
|
||||
* Block is in AUXBLK
|
||||
* Block is in BLKBUF in main memory
|
||||
PRONEBLK >>> ENTAUX
|
||||
LDA #<AUXBLK+4 ; FSPTR1=>first entry
|
||||
LDA #<BLKBUF+4 ; FSPTR1=>first entry
|
||||
STA FSPTR1+0
|
||||
LDA #>AUXBLK+4
|
||||
LDA #>BLKBUF+4
|
||||
STA FSPTR1+1
|
||||
LDA #13 ; Max 13 entries per block
|
||||
STA FSNUM
|
||||
:CATLP LDY #$00
|
||||
>>> RDMAIN
|
||||
LDA (FSPTR1),Y ; Get storage type
|
||||
>>> RDAUX
|
||||
CMP #$E0
|
||||
BCC :NOTKEY ; Not a key block
|
||||
|
||||
@ -509,16 +511,20 @@ PRONEBLK >>> ENTAUX
|
||||
DB $00
|
||||
|
||||
* Print a single directory entry
|
||||
* On entry: A = dirent index in AUXBLK
|
||||
* On entry: FSPTR1 points to dirent in BLKBUF (in main memory)
|
||||
* CC=entry, CS=header
|
||||
PRONEENT LDY #$00 ; Characters printed
|
||||
>>> RDMAIN
|
||||
LDA (FSPTR1),Y
|
||||
>>> RDAUX
|
||||
AND #$0F ; Len of filename
|
||||
BEQ NULLENT ; Inactive entry
|
||||
PHP
|
||||
TAX
|
||||
:L2 INY
|
||||
>>> RDMAIN
|
||||
LDA (FSPTR1),Y
|
||||
>>> RDAUX
|
||||
JSR OSWRCH ; Print filename
|
||||
DEX
|
||||
BNE :L2
|
||||
|
@ -47,5 +47,5 @@ RESETHW SEC
|
||||
RTS ; AUDIOCARD=1
|
||||
:NOTGS
|
||||
JSR MOCKINIT ; Initialize Mockingboard (sl4)
|
||||
RTS ; AUDIOCARD=0
|
||||
RTSINSTR RTS ; AUDIOCARD=0
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
FKEYLENS DS 16 ; Length of f-key definitions 0..15
|
||||
FKEYBUF DS 256 ; 256 bytes for f-key definitions
|
||||
|
||||
|
||||
* Copy a block of main memory
|
||||
* A1L/A1H: Start address
|
||||
* A2L/A2H: End address
|
||||
@ -27,19 +28,6 @@ MEMCPY LDA (A1L)
|
||||
INC A4H
|
||||
:S3 BRA MEMCPY
|
||||
|
||||
* Copy 512 bytes from BLKBUF to AUXBLK in aux LC
|
||||
COPYAUXBLK >>> ALTZP ; Alt ZP & Alt LC on
|
||||
LDY #$00
|
||||
STA WRCARDRAM ; Write aux mem
|
||||
:L1 LDA BLKBUF+$000,Y
|
||||
STA AUXBLK+$000,Y
|
||||
LDA BLKBUF+$100,Y
|
||||
STA AUXBLK+$100,Y
|
||||
INY
|
||||
BNE :L1
|
||||
STA WRMAINRAM ; Write main mem
|
||||
:S2 >>> MAINZP ; Alt ZP off, ROM back in
|
||||
RTSINSTR RTS
|
||||
|
||||
* Search FILEREFS for value in A
|
||||
* On return, buffer number is in X (or $FF if no bufs)
|
||||
@ -52,6 +40,7 @@ FINDBUF LDX #$00
|
||||
LDX #$FF ; $FF for not found
|
||||
:END RTS
|
||||
|
||||
|
||||
* Obtain I/O buffer address
|
||||
* On entry: buffer number in X
|
||||
* On exit: buffer address in AY
|
||||
@ -110,12 +99,14 @@ COPYFB PHA
|
||||
PLA
|
||||
RTS
|
||||
|
||||
|
||||
* Get file info
|
||||
GETINFO JSR MLI
|
||||
DB GINFOCMD
|
||||
DW GINFOPL
|
||||
RTS
|
||||
|
||||
|
||||
* Set file info
|
||||
SETINFO LDA #$07 ; SET_FILE_INFO 7 parms
|
||||
STA GINFOPL
|
||||
@ -126,6 +117,7 @@ SETINFO LDA #$07 ; SET_FILE_INFO 7 parms
|
||||
STA GINFOPL
|
||||
RTS
|
||||
|
||||
|
||||
* Create disk file
|
||||
* Uses filename in MOSFILE
|
||||
CRTFILE JSR MLI ; GET_TIME
|
||||
@ -149,6 +141,7 @@ CRTFILE JSR MLI ; GET_TIME
|
||||
DW CREATEPL
|
||||
RTS
|
||||
|
||||
|
||||
* Open disk file
|
||||
OPENMOSFILE LDA #<MOSFILE ; Open filename in MOSFILE
|
||||
STA OPENPL+1
|
||||
@ -159,36 +152,35 @@ OPENFILE JSR MLI
|
||||
DW OPENPL
|
||||
RTS
|
||||
|
||||
|
||||
* Close disk file
|
||||
CLSFILE JSR MLI
|
||||
DB CLSCMD
|
||||
DW CLSPL
|
||||
RTS
|
||||
|
||||
|
||||
* Read 512 bytes into BLKBUF
|
||||
RDFILE JSR MLI
|
||||
DB READCMD
|
||||
DW READPL
|
||||
RTS
|
||||
|
||||
|
||||
* Write data in BLKBUF to disk
|
||||
WRTFILE JSR MLI
|
||||
DB WRITECMD
|
||||
DW WRITEPL
|
||||
RTS
|
||||
|
||||
|
||||
* Put ProDOS prefix in PREFIX
|
||||
GETPREF JSR MLI
|
||||
DB GPFXCMD
|
||||
DW GPFXPL
|
||||
RTS
|
||||
|
||||
|
||||
* Map of file reference numbers to IOBUF1..4
|
||||
FILEREFS DB $00,$00,$00,$00
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1008,7 +1008,6 @@ CATREENTRY LDA OPENPL+5 ; File ref num
|
||||
STA READPL+1
|
||||
JSR RDFILE
|
||||
BCS :CATERR
|
||||
JSR COPYAUXBLK
|
||||
>>> XF2AUX,PRONEBLK
|
||||
|
||||
:CATERR CMP #$4C ; EOF
|
||||
@ -1049,8 +1048,7 @@ INFOFIRST LDA WILDIDX
|
||||
BEQ :DONEBLK ; If so, print this blk first
|
||||
JSR WILDNEXT2
|
||||
BCC INFOFIRST ; Find more entries
|
||||
:DONEBLK JSR COPYAUXBLK
|
||||
>>> XF2AUX,PRONEBLK
|
||||
:DONEBLK >>> XF2AUX,PRONEBLK
|
||||
|
||||
CATARG DB $00
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user