Qbasicnews.com

Full Version: How to pass arguments to compiled basic program?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Getting the true command line isn't that hard...

Code:
DIM Regs AS RegTypeX

Regs.ax = &H2F00
InterruptX &H21, Regs, Regs

DEF SEG = Regs.es
Offset = Regs.bx
Length = PEEK(Offset)

FOR x = Offset + 1 TO Offset + Length
  Com$ = Com$ + CHR$(PEEK(x))
NEXT
I prefer Plasma's way, but if you need a permanent way to fix COMMAND$'s forced CAPS, here's one:

http://sys.blissdev.com/dav/?fixcmd

- Dav
Well, to each his own.

I don't like to use interrupt commands. Actually I don't understand them. I may invoke a sub or function from a library that perhaps uses interrupts, but I assume they know what they're doing and that it's fully debugged.

Permanently patching QB and the library --- that could be really dangerous. I would never do that. Besides, I use QuickBasic, there's no QB to patch!

My advice, Jpeppas, pick the solution which makes sense to you, and of course, one which works.
*****
Plasma, would you mind explaining how your proggie will get the commandline parameters?
Pages: 1 2