home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Check for special tags in FCB. NZ if tagged
- ; a,f,h,l
- qtags: lda fcb+10; .SYS file tag
- lxi h,fcb+1; F1 tag
- ora m
- inx h
- ora m; F2 tag
- ani 80h
- ret; z flag if not tagged
- ;
- ; Loads the batch file names into the storage buffer
- ; a,f,b,c,d,e,h,l
- tnmbuf: xra a
- sta filcnt; Reset file count
- call scan
- lxi h,nambuf
- shld nbsave; Save adr of 1st name in NBSAVE
- tnlp1: call trtobuf; Move a filename into FCBBUF
- lxi h,fcb
- lxi d,fcbbuf
- call cmdln; Parse name to CP/M format
- tnlp2: call mfnam; Search for names (wildcard format)
- jc nextnm
- mvi a,filsiz
- call fileop
- lhld random; Get number of records in this file
- mov a,h
- ora l
- jz tnlp2; eliminate empty files
- push h; Save temporarily
- call qwheel
- jnz tnlp3; wheel, no restrictions
- call qtags; If not wheel, check for tags
- jnz tnlp4; If tagged, do not send
- call qtyp
- jc tnlp4; restricted type, do not send
- ; " "
- tnlp3: lhld nbsave; Get the filename
- lxi d,fcb; Move it to FCB
- xchg
- call move12
- xchg
- shld nbsave; Address of next name
- lxi h,filcnt; Count files found
- inr m
- ; " "
- ; Add up the total records for all files to be sent
- pop h; Get number of records in this file
- push h; Save for later
- xchg
- lhld totrec; Get record count up to this file
- dad d; Add this file to previous total
- shld totrec; New total record count
- pop h; Get the length of this file
- push h
- lxi d,15; Bring up to closest 2k size
- dad d
- inx d; Divide result by 16
- call dvhlde
- lhld blokk; Current number of 2k blocks needed
- dad b
- shld blokk
- tnlp4: pop h; clear off current filesize
- jmp tnlp2
- ;
- ;
- nextnm: lxi h,namect; Count names found
- dcr m
- jnz tnlp1
- lxi h,nambuf; Save start of buffer
- shld nbsave
- ret
- ;
- ; -------------------------------------------------------------------
- ;
- ; Places next name in buffer so 'CMDLINE' may parse it
- ;
- trtobuf:
- lhld bgnms
- mvi b,0
- lxi d,fcbbuf+2
- tblp: mov a,m
- cpi ' '
- jz trbfend
- stax d
- inx h
- inx d
- inr b; Count chars in name
- jmp tblp
- ;
- trbfend:
- inx h
- mov a,m; Eat extra spaces
- cpi ' '
- jz trbfend
- shld bgnms
- lxi h,fcbbuf+1; Put # chars before name
- mov m,b
- ret
- ⁿ