Re: Auto Boot

From: Spiro Trikaliotis <ml-cbmhackers_at_trikaliotis.net>
Date: Sun, 7 Apr 2013 20:06:10 +0200
Message-ID: <20130407180610.GI30300@trikaliotis.net>
Hello,

* On Sun, Apr 07, 2013 at 03:59:22AM +0000 William Levak wrote:

> >10 PRINT"FILE1"
> >SAVE "FILE1",8
> >10 PRINT"FILE2"
> >SAVE "FILE2",8
> ><reset>
> 
> Eliminate the reset and try it again.

Why? You stated (in Message-ID: <Pine.NEB.4.64.1304051756550.28213@sdf.lonestar.org>):

    0:* is NOT always the first file.  It's the last file referenced.
    It's the first file only if the drive has not referenced a file
    previously.

You are right in one thing, my test cases was wrong. I had to write the
"0:" explicitly, as you had it in your statement.

Anyway, there is no doubt we agree that

> >lOAD"*",8

always returns the last file reference. Thus, no need to eliminate the
RESET.

> >RUN
> >--> output: FILE1
>
> >LOAD"FILE2",8
> >RUN

However:

> >--> output: FILE2
> >LOAD"*",8
> >--> output: FILE2

This is the case that the last referenced file is read.

> >LOAD":*",8
> >--> output: FILE1

This is the case where you ALWAYS get the first file from the drive. You
can replace it by LOAD "0:*",8, you still get the same result. I tested
it. Did you?

Of course, I can also replaced it by LOAD "0:?*",8 - but, why should I
enter another char? It is not needeed.

Also, LOAD "?*",8 works, too. The reason is that the function "last
referenced file" is explicitly coded into the 1541. Whenver the very
first char of the file to read is an asterisk (*), you get the last
referenced file. (Ingo Korb already stated this and even told you where
this routine can be found).

Thus, reading "*", "*ABC", "*?", "*---" - all return the last referenced
file.

Note that the statement above "first char of the file" is to be read as
"first char of the file specification as the computer send it." That is,
adding anything at the beginning (especially a drive specification)
makes this rule to not match anymore.

Thus, if you add ANYTHING before the asterisk, this mechanism does not
fire anymore. Thus, loading ":*", "0:*", "?*" all result in the same -
loading the first file from the disk. (Note: Strictly speaking, this is
only correct for single drive devices)

If you and your statement were correct, you would have to tell me a
sequence of actions where loading ":*" and loading "?*" make a
difference. Can you give me any such sequence? I really doubt it.

Feel free to proove me wrong.

Note: Just because you found another workaround for the behaviour '"*"
reading the last accessed file', it does not mean that the workaround
others have found is not correct, as you stated in the message cited
above.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/

       Message was sent through the cbm-hackers mailing list
Received on 2013-04-07 20:00:06

Archive generated by hypermail 2.2.0.