bsa@ncoast.UUCP (Brandon Allbery) (06/30/85)
Expires: Quoted from <7700007@prism.UUCP> ["Re: Changing the dumb '\' to '/'..."], by matt@prism.UUCP... +--------------- | /**** prism:net.micro.pc / ukc!rde / 10:32 am Jun 22, 1985 ****/ | | One thing you might try on DOS 3.x is to change the SWITCHAR using the | system call (I too am not certain that it exists, though), then invoke a | second copy of COMMAND. This should read the revised value and get the | desired effect (at a small loss in available memory). | | /* ---------- */ | | This DOES work, and you do NOT have to load a second copy of the | command processor - the original copy will know about the new switch | character. | | The DOS call of interest is function 37 (hex), which is listed as | reserved for DOS's use. If function 37 is executed with AL set to | 0, the current switch character is returned in DL. If it is | executed with AL set to 1, the value in DL becomes the new switch | character. +--------------- It didn't seem to work on here (ITT DOS 2.11/1.0, apparently MS-DOS 2.11), but that may have been a mistake of mine; I was trying to hack through it with DEBUG.COM, without much documentation. +--------------- | While we're on the subject of hacking DOS 3.1, does anyone know the | new location to patch in command.com to increase the environment | size to something reasonable? You would think after all this time | that the Microsoft clones would realize that 128 bytes is just too | small! (Fascinating that they though it was more important to | include the ability to specify the last disk drive letter in DOS | 3.0, but didn't think of allowing you to specify the environment | size! Now THAT would be a useful thing to put in config.sys. +--------------- Why don't they just use dynamic environments? MS-DOS can handle 32K in the environment (says my manual), why don't they REALLOC the memory when they add or delete environment variables? BTW, I put in the MS-DOS 2.x patch for larger COMMAND environments; I didn't look to see if it worked, because the new COMMAND.COM wouldn't load my AUTOEXEC.BAT any more. Anybody know why? One last question. The LEADING EDGE PC runs MS-DOS 2.11 (or is it 2.13); the COMMAND on there groks %env-var% in batch scripts. Is this a feature of MS-DOS 2.13, Leading Edge COMMAND.COM, or what? (It sure doesn't work on MY system, that I can see.) --bsa -- Brandon Allbery, Unix Consultant -- 6504 Chestnut Road, Independence, OH 44131 decvax!cwruecmp!ncoast!bsa; ncoast!bsa@case.csnet; +1 216 524 1416; 74106,1032 ========================> Trekkies have Warped minds. <=======================
rde@ukc.UUCP (R.D.Eager) (07/05/85)
A recent article complained that COMMAND.COM wouldn't read the AUTOEXEC.BAT file after being patched. This may be too easy, but did you change the CONFIG.SYS file around that time? and put in a SHELL line without a /P? Lack of /P will cause the AUTOEXEC.BAT step to be missed out during initialisation..... -- Bob Eager rde@ukc.UUCP rde@ukc ...!mcvax!ukc!rde Phone: +44 227 66822 ext 7589
gbs@voder.UUCP (George Smith) (07/08/85)
The following refers to changing the switch character with the undocumented int 21H, fucntion 37H: > It didn't seem to work on here (ITT DOS 2.11/1.0, apparently MS-DOS 2.11), > but that may have been a mistake of mine; I was trying to hack through it > with DEBUG.COM, without much documentation. > I ran the enclosed Turbo Pascal 3.0 program on my ITT Xtra with DOS 2.11 and it ran just fine. I guess hacking through problems with debug just doesn't cut it :-). BTW, the Xtra seems to be quite compatible with IBM PC/XTs. Every piece of software that I have tried on it has run with no problems and that includes some which have not run on a friend's Compaq. At $1495 for 256k ram, 2 1/2 ht floppys, high resolution monochrome adapter and monitor, 4 free full size slots, DOS 2.11, 128 watt power supply, a serial port and a printer port, nicer keyboard layout than IBMs, a smaller footprint than an XT, take it home and plug it in and it works (unlike my venerable S100 system) I just couldn't resist it. I plugged in a Hercules Color Card (for $155) and hooked it up to an old Sanyo composite video monitor and had very nice graphic capability for use with Lotus ($279) and Turbo Pascal 3.0 ($39). All prices mentioned were from local computer stores here in Silicon Valley. (* ** switchar.pas ** ** This program changes the system switch character. It uses ** the undocumented system call int 21H, function 37H. *) program switchar; type regpack = record ax,bx,cx,dx,bp,si,di,ds,es,flags: integer; end; var recpack: regpack; argumentstr: string[80]; old_switchar: char; new_switchar: char; function getswitchar: char; begin recpack.ax := $37 shl 8; msdos(recpack); getswitchar := chr(recpack.dx and $00ff) end; procedure setswitchar(new_char: char); begin with recpack do begin ax := ($37 shl 8) + 1; dx := ord(new_char) end; msdos(recpack) end; begin { main } lowvideo; if paramcount <> 1 then begin writeln('This program changes the system switch character.'); writeln('Usage: switchar char'); halt end; argumentstr := paramstr(1); if length(argumentstr) <> 1 then begin writeln('switchar: expecting single character argument'); halt end; old_switchar := getswitchar; writeln('Old switch char = ', old_switchar); setswitchar(argumentstr[1]); new_switchar := getswitchar; writeln('New switch char = ', new_switchar) end. -- George B. Smith National Semiconductor ...!{ihnp4!nsc | decvax!decwrl!nsc | ucbvax}!voder!gbs