@NYYRIKKI: You now the topic says "Basic course for newbies", right But I do agree: Using BDOS is better, way better... (I assume you're using BDOS calls, don't feel the urge to disassemble that piece of ML)
I will play arround with this 'BDOS methode' But it's nice to know how it works indeed... and is dos needed for this? Or just disk basic ?
BDW: VPOKE is also nice to play with i found out today
@edoz: MSX-DOS is not needed.
BDOS is a set of routines for disk usage (the disk BIOS), which is in the disk ROM.
@NYYRIKKI: You now the topic says "Basic course for newbies", right But I do agree: Using BDOS is better, way better... (I assume you're using BDOS calls, don't feel the urge to disassemble that piece of ML)
Yes, that is correct and I do agree that this is not good example for newbies. How ever this is one of those things that simply can't be done in newbie friendly way... So I thought that it is better alternative to give "unreadable code" that people can adapt to their needs rather than teaching how to do things in a way that causes trouble & compatibility issues later anyway. In this example I used two BDOS FCB functions: #11 Search first entry and #12 Search next entry but I will not explain it better on this topic.
Now please start asking more easy questions File handling & BASIC is not the best topic to start learning.
How about explaining what area BASIC can use to poke random data? I often see $c000, but is there any reason for that? What're the lower and upper address of which you can be sure that no other BASIC-code, tsr or whatever interferes? And is this the same area where BASIC stores its variables and arrays? And is this user-pokable area the same in each MSX model (with sufficient memory)?
I'll let our Finish friend write part 2.
To bad. Because, I'm a beginner, and this thread is fun to learn so far. (Even i do not understand anything but it makes me curious what you can do in MSX basic and behind that..) At this moment i can only do thing is C# and VB.NET, but that don't help me on the MSX. For now i learned that file handling is a bit complex on the MSX. Not as simple as filehandling in VB
I'd say that file handling in basic is "basic" ;-)
Msx basic has born before the diffusion of disk drives, thinking mainly to cassettes and sequential media.
You can easily access files whose names you know already, both ascii and binary files are supported, but there is no simple way e.g. to read the content of a directory or to generate a name for a temporary file not colliding with others