REM Reading a dir with GBPB on a beeb : osgb=&FFD1 REM OSGBPB for requesting names - function A=8 REM Block format 00 Filehandle (not used). 1 byte REM 01 Pointer to space for the name(s). 4 bytes, low byte 1st REM 05 Number of names to transfer. 4 bytes, low byte 1st REM 09 FS's "next name" pointer. 4 bytes, low byte 1st REM On first call the "next name" pointer is zero REM On exit offset 05 = number of names NOT transferred successfully REM offset 09 = updated by the FS, leave well alone : DIM result 12:REM ie.LEN(name$)+name$+CR assuming 10 letter or less names DIM block 13:block!9=0:REM Zero the "next name" counter REPEAT name$=FNdocat:IFname$<>"" THENPRINTname$ UNTILname$="" END : DEFFNdocat P%=block [OPT2 EQUB0:\File handle (not applicable) EQUDresult:\Destination for name EQUD1:\Number of names to get on this call ] A%=8:X%=block MOD256:Y%=block DIV256:CALLosgb IFblock!5=1 THEN="" ELSEresult?((result?0)+1)=13:=$(result+1)