diff --git a/basic/test.bsc b/basic/test.bsc index c3e1bd68..b7bd585e 100644 --- a/basic/test.bsc +++ b/basic/test.bsc @@ -1,13 +1,16 @@ -open output 1,"test.txt" -a$ = "Line 2" -print line #1,"Hello world!",a$ -print line #1,"Line 3","" -close 1 +f$ = "test.xxx" +f$ = "testdir2" +fName = $D000 +poke fName,len(f$) +for i = 1 to len(f$):poke fname+i,asc(mid$(f$,i)):next -open input 1,"test.txt" -print eof(1) -while eof(1) = 0 - input line #1,a$ - print "[";a$;"]" -wend -close 1 \ No newline at end of file +while peek($FF00):wend +doke $FF04,$D000 +poke $FF01,16 +poke $FF00,3 +while peek($FF00):wend + +result = peek($FF02) +size = deek($FF04) +attrib = peek($FF08) +print result,size,attrib diff --git a/documents/sound.ods b/documents/sound.ods new file mode 100644 index 00000000..6c47f0ea Binary files /dev/null and b/documents/sound.ods differ diff --git a/emulator/src/core/hardware.cpp b/emulator/src/core/hardware.cpp index 96204604..e65ab0dd 100644 --- a/emulator/src/core/hardware.cpp +++ b/emulator/src/core/hardware.cpp @@ -272,7 +272,9 @@ uint8_t FISStatFile(const std::string& filename, uint32_t* length, uint8_t* attr printf("FISStatFile('%s') -> ", abspath.c_str()); try { - *length = std::filesystem::file_size(abspath); + if (!std::filesystem::is_directory(abspath)) { + *length = std::filesystem::file_size(abspath); + } *attribs = getAttributes(abspath); printf("OK; length=0x%04x; permissions=0x%02x\n", *length, *attribs); return 0;