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

From: <silverdr1wfmh.org.pl>
Date: 2010-03-29 01:02:49
On 2010-03-28, at 23:16, Oliver Schmidt wrote:

> If I use cc65's POSIX I/O functions on the C64 to create a file, it
> has the file type USR. According to what I found out this file type is
> quite special

Not really. PRG is probably more special as it has (ar rather is being  
expected to have) two bytes loading address at the beginning of the  
file.

> - PRG ans SEQ are much more common.

That's true, indeed. Simply most programmers didn't find any real use  
for USR files.

> So my question is:
> Why USR? 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.

>
> BTW: I was looking in VICE' 1541 tool for an option to set the desired
> file type when writing files into disk images. There was none
> documented so I checked out the source to find that PRG is hardcoded
> there.

As default, that is.

> All this leaves me (as a non-CBM insider) quite puzzled: If non-PRG
> files play a significant role, then why does a supposed-to-be-mature
> tool like 1541 not support them ?!?

? Of course it does.. ;-)

c1541 #8> attach image.d64
c1541 #8> dir
0 "hobby           " hb 2a
Empty image
664 blocks free.

c1541 #8> write .profile profile
Writing file `.PROFILE' as `PROFILE' to unit 8.

c1541 #8> dir
0 "hobby           " hb 2a
1     "profile         "  prg
663 blocks free.

c1541 #8> write .profile profiles,s
Writing file `.PROFILE' as `PROFILES,S' to unit 8.
c1541 #8> dir
0 "hobby           " hb 2a
1     "profile         "  prg
1     "profiles        "  seq
662 blocks free.

c1541 #8> write .profile profileu,u
Writing file `.PROFILE' as `PROFILEU,U' to unit 8.
c1541 #8> dir
0 "hobby           " hb 2a
1     "profile         "  prg
1     "profiles        "  seq
1     "profileu        "  usr
661 blocks free.

-- 
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 Mon Mar 29 01:02:59 2010

This archive was generated by hypermail 2.1.8 : 2010-03-29 01:03:02 CEST