! > FInfo/s v1.03 12-Aug-1998  Source for *FInfo  By Jonathan Harston (& (C)1990: v1.00 Initial version 2. 22-Nov-92: v1.01 Full year range printed <( 10-Mar-97: v1.02 Allows Osfile &FD F& 12-Aug-98: v1.03 yr99+ corrected P7OSFILE=&FFDD:OSARGS=&FFDA:OSWRCH=&FFEE:OSNEWL=&FFE7 Z( mcode% &200:load%=&FFFF0900:zp=&A8 d P=0 1 nP%=load%:O%=mcode% x[OPT P*3+4 .ctrl:.syntax 5BRK:EQUB 220:EQUS "Syntax: FInfo (-|=)":BRK .start% $LDA #1:LDY #0:LDX #zp:JSR OSARGS !LDA (zp),Y:CMP #13:BEQ syntax +CMP #"=":BEQ info0:CMP #"-":BNE info1 .info0 'INC zp:BNE info2:INC zp+1:BNE info2 .info1 LDX #15:LDA #0:.loop0 STA ctrl+2,X:DEX:BPL loop0 .info2 PHA:LDA #5:JSR DoOsfile:PHA 'LDA ctrl:STA zp:LDA ctrl+1:STA zp+1  LDY #0  .loop1 "LDA (zp),Y:INY:CMP #"!" ,BCS loop1:DEY 6 .loop2 @"LDA (zp),Y:CMP #".":BEQ info3 JDEY:BNE loop2:DEY T.info3:INY:LDX #10 ^ .loop3 h!LDA (zp),Y:CMP #"!":BCC end1 r&JSR OSWRCH:DEX:INY:BNE loop3:.end1 |JSR PrSpace:DEX:BPL end1 LDY #5:JSR pr_addr $JSR pr_addr:LDA ctrl+13:BEQ len2 JSR pr_addr:JMP len3 .len2:JSR Pr2Spaces !DEY:LDX #3:JSR pr_addrX:.len3 JSR Pr2Spaces LDY #9:LDX #7:LDA ctrl+14 ROL A:ROL A:ROL A:ROL A:PHP  .loop4  PLP:ROL A:PHP:PHA:BCC noChar LDA acc,X:JSR OSWRCH  DEY:.noChar:CPX #4:BNE Char2 *PLA:PLP:ROL A:PHP:PHA:\ Lose extra bit JSR PrSlash:.Char2 PLA:DEX:BPL loop4:PLP .loop5:JSR PrSpace &DEY:BNE loop5 0,LDA ctrl+15: #31:JSR pr_dec:JSR PrSlash :,LDA ctrl+16: #15:JSR pr_dec:JSR PrSlash DLDA ctrl+16:CLC:BEQ zero N"LSR A:LSR A:LSR A:LSR A:STA zp X"LDA ctrl+15: #&E0:LSR A:A zp bCLC:ADC #81 l.zero:\ A=00 or 81....208 vPHA:BEQ zero2 9CMP #100:LDA #&19:BCC zero2:PLA:SBC #100:PHA:LDA #&20 .zero2:JSR PrHex PLA:JSR pr_dec:JSR PrSpace %LDA ctrl+17:JSR PrHex:JSR PrSpace !PLA:PHA:JSR PrHex:JSR PrSpace "PLA:CLC:ADC #1:CMP #4:BCS exit ASL A:ASL A:TAX:LDY #4  .loop6 LDA text,X:BEQ exit  JSR OSWRCH:INX:DEY:BNE loop6  .exit PLA:CMP #"=":BNE exit2 JSR PrSpace LDA #&FD:JSR DoOsfile2  LDA ctrl+3:JSR PrHex $LDA ctrl+2:JSR PrHex:JSR PrSlash  LDY #5:LDX #2:JSR pr_addrX *LDA ctrl+17:JSR PrHex 4LDA #":":JSR OSWRCH >LDY #16:LDX #3:JSR pr_addrX H .exit2 R: \JMP OSNEWL f: p .DoOsfile z'LDX zp:LDY zp+1:STX ctrl:STY ctrl+1 .DoOsfile2 #LDX #ctrl 255:LDY #ctrl 256 JMP OSFILE : .pr_addr:LDX #4:.pr_addrX TYA:PHA:.pr_addr1 LDA ctrl,Y:JSR PrHex DEY:DEX:BNE pr_addr1 PLA:TAY:INY:INY:INY:INY BNE PrSpace : .Pr4Spaces:JSR Pr2Spaces .Pr2Spaces:JSR PrSpace  .PrSpace LDA #32:JMP OSWRCH  .PrSlash $LDA #"/":JMP OSWRCH .: 8 .pr_dec B\ First do BINtoBCD LPHA:LDA #10:STA zp:PLA V.BINtoBCDlp `CMP zp:BCC BCDdone jADC #5:PHA tLDA zp:ADC #16:STA zp ~PLA:BCC BINtoBCDlp  .BCDdone  \ Then fall through to PrHex  .PrHex PHA:LSR A:LSR A:LSR A:LSR A JSR pr_nybble:PLA .pr_nybble  #15:CMP #10:BCC pr_n2 ADC #6:.pr_n2 ADC #48:JMP OSWRCH .acc EQUS "RWEPRWEL"  .text EQUS "Run":BRK  EQUS "NFnd" EQUS "File" EQUS "Dir." (EQUS "1.03" 2]