home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / forth / compiler / fpc / source / alist.seq < prev    next >
Text File  |  1990-12-16  |  1KB  |  48 lines

  1. \ ALIST.SEQ             Assembler listing
  2.  
  3. dis6805 also
  4.  
  5. : %.inst        ( -- )
  6.                 linestrt lihere <>
  7.                 if      save> base hex
  8.                         cr
  9.                         linestrt cp !
  10.                         linestrt 0 <# # # # # #> type 2 spaces
  11.                         inst
  12.                         restore> base
  13.                 then    lihere =: linestrt ;
  14.  
  15. : ?.#dis        ( a1 n1 -- )            \ disassemble n1 bytes at a1
  16.                 @> .inst ['] %.inst =
  17.                 if      save> base hex
  18.                         over cp ! +
  19.                         begin   cp @ over u<
  20.                         while   cr
  21.                                 cp @ 0 <# # # # # #> type 2 spaces
  22.                                 inst
  23.                         repeat  drop
  24.                         restore> base
  25.                         cp @ =: linestrt
  26.                 else    2drop
  27.                 then    ;
  28.  
  29. : /code         ( -- )
  30.                 ['] %.inst is .inst ;
  31.  
  32. : /codeoff      ( -- )
  33.                 ['] noop is .inst ;
  34.  
  35. ' /code     alias /cod
  36. ' /codeoff  alias /nocode
  37.  
  38. ?cs: =: dumpseg
  39.  
  40. /codeoff
  41.  
  42. : .alist        ( -- )
  43.  
  44. cr ." /code        = Enable  the listing of assembly code."
  45. cr ." /codeoff     = Disable the listing of assembly code ..... (default)."
  46.                    ;
  47.  
  48.