BBS: Inland Empire Archive Date: 02-27-93 (16:33) Number: 393 From: SCOTT DRYSDALE Refer#: NONE To: ADAM LAUBACH Recvd: NO Subj: SHELL Conf: (2) Quik_Bas
Hi.
AL> Is there anyway to do it with batch files???
AL> Adam
By this I think you mean POKEing the buffer? Yeah you can
poke the buffer with a batch file name... which is kind of
neat in the way you can have your programmewrite a batch
file with it's name being the last lin, as long as your
programme can re-load the variables from a file what you
have is a shell that virtually clears your memory of your
programme. Here's the routine I think you were talking
about:
---------------------------<snip and cut here>---------------------------
buffer$ = "runme.bat" ' dos commands to enter
buffer$ = left(buffer$, 14) + CHR$(13) ' use only 15 characters
length% = LEN(buffer$) ' length of command
DEF SEG = &H40 'Bios data segment
head% = &H1A 'buffer head pointer
tail% = &H1C 'buffer tail pointer
start% = &H1E 'type-ahead buffer
'fill the even bytes with characters from buffer$
'the odd bytes are reserved for keyboard scan codes
FOR I% = 1 TO length%
POKE start% + (I% - 1) * 2, ASC(MID$(buffer$, I%, 1))
NEXT I%
POKE tail%, start% = (I% - 1) * 2 'set new tail pointer
POKE head%, start% 'set new head pointer
DEF SEG 'restore segment
END
---------------------------<snip and cut here>---------------------------
Have a ball
--- Maximus 2.01wb
* Origin: BULLpen BBS * USR DS 16.8/FAX & ASL (613)549-5168 (1:249/140)

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