Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > Dos Exec with command interpreter
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 25th August 14:33
il mago delle comete
External User
 
Posts: 1
Default Dos Exec with command interpreter



I have tried to repair this problem, but it is harder than me (for
now). Anyway, I make some modification that may claim enhancement, so
here:
- deletion of two unnecessary fields in the execution block with the
Intr 21h ax=4b00h, where they need in 01 mode (Ralph Brown's);
- better encapsulation of a prefixed string in a null terminated
string;
- complete scan of the all commandline in the second FCB;
- equality of the DS and ES when launching to avoid crash (Go32 unit
manual).

Patch to \rtl\go32v2\dos.pp, fpc 2.0.2:

172,173d171
< iniStack : realptr;
< iniCSIP : realptr;
182c180,181
< c,p : string;
---


200,202c199,202
< move(comline[0],c[1],length(comline)+1);
< c[length(comline)+2]:=#13;
< c[0]:=char(length(comline)+2);
---


204a205

219d219
< { allow slash as backslash }
223c223
< paste_to_dos(c);
---

241,248d240
< inc(arg_ofs);
< until (c[arg_ofs] in [' ',#9,#13]);
< if c[arg_ofs]<>#13 then
< begin
< repeat
< inc(arg_ofs);
< until not (c[arg_ofs] in [' ',#9]);
< end;
251c243
< dosregs.si:=(la_c+arg_ofs) and 15;
---

253c245
< dosregs.di:=fcb2_la and 15;
---

254a247,255

268,269c269,270
< dosregs.ebx:=la_e and 15;
< dosregs.es:=la_e shr 4;
---


277c278
< LastDosExitCode:=DosRegs.al
---

--
Omega e' omega e basta
  Reply With Quote


 


Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Development, Ada, Apple script, Assembler, Awk, Beos, Basic, C, C++, C#, C# .net, .net, .net frameworks, Asp .net, Clarion, Clipper, Clos, Clu, Cobol, Coldfusion, Delphi, Dylan, Eiffel, Forth, Fortran, Haskell, Hermes, Icon, Idl, Java, Java script, Jscript .net, Jcl, Linoleum, Lisp, Lotus, Limbo, Logo, Ml, Mumps, Oberon, Postscript, Pop, Pl1, Prolog, Python, Ruby, Pascal, Perl, Php, Rebol, Rexx, Sed, Sather, Scheme, Smalltalk, Tcl, Vhdl, Vrml, Visual basic, Visual basic .net, Yorick, Mysql, Omnis, Postgresql, Xbase, Access, Oracle, Adabas, Berkeley, Btrieve, Filemaker, Gupta, Db2, Informix, Ingres, Mssql server, Object, Olap, Paradox, Rdb, Revelation, Sybase, Theory, Dbase, Html, Java script, Css, Flash, Photoshop, Corel script, Xml, Tech, Beos, Gem, Hp48, Hpux, Linux, Mac, Ms-dos, Os2, Palm, Solaris, Ti99, Windows, Xenix, Aos, Chorus, Geos, Inferno, Lantastic, Lynx, Mach, Minix, Netware, Os9, Parix, Plan9, Psos, Qnx, Xinu, Sco, Unix, Aix, Aux, 386bsd, Bsdi, Freebsd, Netbsd, Openbsd, Ultrix, Amd, Intel, Aptiva, Buz, Deals, Homebuilt, Overclocking, Programming, Extra forums


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666