浏览代码

+ some rtl include files added

git-svn-id: branches/z80@44904 -
nickysn 5 年之前
父节点
当前提交
861ae0b139
共有 4 个文件被更改,包括 88 次插入0 次删除
  1. 3 0
      .gitattributes
  2. 24 0
      rtl/zxspectrum/rtldefs.inc
  3. 34 0
      rtl/zxspectrum/sysos.inc
  4. 27 0
      rtl/zxspectrum/sysosh.inc

+ 3 - 0
.gitattributes

@@ -12189,6 +12189,9 @@ rtl/z80/z80.inc svneol=native#text/plain
 rtl/zxspectrum/Makefile svneol=native#text/plain
 rtl/zxspectrum/Makefile.fpc svneol=native#text/plain
 rtl/zxspectrum/prt0.asm svneol=native#text/plain
+rtl/zxspectrum/rtldefs.inc svneol=native#text/plain
+rtl/zxspectrum/sysos.inc svneol=native#text/plain
+rtl/zxspectrum/sysosh.inc svneol=native#text/plain
 rtl/zxspectrum/system.pp svneol=native#text/plain
 tests/MPWMake -text
 tests/Makefile svneol=native#text/plain

+ 24 - 0
rtl/zxspectrum/rtldefs.inc

@@ -0,0 +1,24 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2012 by Free Pascal development team
+
+    This file contains platform-specific defines that are used in
+    multiple RTL units.
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+{ the single byte OS APIs always use UTF-8 }
+{ define FPCRTL_FILESYSTEM_UTF8}
+
+{ The OS supports a single byte file system operations API that we use }
+{$define FPCRTL_FILESYSTEM_SINGLE_BYTE_API}
+
+{ The OS supports a two byte file system operations API that we use }
+{ define FPCRTL_FILESYSTEM_TWO_BYTE_API}

+ 34 - 0
rtl/zxspectrum/sysos.inc

@@ -0,0 +1,34 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2013 by Free Pascal development team
+
+    This file implements all the base types and limits required
+    for a minimal POSIX compliant subset required to port the compiler
+    to a new OS.
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+{procedure GetInOutRes(def: Word);
+var
+  regs : Registers;
+begin
+  regs.AX:=$5900;
+  regs.BX:=$0;
+  MsDos(regs);
+  InOutRes:=regs.AX;
+  case InOutRes of
+   19 : InOutRes:=150;
+   21 : InOutRes:=152;
+   32 : InOutRes:=5;
+  end;
+  if InOutRes=0 then
+    InOutRes:=Def;
+end;}
+

+ 27 - 0
rtl/zxspectrum/sysosh.inc

@@ -0,0 +1,27 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2013 by Free Pascal development team
+
+    This file implements all the base types and limits required
+    for a minimal POSIX compliant subset required to port the compiler
+    to a new OS.
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+{Platform specific information}
+type
+  THandle = Word;
+  TThreadID = THandle;
+  TOSTimestamp = LongInt;
+
+  PRTLCriticalSection = ^TRTLCriticalSection;
+  TRTLCriticalSection = record
+    Locked: boolean
+  end;