浏览代码

* dos interface is now 100% compatible
* fixed call PASCALMAIN which must be direct asm

peter 27 年之前
父节点
当前提交
56bc103c33
共有 2 个文件被更改,包括 568 次插入546 次删除
  1. 551 536
      rtl/win32/dos.pp
  2. 17 10
      rtl/win32/syswin32.pp

文件差异内容过多而无法显示
+ 551 - 536
rtl/win32/dos.pp


+ 17 - 10
rtl/win32/syswin32.pp

@@ -117,7 +117,7 @@ unit syswin32;
                    cmdline:=cmdline+1;
                    cmdline:=cmdline+1;
                 end
                 end
               else
               else
-		quote:=[' ',#9];
+                quote:=[' ',#9];
               if cmdline^=#0 then
               if cmdline^=#0 then
                 break;
                 break;
               inc(count);
               inc(count);
@@ -155,7 +155,7 @@ unit syswin32;
                         cmdline:=cmdline+1;
                         cmdline:=cmdline+1;
                      end
                      end
                    else
                    else
-		     quote:=[' ',#9];
+                     quote:=[' ',#9];
                    if cmdline^=#0 then
                    if cmdline^=#0 then
                      break;
                      break;
                    if count=l then
                    if count=l then
@@ -317,9 +317,9 @@ procedure do_open(var f;p : pchar;flags:longint);
      begin
      begin
        case filerec(f).mode of
        case filerec(f).mode of
           fminput,fmoutput,fminout:
           fminput,fmoutput,fminout:
-	    Do_Close(filerec(f).handle);
+            Do_Close(filerec(f).handle);
           fmclosed:
           fmclosed:
-	    ;
+            ;
        else
        else
         begin
         begin
           {not assigned}
           {not assigned}
@@ -339,12 +339,12 @@ procedure do_open(var f;p : pchar;flags:longint);
          end;
          end;
        1:
        1:
          begin
          begin
-	    filerec(f).mode:=fmoutput;
+            filerec(f).mode:=fmoutput;
             oflags:=GENERIC_WRITE;
             oflags:=GENERIC_WRITE;
          end;
          end;
        2:
        2:
          begin
          begin
-	    filerec(f).mode:=fminout;
+            filerec(f).mode:=fminout;
             oflags:=GENERIC_WRITE or GENERIC_READ;
             oflags:=GENERIC_WRITE or GENERIC_READ;
          end;
          end;
     end;
     end;
@@ -364,10 +364,10 @@ procedure do_open(var f;p : pchar;flags:longint);
      begin
      begin
         case filerec(f).mode of
         case filerec(f).mode of
            fminput:
            fminput:
-	     filerec(f).handle:=StdInputHandle;
+             filerec(f).handle:=StdInputHandle;
            fmappend,
            fmappend,
            fmoutput:
            fmoutput:
-	     begin
+             begin
                 filerec(f).handle:=StdOutputHandle;
                 filerec(f).handle:=StdOutputHandle;
                 filerec(f).mode:=fmoutput; {fool fmappend}
                 filerec(f).mode:=fmoutput; {fool fmappend}
              end;
              end;
@@ -468,8 +468,9 @@ procedure getdir(drivenr:byte;var dir:string);
                          SystemUnit Initialization
                          SystemUnit Initialization
 *****************************************************************************}
 *****************************************************************************}
 
 
-procedure Entry;[public,alias: '_mainCRTStartup'];
+{$ASMMODE DIRECT}
 
 
+procedure Entry;[public,alias: '_mainCRTStartup'];
 begin
 begin
    { call to the pascal main }
    { call to the pascal main }
    asm
    asm
@@ -479,6 +480,8 @@ begin
    ExitProcess(0);
    ExitProcess(0);
 end;
 end;
 
 
+{$ASMMODE ATT}
+
 
 
 procedure OpenStdIO(var f:text;mode:word;hdl:longint);
 procedure OpenStdIO(var f:text;mode:word;hdl:longint);
 begin
 begin
@@ -543,7 +546,11 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.7  1998-05-06 12:36:51  michael
+  Revision 1.8  1998-06-08 23:07:47  peter
+    * dos interface is now 100% compatible
+    * fixed call PASCALMAIN which must be direct asm
+
+  Revision 1.7  1998/05/06 12:36:51  michael
   + Removed log from before restored version.
   + Removed log from before restored version.
 
 
   Revision 1.6  1998/04/27 18:29:09  florian
   Revision 1.6  1998/04/27 18:29:09  florian

部分文件因为文件数量过多而无法显示