osdebug.inc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2014 by Free Pascal development team
  4. Platform specific debug functions for Amiga-like systems
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. { Basic system-specific debug facility. Logs to the primary log source, which is
  12. usually the serial port or where the serial log is redirected to (eg. RamDebug
  13. on MorphOS) We could also use some barely-documented RawDoFmt() blackmagic here
  14. specifying "1" as PutChProc pointer, but it doesn't really matter, because
  15. RawDoFmt() will just call RawPutChar internally in that case (KB) }
  16. procedure SysDebug(const s: RawByteString); platform;
  17. var
  18. i: LongInt;
  19. begin
  20. if s <> '' then
  21. for i:=1 to Length(s) do
  22. RawPutChar(s[i]);
  23. end;
  24. procedure SysDebugLn(const s: RawByteString); platform;
  25. var
  26. i: LongInt;
  27. begin
  28. if s <> '' then
  29. for i:=1 to Length(s) do
  30. RawPutChar(s[i]);
  31. RawPutChar(#10);
  32. end;
  33. procedure SysDebug(const s: ShortString); platform;
  34. var
  35. i: LongInt;
  36. begin
  37. for i:=1 to Length(s) do
  38. RawPutChar(s[i]);
  39. end;
  40. procedure SysDebugLn(const s: ShortString); platform;
  41. var
  42. i: LongInt;
  43. begin
  44. for i:=1 to Length(s) do
  45. RawPutChar(s[i]);
  46. RawPutChar(#10);
  47. end;
  48. procedure SysDebugLn; {$IFDEF SYSTEMINLINE}inline;{$ENDIF} platform;
  49. begin
  50. RawPutChar(#10);
  51. end;