DOS Prompt

 BBS: Inland Empire Archive
Date: 03-21-92 (03:29)             Number: 192
From: MICHAEL ORCHEKOWSKI          Refer#: 144
  To: DUANE BURRIS                  Recvd: NO  
Subj: DOS Prompt                     Conf: (2) Quik_Bas
DB>Does anyone have a short solution to reading then changing the DOS
DB>Prompt preferably without shelling to dos.(but if thats the easiest..)

I had the same problem when I was incorporating environment changes
(the SET table). Use the code to create a little batch file, then run
the batch file afterwards, and delete the batch file. Let's use the
example from my BIOSDATE program. Trying to change the SET table
directly, then leaving the program, doesn't permanently change the
SET table settings. But if the code looks like this:

'The address to search starts at
'hex F000:FFF5, so set the segment
'accordingly.
DEF SEG = &HF000
'The offset is FFF5; it's
'eight bytes worth.
FOR N = &HFFF5 TO &HFFFC
  'PEEK returns a number
  'in the range 0-255 in
  'memory location at
  'F000h, with an offset of N.
  'CHR$() makes it a character.
  BDATE$ = BDATE$ + CHR$(PEEK(N))
NEXT N
PRINT "The BIOS ROM date of"
PRINT "this computer is "; BDATE$
IF UCASE$(COMMAND$) = "/S" THEN
  OPEN "BIOSDATE.BAT" FOR OUTPUT AS 1
  PRINT #1, "@SET BIOSDATE=" + BDATE$
  CLOSE 1
END IF
SYSTEM

Then this is run from a batch file like this (BD.BAT):

BIOSDATE.EXE /S
CALL BIOSDATE.BAT
DEL BIOSDATE.BAT

Voila! The changes are made permanent by running BD.BAT instead of
BIOSDATE. MPO.
--- RAMail 3.0
 * Origin: Old Pueblo BBS - Tucson Computer Society (1:300/2)
Outer Court
Echo Basic Postings

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