BBS: Inland Empire Archive Date: 12-22-92 (12:57) Number: 330 From: CORIDON HENSHAW Refer#: NONE To: WES GARLAND Recvd: NO Subj: QB and parameters Conf: (2) Quik_Bas
Hello Wes!
In a msg of <20 Dec 92>, Wes Garland writes to Matt Roberts:
MR>> Some people have code for getting lower-case as well, if you need
MR>> to be case-sensitive. They'd probably re-post if you whined and
MR>> begged <grin>.
WG> Whining and begging!
Here you go:
===Chop===
'$INCLUDE: 'QBX.BI'
DEFINT A-Z
DIM RegsX AS RegTypeX
DIM Regs AS RegType
'
'get current PSP segment..
'
Regs.ax = &H5100
CALL Interrupt(&H21, Regs, Regs)
OldSeg% = Regs.bx
'
'peek all data from PSP area..
oldpsp$ = ""
DEF SEG = OldSeg%
FOR x% = 0 TO 255
oldpsp$ = oldpsp$ + CHR$(PEEK(x%))
NEXT x%
DEF SEG
'
'get real command line from default DTA area..
'
RegsX.ax = &H2F00
CALL InterruptX(&H21, RegsX, RegsX)
DEF SEG = RegsX.es
TrueCmd$ = ""
FOR z% = 2 TO 128
a% = PEEK(RegsX.bx + z%)
IF a% = 13 THEN EXIT FOR
IF a% < 127 AND a% > 27 THEN
TrueCmd$ = TrueCmd$ + CHR$(a%)
END IF
NEXT z%
DEF SEG
'
'write (poke) data back into psp..
'
DEF SEG = OldSeg%
FOR x% = 0 TO 255
byte% = ASC(MID$(oldpsp$, x% + 1, 1))
POKE x%, byte%
NEXT x%
DEF SEG
'
'print the true command line..
'
PRINT TrueCmd$
===Chop===
Coridon Henshaw
Sirrus| /
--*--
/ |Software
...The real price of everything is the toil and trouble of acquiring it.
--- GEcho 1.00
* Origin: TCS Concordia - Mail Only - Toronto, Ontario (1:250/820)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET