TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: LOU SANDERS
from: DAVE NAVARRO
date: 1995-04-12 17:11:00
subject: Command$

Lou,
You are correct, COMMAND$ in the IDE does not work while running in an
OS/2 DOS box.
The DOS emulator under OS/2 is missing several 'API' calls which IBM
felt were outdated and no longer being used.  They are "documented" DOS
calls, but rarely used.  Unfortunately, PowerBASIC does use a couple.
When you compile a program to memory in PowerBASIC in order to run it in
the IDE, PowerBASIC compiles a special executable image and 'shares'
it's own PSP with the running program.  This is to support certain
debugging operations on XT computers.
Since OS/2 does not support these API calls, PowerBASIC's method of
storing data in COMMAND$ does not work.  The simple solution is to
replace your COMMAND$ variable in your program:
Instead of:
Cmd$ = UCASE$(COMMAND$)
Try:
Cmd$ = "/option filename.ext /option"  'UCASE$(COMMAND$)
Just use a literal value.
Let me also point out that PowerBASIC does compile a TRUE executable
image in memory, so your programming is running 99% of speed in the IDE
as it would in DOS (the 1% speed loss is due to the overhead of the
debugger).  However, PB's trick of sharing it's own PSP with the
running program causes the problem under OS/2.  PowerBASIC could create
a separate PSP for the running program which would work in OS/2, but it
would take away more memory from the running program (not an acceptable
solution at this time).
All of this will be resolved in the next major version of the compiler.
--Dave
---
 þ QMPro 1.53 þ Press any key to continue or any other key to quit
     
--- QScan v1.065b
---------------
* Origin: Nitelog BBS Monterey CA (408) 655-1096 (1:216/303) (1:216/303)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.