Schrijver
| load filelist in array
|
prothnl msx friend Berichten: 5 | Geplaatst: 08 Januari 2006, 01:12   |
I tried to write an assembler routine but I can't seen to figure out the correct "Drive/path/file ASCIIZ string " syntax
Maybe the Bdos call is wrong all together
ORG &HC000
BDOS EQU &HF37D
LD DE,Filename
ld B,0
LD IX,NFB
LD C,40H
CALL BDOS ; _FFIRST
RET
Filename: DEFB "A* SC5",0 ;Drive/path/file ASCIIZ string
NFB:
db 0,"FILENAMEEXT"
dw 0,0,0,0
dw 0,0,0,0
dw 0,0,0,0
dw 0,0,0,0
dw 0,0
|
|
Sonic_aka_T
 msx guru Berichten: 2269 | Geplaatst: 08 Januari 2006, 01:33   |
I think you're using DOS2 calls there. Are you sure your Filename is a proper ASCIIZ string? I usually use DOS1 routines for compatibility, so I don't know much about DOS2 stuff, but I think you just need to define a string "filenameext" and end it with a $00.
|
|
AuroraMSX
 msx master Berichten: 1260 | Geplaatst: 09 Januari 2006, 12:01   |
Quote:
| Filename: DEFB "A* SC5",0
|
"A*.SC5",0
(without spaces, but with a dot) is the proper DOS2 syntax afaik. And DOS2 doesn't use FCBs but file handles instead.
|
|
msd msx professional Berichten: 615 | Geplaatst: 09 Januari 2006, 13:53   |
And it uses a FIB (File Info Block) which is 64bytes big.
|
|
Grauw msx professional Berichten: 1006 | Geplaatst: 09 Januari 2006, 15:00   |
|
|
NYYRIKKI msx master Berichten: 1525 | Geplaatst: 09 Januari 2006, 15:42   |
In MSX-DOS2 you can use ASCIIZ (Zero terminated ASCII) string or file info block (FIB)
ORG &HC000
BDOS EQU &HF37D
LD DE,ASCIIZ
ld B,0
LD IX,FIB
LD C,40H
CALL BDOS ; _FFIRST
RET
ASCIIZ: DEFB "A*.SC5",0 ;Drive/path/file ASCIIZ string
FIB: ds 64
In MSX-DOS1, you have to use File Control Block (FCB)
LD C,11H
LD DE,FCB
CALL BDOS
RET
FCB:
DB 0,"A???????SC5" ;File control block. (does not understand "*")
DS 27
|
|
prothnl msx friend Berichten: 5 | Geplaatst: 09 Januari 2006, 20:01   |
Tanks for all the help I decided to use DOS-1 Search first (11H ) function and it works!
|
|
|
|
|