[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ProDOS and Apple II (not +)



Michael J. Mahon wrote:
Linards Ticmanis wrote:

Michael J. Mahon wrote:


After looking over the source, I'm wondering: why do you copy a
REM token and the startup flename to BASIC input buffer at $200?



IIRC, this is some parameter-passing convention of cc65. It serves to
get something into main()'s argc/argv. Since there is no real
free-format command line passing in BASIC.SYSTEM, you'd say CALL
<address>:REM <parameters> to give parameters to a BLOADed cc65-compiled
piece of code. I guess this is somehow related to that.


Or just "-program:REM<params>" at the command line.

So the net effect is to allow a cc65 program run by LOADER to
determine its name...seems like a waste of time.  And it would
have the effect of putting any parameters actually supplied using
this mechanism in a *second* REM instead of the first.

I would expect that leaving the buffer alone would produce the
desired effect if the program were run with LOADER.SYSTEM to
start it.

I was on the wrong track...

BASIC.SYSTEM does not permit any colons or REM's after a command,
and a CALL doesn't put anything into the keyboard buffer.

The only thing that can be in the keyboard buffer after a command
is a legal command (or the residue of earlier, longer contents).
As I noted some time ago, the (meaningless in ProDOS) "V" parameter
is permitted, but not usefully scanned, so that would be the only
"parameter" that could be passed, and would have to be 0..255.

So I guess I don't get this parameter passing mechanism...

-michael

NadaPong: Network game demo for Apple II computers!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."