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

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2010-03-29 18:24:08
Hello,

* On Mon, Mar 29, 2010 at 05:37:02PM +0200 Oliver Schmidt wrote:
 
> I see. So if I type LOAD on a PRG file without a valid loading address
> the result will be (more or less) undefined. What happens if I type
> LOAD on an USR file? The same?

Yes. USR, PRG and SEQ are only valid for the floppy. The C64 (or other)
machine is not interested in them. All three file formats are exactly
the same, only one byte in the directory is different.

Having said this, USR has one special meaning, th so-called "&"-files
which can be used to load a program into the *floppy* memory and execute
it. However, it is just a limitation of the &-command, not of the SEQ or
PRG format!


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

I am not completely sure here.

Note, however, that LOAD "*",8 loads the *last* *accessed* file, not the
first one! If you want the latter behaviour, you must use LOAD ":*",8

 
> I was refering to http://www.c64-wiki.com/index.php/VC-1541 which says:

The WIKI is often wrong.

 
> 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...

Yes.

LOAD "PROG,U",8

loads a USR file named "PROG".

OPEN 1,8,2,"TEST,S,W" writes a file "TEST" as SEQ. Replace S by U or P
to get USR or PRG.
 
Regards,
Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Mar 29 18:24:29 2010

This archive was generated by hypermail 2.1.8 : 2010-03-29 18:24:31 CEST