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

	
stderr
in file included from *OS command line*:-1
prog.4th:29: expected dest 
	>>>REPEAT<<<
Backtrace:
$2AED2CA42988 throw 
$2AED2CA52640 c(abort") 
$2AED2CA532B0 dest? 
$2AED2CA53480 AGAIN