Re: [cc65] CBM POSIX I/O - USR Files

From: <silverdr1wfmh.org.pl>
Date: 2010-03-30 03:14:14
On 2010-03-29, at 17:37, Oliver Schmidt wrote:

>> PRG is probably more special as it has (or rather is expected to have)
>> two bytes loading address at the beginning of the file.
> 
> I see. So if I type LOAD on a PRG file without a valid loading address
> the result will be (more or less) undefined.

Yes - more or less ;-)

> What happens if I type
> LOAD on an USR file? The same?

More or less ;-) The difference is that you have to specify that you want to load USR file. Otherwise you get FILE TYPE MISMATCH error. Other than that - the same (AFAIR).

> 
> And what about LOAD,* ? Does it load the first PRG file or load the
> first <whatever> file?
> 

Depends. It either loads the most recently accessed file or - if you are freshly initialised - the first PRG file.
To make sure you actually load the very first file, you put a colon before the asterisk. But then the file must be PRG or you get the familiar (already) error, unless you specify the type.

> Sorry for not trying myself but I don't have access to my PC right now...

Understood. That's why I write that rather than asking you to check yourself ;-)

>>> I found a hint that both PRG and SEQ are limited in size,
>>> maybe USR not?
>> 
>> I think there is no real difference in the limits. REL files have different
>> limits but they are generally different.
> 
> I was refering to http://www.c64-wiki.com/index.php/VC-1541 which says:
> 
> PRG program files (maximum filesize approximately 200 blocks)

That's not only inaccurate but also purely wrong. It refers to the *commonly used* longest file that can be safely (meaning: without special care) loaded from BASIC, starting at the default BASIC PRG memory bottom... and even taking all those conditions into account - it is still 202 blocks sharp, rather than "approximately 200" (yeah - I know... ).

> [...]
> Thank you for that information. Now I understand that the C1541
> doesn't need to say something about it as it is part of the DOS
> command syntax - hopefully getting it right now...
> 

Yup.

-- 
SD!

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Mar 30 03:14:22 2010

This archive was generated by hypermail 2.1.8 : 2010-03-30 03:14:24 CEST