Ok, Plasma, I put your GETCOM$ function inside a little test program, like so:
Code:
defint a-z
DECLARE FUNCTION GetCom$ ()
PRINT GETCOM$
SYSTEM
END
FUNCTION GetCom$
DIM Regs AS RegTypeX
Regs.ax = &H2F00
InterruptX &H21, Regs, Regs
DEF SEG = Regs.es
Offset = Regs.bx
Length = PEEK(Offset)
FOR i = Offset + 2 TO Offset + Length
Com$ = Com$ + CHR$(PEEK(i))
NEXT
GetCom$ = Com$
END FUNCTION
I got the following errors when compiling:
C:\moneo\qb45\BC /O GETCOM,,GETCOM;
Microsoft ® QuickBASIC Compiler Version 4.50
© Copyright Microsoft Corporation 1982-1988.
All rights reserved.
Simultaneously published in the U.S. and Canada.
005D 000A DIM Regs AS RegTypeX
^ TYPE not defined
005D 000A InterruptX &H21, Regs, Regs
^ Equal sign missing
^ Syntax error
42845 Bytes Available
42048 Bytes Free
0 Warning Error(s)
3 Severe Error(s)
Your solution, or entry, is not exactly "ready to run". :wink:
I don't use TYPE, so I can't fix that problem.
As far as the "Equal sign missing" and the "Syntax error", I haven't got a clue how to fix them.
Send me a fixed version, and I'll try it again.
*****