I must say right away: I use freedos on a flash drive! That is, DOS is installed on a USB flash drive.
I don't know why CRASH happens, but when using the keyboard and file functions, the program CRASHED.
Other programs save files without problems, but for some reason FB OPEN does not have this.
Here is an example:
Code: Select all
Function SaveFile(sFile As String) As Long
Dim As Integer f = Freefile
Open sFile For Binary As #f
If Err>0 Then
? "Error"
end
Else
Close #f
Return 1
Endif
End Function
print "start"
do
print "save"
if savefile("12345678.txt") then
print "kill"
kill("12345678.txt")
endif
print "ESC to exit or any key to continue"
loop until getkey = 27
P.S. if you remove the GETKEY function from the program, you can save as many times as you like.