Return to tools.fs CVS log | Up to [gforth] / gforth |
Added dump handling for incomplete lines
1: \ TOOLS.FS Toolkit extentions 2may93jaw 2: 3: \ May be cross-compiled 4: 5: hex 6: 7: \ .S CORE / CORE EXT 9may93jaw 8: 9: variable maxdepth-.s 10: 9 maxdepth-.s ! 11: 12: : .s ( -- ) 13: ." <" depth 0 .r ." > " 14: depth 0 max maxdepth-.s @ min 15: dup 0 16: ?do 17: dup i - pick . 18: loop 19: drop ; 20: 21: \ DUMP 2may93jaw - 9may93jaw 06jul93py 22: \ looks very nice, I know 23: 24: Variable /dump 25: 26: : .4 ( addr -- addr' ) 27: 3 FOR -1 /dump +! /dump @ 0< 28: IF ." " ELSE dup c@ 0 <# # # #> type space THEN 29: char+ NEXT ; 30: : .chars ( addr -- ) 31: /dump @ bounds 32: ?DO I c@ dup 7f bl within 33: IF drop [char] . THEN emit 34: LOOP ; 35: 36: : .line ( addr -- ) 37: dup .4 space .4 ." - " .4 space .4 drop 10 /dump +! space .chars ; 38: 39: : dump ( addr u -- ) 40: cr base @ >r hex \ save base on return stack 41: 0 ?DO I' I - 10 min /dump ! 42: dup 8 u.r ." : " dup .line cr 10 + 43: 10 +LOOP 44: drop r> base ! ; 45: 46: \ ? 17may93jaw 47: 48: : ? @ . ; 49: 50: \ INCLUDE see.fs 51: