Apple II : Prodos, prefix, 0 length prefix and MLI calls

108 views Asked by At

Hi Apple // enthusiasts,

I have a simple program on my Apple IIc in assembly language. It starts by getting a filename from the user (GETLN), then it opens the corresponding file with a MLI call ($C8) To my suprise, the MLI call returned error # $40 : "Pathname has invalid syntax" I have checked all parameters, but they where OK. I have tried to type PREFIX /myvolume before starting my program. And this time, it worked !! (the file was opened without any error). I undertood that when you start prodos (just prodos and basic.system), then te prefix is empty. I have ckecked it, by replacing the openfile MLI call by a get_prefix call. And yes, the prefix length is 0.

Did you know that ? Until then, I believed that the prefix was set to the root prefix of the booting disk by the system at boot.

For the story, I have found a worknaround reading the path of the runnning program (my program in that case) at memory address $280, and calling set_prefix to that path. A lot of assembly lines.

Can you confirm my analyse ?

Thanks

0

There are 0 answers