fork(1) download
  1. : HEX,{ ( "hex-byte hex-byte ... }" ) \ Add bytes in hex to dictionary
  2. BASE @ >R HEX
  3. \ Loop over input
  4. BEGIN
  5. 0.
  6. PARSE-NAME \ Read while parse area has content and not }
  7. DUP IF 2DUP S" }" COMPARE
  8. ELSE FALSE THEN
  9. WHILE
  10. .S CR
  11. \ Convert to number and add to dictionary
  12. ( 0 name-a name-u ) >NUMBER 2DROP D>S C,
  13. REPEAT
  14.  
  15. R> BASE !
  16. 2DROP 2DROP ;
  17.  
  18. : iHEX,{ ( "hex-byte hex-byte ... }" ) \ Add bytes in hex to dictionary
  19. BASE @ >R HEX
  20. \ Loop over input
  21. BEGIN
  22. 0.
  23. PARSE-NAME \ Read while parse area has content and not }
  24. DUP IF 2DUP S" }" COMPARE
  25. ELSE FALSE THEN
  26. WHILE
  27. .S CR
  28. \ Convert to number and add to dictionary
  29. ( 0 name-a name-u ) >NUMBER 2DROP D>S .S CR POSTPONE C,
  30. REPEAT
  31.  
  32. R> BASE !
  33.  
  34. 2DROP 2DROP ; IMMEDIATE
  35.  
  36. CREATE TEST
  37. HEX,{ 00 20 30 40 50 10 20 30 10 20 }
  38.  
  39. HERE TEST - CONSTANT #TEST
  40.  
  41. : .TEST #TEST 0 ?DO TEST I + C@ . LOOP CR ;
  42.  
  43. .TEST
  44. (
  45. 0 0 1D677A 2
  46. 0 0 1D677D 2
  47. 0 0 1D6780 2
  48. 0 0 1D6783 2
  49. 0 0 1D6786 2
  50. 0 0 1D6789 2
  51. 0 0 1D678C 2
  52. 0 0 1D678F 2
  53. 0 0 1D6792 2
  54. 0 0 1D6795 2
  55. 0 32 48 64 80 16 32 48 16 32
  56. 0 0 1D677A 2
  57. 0 0 1D677D 2
  58.  
  59. 573754 01 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  60. )
  61.  
  62. CREATE w
  63. HEX,{ 01 02 }
  64.  
  65. w 10 DUMP
  66. 0 VALUE HERE$
  67. : backup-here HERE TO HERE$ ;
  68. : w->here w DP ! ;
  69. : restore-here HERE$ DP ! ;
  70.  
  71. : mypatcher
  72. backup-here w->here
  73. iHEX,{ 03 00 00 00 05 00 00 00 }
  74. restore-here
  75. ;
  76.  
  77. mypatcher
  78.  
  79. (
  80. 0 0 1D677D 2
  81. 3
  82. 3 0 0 1D6780 2
  83. 3 0
  84. 3 0 0 0 1D6783 2
  85. 3 0 0
  86. 3 0 0 0 0 1D6786 2
  87. 3 0 0 0
  88. 3 0 0 0 0 0 1D6789 2
  89. 3 0 0 0 5
  90. 3 0 0 0 5 0 0 1D678C 2
  91. 3 0 0 0 5 0
  92. 3 0 0 0 5 0 0 0 1D678F 2
  93. 3 0 0 0 5 0 0
  94. 3 0 0 0 5 0 0 0 0 1D6792 2
  95. 3 0 0 0 5 0 0 0
  96. EXCEPTION! CODE:C0000005 ADDRESS:00566828 WORD: EXC:-1073741819 <?WordByAddr
  97. exception>
  98. USER DATA: 001D07D4 THREAD ID: 00001AC0 HANDLER: 0012EEFC
  99. STACK: (5) 7FFD7000 75ABEF6C 001D6774 00000001 001D6774 00000001 [37452445]
  100. RETURN STACK:
  101. 0012EED4 : 0056695F EXC:-1073741819
  102. 0012EED8 : 00566991 EXC:-1073741819
  103. 0012EEDC : 00566A72 EXC:-1073741819
  104. 0012EEE0 : 80000001 EXC:-1073741819
  105. 0012EEE4 : 7FE2DA41 EXC:-1073741819
  106. 0012EEE8 : 00566AC0 EXC:-1073741819
  107. 0012EEEC : 00567C26 EXC:-1073741819
  108. 0012EEF0 : 00567CE2 EXC:-1073741819
  109. 0012EEF4 : 00568371 EXC:-1073741819
  110. 0012EEF8 : 0055516C EXC:-1073741819
  111. 0012EEFC : 0012EF3C EXC:-1073741819
  112. 0012EF00 : 0012FF88 EXC:-1073741819
  113. 0012EF04 : 0056819B EXC:-1073741819
  114. 0012EF08 : 001D6774 EXC:-1073741819
  115. 0012EF0C : 00000006 EXC:-1073741819
  116. 0012EF10 : 00000000 EXC:-1073741819
  117. 0012EF14 : 00000005 EXC:-1073741819
  118. 0012EF18 : 001F1F55 EXC:-1073741819
  119. 0012EF1C : 00000005 EXC:-1073741819
  120. 0012EF20 : FFFFFFFF EXC:-1073741819
  121. 0012EF24 : 00000000 EXC:-1073741819
  122. 0012EF28 : 005681EF EXC:-1073741819
  123. 0012EF2C : 005683AF EXC:-1073741819
  124. 0012EF30 : 0000001C EXC:-1073741819
  125. [...]
  126. 0012EF68 : 0012FF80 EXC:-1073741819
  127. 0012EF6C : 00567A79 EXC:-1073741819
  128. 0012EF70 : 00000004 EXC:-1073741819
  129. 0012EF74 : 001F1F56 EXC:-1073741819
  130. 0012EF78 : 00567C88 EXC:-1073741819
  131. 0012EF7C : 00567CE2 EXC:-1073741819
  132. 0012EF80 : 0055516C EXC:-1073741819
  133. 0012EF84 : 0012EF94 EXC:-1073741819
  134. 0012EF88 : 0012FF88 EXC:-1073741819
  135. 0012EF8C : 0056BA34 EXC:-1073741819
  136. 0012EF90 : 0055516C EXC:-1073741819
  137. 0012EF94 : 0012EFC4 EXC:-1073741819
  138. 0012EF98 : 0012FF88 EXC:-1073741819
  139. 0012EF9C : 0056807D EXC:-1073741819
  140. 0012EFA0 : 00000006 EXC:-1073741819
  141. 0012EFA4 : 00000000 EXC:-1073741819
  142. END OF EXCEPTION REPORT
  143. Exception #-1073741819 at: tm.f:61:2:
  144. w 10 DUMP
  145. ^ 0xC0000005L ACCESS_VIOLATION
  146. )
Runtime error #stdin #stdout #stderr 0s 4272KB
stdin
Standard input is empty
stdout
<4> 0 0 562B7ABC643E 2 
<4> 0 0 562B7ABC6441 2 
<4> 0 0 562B7ABC6444 2 
<4> 0 0 562B7ABC6447 2 
<4> 0 0 562B7ABC644A 2 
<4> 0 0 562B7ABC644D 2 
<4> 0 0 562B7ABC6450 2 
<4> 0 0 562B7ABC6453 2 
<4> 0 0 562B7ABC6456 2 
<4> 0 0 562B7ABC6459 2 
0 32 48 64 80 16 32 48 16 32 
<4> 0 0 562B7ABC643E 2 
<4> 0 0 562B7ABC6441 2 

2AE64C40F9C0: 01 02 FF BF  FE 2F C4 0C - 26 2F                     ...../..&/
<8> 0 2AE64C40FB10 2AE64C40FB30 0 0 0 562B7ABC6441 2 
<5> 0 2AE64C40FB10 2AE64C40FB30 0 3 
<9> 0 2AE64C40FB10 2AE64C40FB30 0 3 0 0 562B7ABC6444 2 
<6> 0 2AE64C40FB10 2AE64C40FB30 0 3 0 
<A> 2AE64C40FB10 2AE64C40FB30 0 3 0 0 0 562B7ABC6447 2 
<7> 0 2AE64C40FB10 2AE64C40FB30 0 3 0 0 
<B> 2AE64C40FB30 0 3 0 0 0 0 562B7ABC644A 2 
<8> 0 2AE64C40FB10 2AE64C40FB30 0 3 0 0 0 
<C> 0 3 0 0 0 0 0 562B7ABC644D 2 
<9> 0 2AE64C40FB10 2AE64C40FB30 0 3 0 0 0 5 
<D> 3 0 0 0 5 0 0 562B7ABC6450 2 
<A> 2AE64C40FB10 2AE64C40FB30 0 3 0 0 0 5 0 
<E> 0 0 0 5 0 0 0 562B7ABC6453 2 
<B> 2AE64C40FB30 0 3 0 0 0 5 0 0 
<F> 0 0 5 0 0 0 0 562B7ABC6456 2 
<C> 0 3 0 0 0 5 0 0 0 

stderr
in file included from *OS command line*:-1
prog.4th:75: unstructured 
>>>;<<<
Backtrace:
$2AE64C3BC988 throw 
$2AE64C3CCC88 c(abort") 
$2AE64C3C58D0 ?struc