If you want to create you own Assembly tool, you may need to list the files from the Mass Storage Device or from the Disk Drive. And it´s a pain in the ass to do that in Assembly.
So, here is a complete library that works like a File Explorer. You can navigate through the Drives and Directories easily, choose a file and the routine returns the file name when exiting.
The library works also in Page 0, unders DOS1, DOS2 or Nextor.
Link to Download the Executable [FILES.COM] to test it:
https://1drv.ms/u/s!AlpEtfGjLbhmhvoN5FtFa2lxn9CuPw?e=0Urgj3
Link to Download the Source Code [FILES.ASM]:
https://1drv.ms/u/s!AlpEtfGjLbhmhvoOICPoB6JU8SnEQw?e=sMohBq
Just make the necessary changes here and compile it again:
; --------------------- begin | get files Main Procedure Call
mainrot: ld a,'A' ; Set Initial Drive as "A:\"
ld b,1 ; Flag Dir Type | 0 = Set Path On / 1 = Set Path Off
ld hl,0x2000 ; Set Initial Address for the Files
ld de,0x1F00 ; Set the Maximum Amount of Files
call files ; Call Main Procedure - It Returns Register [HL] that points to the Name of the Selected File
ret ; Return to DOS
PathEXT: db '*',0,0,0 ; Set the Files Extension. Instead of '*', use 'DSK' to filter DSK files.
; --------------------- end | get files Main Procedure Call