mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-09-07 20:54:27 +00:00
1 line
12 KiB
Plaintext
1 line
12 KiB
Plaintext
|
\ ks 22 dez 87 Some simple tools for debugging. A state-of-the-art, interactive single step tracer and a couple of tools for decompiling and dumping \ Trace Loadscreen ks cas 25sep16 Onlyforth \needs Assembler 2 loadfrom asm.fb Vocabulary Tools Tools also definitions 1 9 +thru Onlyforth .( Tools geladen) cr \ trace - next ks 11 jun 87 | Variable nest? nest? off Label tracenext 0 # nest? #) byte cmp 0= ?[ $5555 # I cmp here 2- >label (ip >= ?[ [[ swap lods A W xchg W ) jmp ]? $5555 # I cmp here 2- >label ip) CS ?] ][ 0 # nest? #) byte mov ]? $5555 # W mov here 2- >label >tracing W ) jmp end-code | (ip Constant <ip | ip) Constant ip> | : (debug ( addr -- ) dup <ip ! BEGIN 1+ dup @ ['] unnest = UNTIL 2+ ip> ! ; \ install Tracer ks 11 jun 87 Label (do-trace next-link # W mov D push $E9 # A- mov tracenext 1+ # C mov [[ W ) W mov W W or 0= not ?[[ A- -4 W D) mov C D mov W D sub D -3 W D) mov ]]? D pop ret end-code Code do-trace (do-trace # call Next end-code ' end-trace Alias end-trace | Code (step (do-trace # call R ) I mov R inc R inc lods A W xchg W ) jmp | Create: nextstep (step ;
|