Can i pass parameters when loading a program from disc?

Everything related to BASIC version 1.x (Oric 1 and Atmos) or HYPERBASIC (Telestrat).
Don't hesitate to give your small program samples, technical insights, or questions...
Post Reply
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Can i pass parameters when loading a program from disc?

Post by Twilighte » Sun May 06, 2007 8:39 pm

I am trying to do this...

Code: Select all

COMPILE FROGGER.AT0
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

User avatar
Symoon
Archivist
Posts: 1100
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Post by Symoon » 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 !

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » 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.

User avatar
Symoon
Archivist
Posts: 1100
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Post by Symoon » Tue May 08, 2007 10:06 am

Ok !
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:
MKDIR:directory_name
For instance:
MKDIR:TWIDEMO

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 !

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests