mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-01 12:42:34 +02:00
* more updates to attempt to get a larger part of the full RTL to compile for WASM32
git-svn-id: branches/wasm@47970 -
This commit is contained in:
parent
5a2a9f1dcc
commit
a5fafea8d1
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -12188,10 +12188,12 @@ rtl/unix/unxovl.inc svneol=native#text/plain
|
||||
rtl/unix/unxovlh.inc svneol=native#text/plain
|
||||
rtl/unix/x86.pp svneol=native#text/plain
|
||||
rtl/wasi/rtldefs.inc svneol=native#text/plain
|
||||
rtl/wasi/sysos.inc svneol=native#text/plain
|
||||
rtl/wasi/sysosh.inc svneol=native#text/plain
|
||||
rtl/wasi/system.pp svneol=native#text/plain
|
||||
rtl/wasm32/cpuh.inc svneol=native#text/plain
|
||||
rtl/wasm32/setjumph.inc svneol=native#text/plain
|
||||
rtl/wasm32/wasm32.inc svneol=native#text/plain
|
||||
rtl/watcom/Makefile svneol=native#text/plain
|
||||
rtl/watcom/Makefile.fpc svneol=native#text/plain
|
||||
rtl/watcom/classes.pp svneol=native#text/plain
|
||||
|
@ -315,6 +315,14 @@ function do_isdevice(handle:thandle):boolean;forward;
|
||||
{$define SYSPROCDEFINED}
|
||||
{$endif cpuz80}
|
||||
|
||||
{$ifdef cpuwasm32}
|
||||
{$ifdef SYSPROCDEFINED}
|
||||
{$Error Can't determine processor type !}
|
||||
{$endif}
|
||||
{$i wasm32.inc} { Case dependent, don't change }
|
||||
{$define SYSPROCDEFINED}
|
||||
{$endif cpuwasm32}
|
||||
|
||||
{$ifndef SYSPROCDEFINED}
|
||||
{$Error Can't determine processor type !}
|
||||
{$endif}
|
||||
|
34
rtl/wasi/sysos.inc
Normal file
34
rtl/wasi/sysos.inc
Normal file
@ -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;}
|
||||
|
@ -8,6 +8,9 @@ interface
|
||||
|
||||
{$I systemh.inc}
|
||||
|
||||
const
|
||||
maxExitCode = 65535;
|
||||
|
||||
{$else FULL_RTL}
|
||||
type
|
||||
integer = longint;
|
||||
@ -43,6 +46,9 @@ type
|
||||
end;
|
||||
|
||||
{$ifdef FULL_RTL}
|
||||
|
||||
{$I system.inc}
|
||||
|
||||
{$else FULL_RTL}
|
||||
procedure fpc_lib_exit; compilerproc;
|
||||
begin
|
||||
|
16
rtl/wasm32/wasm32.inc
Normal file
16
rtl/wasm32/wasm32.inc
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2017 by the Free Pascal development team.
|
||||
|
||||
Processor dependent implementation for the system unit for
|
||||
WebAssembly 32-bit
|
||||
|
||||
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.
|
||||
|
||||
**********************************************************************}
|
Loading…
Reference in New Issue
Block a user