Browse Source

+ added DebugWriteChar

git-svn-id: branches/wasm@47952 -
nickysn 4 years ago
parent
commit
b80a650c7d
1 changed files with 10 additions and 0 deletions
  1. 10 0
      rtl/wasi/system.pp

+ 10 - 0
rtl/wasi/system.pp

@@ -13,6 +13,7 @@ type
 
 
 procedure fpc_lib_exit; compilerproc;
 procedure fpc_lib_exit; compilerproc;
 procedure DebugWrite(const P: PChar);
 procedure DebugWrite(const P: PChar);
+procedure DebugWriteChar(Ch: Char);
 
 
 implementation
 implementation
 
 
@@ -54,6 +55,15 @@ begin
   fd_write(1, @our_iov, 1, @our_nwritten);
   fd_write(1, @our_iov, 1, @our_nwritten);
 end;
 end;
 
 
+procedure DebugWriteChar(Ch: Char);
+var
+  CharArr: array [0..1] of Char;
+begin
+  CharArr[0] := Ch;
+  CharArr[1] := #0;
+  DebugWrite(@CharArr);
+end;
+
 procedure fpc_lib_exit; compilerproc;
 procedure fpc_lib_exit; compilerproc;
 begin
 begin
 end;
 end;