SHOSTAK%SRI-CSL@sri-unix.UUCP (08/18/83)
I have heard that, in fact, this function does not work properly, and requires a patch to command.com to make it work. I have also heard that Microsoft is aware of the problem and has developed a fix. Perhaps the Microsoft people who log in on this net could give details about this (and fixes they have developed for other DOS 2.0 bugs).
b-davis@utah-cs@sri-unix.UUCP (08/24/83)
From: b-davis@utah-cs (Brad Davis) This little tidbit works. If a longer explaination is needed I will be glad to write one up. Appendix F and Chapter 10 are helpful (somewhat). Remember to use the /C option of COMMAND.COM. Brad Davis b-davis@utah-cs PSP STRUC INTVECT DW ? TOM DW ? RES1 DB ? DOSLONG DB 5 DUP (?) TERMINA DD ? CTRLBRK DD ? CRITERR DD ? DOS1 DB 22 DUP (?) ENVIRO DW ? DOS2 DB 46 DUP (?) FPA1 DB 16 DUP (?) FPA2 DB 20 DUP (?) UPA DB 128 DUP (?) PSP ENDS EXECDEF STRUC NENVIRO DW COMMND DW 2 DUP (0) FCB5CH DW 2 DUP (0) FCB6CH DW 2 DUP (0) EXECDEF ENDS MEXECOMM MACRO LOCAL EXECBLK,ERR1,SPSAVE,SSSAVE ; point DS:DX at command.com parameter list EXECOMM: PUSH AX PUSH BX PUSH CX PUSH DX PUSH SI PUSH DI PUSH BP PUSH DS PUSH ES MOV SPSAVE,SP MOV SSSAVE,SS ; set up the parameter block MOV EXECBLK.NENVIRO,0 MOV EXECBLK.COMMND[0],DX MOV EXECBLK.COMMND[2],DS MOV AX,CS MOV ES,AX MOV BX,OFFSET EXECBLK XOR BP,BP ; point DS:DX at the COMSPEC parameter (assume it is first) MOV AX,[BP].ENVIRO MOV DS,AX MOV DX,8 MOV AH,4BH MOV AL,0 INT 21H MOV SS,CS:SSSAVE MOV SP,CS:SPSAVE POP ES POP DS POP BP POP DI POP SI POP DX POP CX POP BX POP AX JC ERR1 RET ERR1: JMP ERROR EVEN EXECBLK EXECDEF <> SPSAVE DW SSSAVE DW ENDM