Browse Source

+ added DebugWriteHexByte

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

+ 7 - 0
rtl/wasi/system.pp

@@ -15,6 +15,7 @@ procedure fpc_lib_exit; compilerproc;
 procedure DebugWrite(const P: PChar);
 procedure DebugWrite(const P: PChar);
 procedure DebugWriteChar(Ch: Char);
 procedure DebugWriteChar(Ch: Char);
 procedure DebugWriteHexDigit(d: Byte);
 procedure DebugWriteHexDigit(d: Byte);
+procedure DebugWriteHexByte(b: Byte);
 
 
 implementation
 implementation
 
 
@@ -72,6 +73,12 @@ begin
   DebugWriteChar(HexDigits[d]);
   DebugWriteChar(HexDigits[d]);
 end;
 end;
 
 
+procedure DebugWriteHexByte(b: Byte);
+begin
+  DebugWriteHexDigit(b shr 4);
+  DebugWriteHexDigit(b and 15);
+end;
+
 procedure fpc_lib_exit; compilerproc;
 procedure fpc_lib_exit; compilerproc;
 begin
 begin
 end;
 end;