Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
COMMAND$ gives uppercase. Get command with original case.
#11
Load QB with this parameter from a commandline/shortcut/batfile:
QB /L

Too lazy to check the actuall BC/LINK parameter to include a lib.


And you might need to add:
'$include: qb.bi"

To the top of the code.
Reply
#12
The code I posted was only a function, not an entire program. So of course it wasn't "ready to run." Wink Like Zire said, you need to link with QB.LIB and include QB.BI when compiling a program that uses INTERRUPT or INTERRUPTX.
Reply
#13
I'm using QuickBasic 4.5. I don't have QB.LIB nor QB.BI. All I have is BCOM45.LIB, which I never use, and the QuickPak .LIB.

I'm not about to change my linking batchfile and get your required QB.LIB and QB.BI, which probably wouldn't work with QuickBasic, just to test your function. You test it in your QBasic environment, and I'll take your word for it that it works.

Not all of us on the forum use QBasic, some of us use QuickBasic, and I think some use GW-Basic or similar.
*****
Reply
#14
Err...QB.LIB and QB.BI are included with QuickBASIC 4.5. Maybe you deleted them? I don't know where you got the impression that I was using QBasic.

There's not really any reason to read the command-line in QBasic or GWBASIC, because it will always be run in the interpreter...
Reply
#15
QB.QLB and QB.BI are part of the standard QuickBasic 4.5 package. You should have them, unless your package is incomplete. You can head to qbnz to download the full, official QB 4.5 package that the community compiled and completed.

Quote:I'm not about to change my linking batchfile and get your required QB.LIB and QB.BI, which probably wouldn't work with QuickBasic, just to test your function.

QB.LIB and QB.BI do work with QuickBasic. They were coded by Microsoft and put in there just in case people wanted to call MSDOS or BIOS interrupts. The functions in QB.LIB were taken away from the runtime 'cause in 1987 all the space you could save was precious, and not all programs use interrupts.

You don't have to change any batch files, just load the QB ide with the /L option, load the code, and run it. Trust me, trying this routine won't kill you Wink And I find it the most "intelligent" way to do it: call the OS 'cause retrieving the command line is OS stuff.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#16
Ok guys, I was wrong about QB.QLB and QB.BI. Since I never needed these, I don't have them in my "incomplete" set of Quickbasic 4.5.

I posted this challenge because I considered that it would be an interesting topic to get the commandline case sensitive. I already implemented this logic back in 1999 using a function in the QuickPak library that I purchased.

Therefore, I really don't have the inclination to obtain all the elements that I'm missing plus QB and the IDE, just to test Plasma's entry, even though it might be the most "intelligent" way to do it.

In past challenges that I've posted, I think I have been quite fair in testing entries and providing feedback. This one entry goes beyond my intended limits.

Give me a break!
*****
Reply
#17
LOL at this thread. Nice job Plasma (although my current understanding of QB (like moneo) too insophistocated to know how to use your code). I understand what your code does...it goes to the mem location where the command line exists and retrieves it. You demonstrate, as usual, great knowledge of low-level DOS coding, in conjunction with the ability to understand and solve a problem. I hope you are making a bundle with your knowledge.

Moneo...this is not a dig. I just thought the thread was funny with your waryness...

Cheers all....keep coding...
Reply
#18
Quote:I understand what your code does...it goes to the mem location where the command line exists and retrieves it.

You could just write a little routine to PEEK into memory and retrieve it that way also... try it :wink:

Cya,

Nemesis
Reply
#19
That's what Plasma's code does. The int is needed to get the location of the DTA to figure out where to PEEK.
Reply
#20
Quote:That's what Plasma's code does. The int is needed to get the location of the DTA to figure out where to PEEK.

Why do you mention this?
Maybe you wanted to inform anyone who didn't get it? :???:
See, I guess it's just one of my natural abilities to understand everyones programming knowledge just from reading their posts, code, etc...
I guess this type of perception is not one of your stronger traits :roll:
But, yes I completely understand what Plasma's code does, along with 99% of the forum, since it was relayed 3 or 4 times, and I even quoted someones explaination my last post, thinking no one
would misunderstand me... Oh well, let me explain what I meant...
Write a small routine , which scans memory to find COMMAND$. It was just an alternative to using an interrupt! Hope this clears up my intention.

Nemesis
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)