Page 1 of 1
Can i pass parameters when loading a program from disc?
Posted: Sun May 06, 2007 8:39 pm
I am trying to do this...
from BASIC. COMPILE.COM exists on the current disk but when i try it i get an "Out of memory error".
If i enclose the argument in quotes i get an "Invalid Filename Error".
Is it possible to pass parameters with or without quotes?
This is under BASIC V1.1 and SEDORIC V3.0
Posted: Mon May 07, 2007 12:23 pm
What is COMPILE.COM ?
I didn't find it in the Sedoric 3 disks... So I suspect it's not from the Sedoric distribution.
Is it a program supposed to compile Basic to ASM ?
I have somewhere the Basic Compiler 1.0, the manual is enclosed in some files on the disk. But it's COMPILER.COM, not COMPILE.COM !
Posted: Tue May 08, 2007 9:13 am
Symoon, this is not a question about a sedoric Command, it is a question about the syntax. Compile.com was just an example filename.
I want to be able to pass parameters when loading a disc file on the Oric.
Just like typing DIR /S in dos window.
Posted: Tue May 08, 2007 10:06 am
This is how I did for the MKDIR command in Sedoric. It's tricky and dirty but it worked; I suppose though that better skilled programmer will find a nicer solution
The syntax was:
And now, the part of the code of MKDIR that picked up the parameter and put it in a Sedoric system variable (called BUFNOM):
Code: Select all
20 F2 04 JSR#04F2 Switch to Ram Overlay
E6 E9 INC#E9 add 1 to TXTPTR (to ignore the ":" in the TIB)
20 54 D4 JSR#D454 Sedoric call: analyse filename at TXTPTR address
and copy it to BUFNOM
A9 00 LDA$00 fill the TIB after "MKDIR" with #00 to stop the
exécution in #3A
A2 46 LDX$46 amount of #00 to insert
95 3A STA#3A+X fill from #3A
CA DEX remove 1 from X
10 FB BPL -6 loop while X>=0
It's ASM not basic... Hope it helps anyway !
So when you wrote MKDIR:DIRNAME, the Oric interprets first the MKDIR command, and the MKDIR command stores the following name where it needed it, then deteles it from the input buffer so the Oric doesn't try to interpret DIRNAME as a command. That's it !