home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / MISC / FPC355_4.ZIP / TCOMSRC.ZIP / ALIST.SEQ next >
Encoding:
Text File  |  1991-02-20  |  1.9 KB  |  70 lines

  1. \ ALIST.SEQ             Assembler listing
  2.  
  3. dis8086 also forth definitions 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.                 ?code
  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. ' %?.#dis is ?.#dis             \ install in compiler
  30.  
  31. : /code         ( -- )
  32.                 ['] %.inst is .inst
  33.                 on> ?code ;
  34.  
  35. : /codeoff      ( -- )
  36.                 ['] noop is .inst
  37.                 off> ?code ;
  38.  
  39. ' /code     alias /cod
  40. ' /codeoff  alias /nocode
  41.  
  42. ?cs: =: dumpseg
  43.  
  44. /codeoff
  45.  
  46. : /lst          ( -- )          \ enable the creation of a listing file
  47.                 /code           \ include output code
  48.                 /src            \ and source code
  49.                 on> ?lst ;
  50.  
  51. ' /lst alias /list
  52.  
  53. : /lstoff       ( -- )          \ don't build a listing file
  54.                 off> ?lst ;
  55.  
  56. ' /lstoff   alias /nolst
  57. ' /lstoff   alias /nolist
  58. ' /lstoff   alias /listoff
  59.  
  60. /lstoff
  61.  
  62. : %.alist       ( -- )
  63.  
  64. cr ." /code        = Enable  the listing of assembly code."
  65. cr ." /codeoff     = Disable the listing of assembly code ..... (default)."
  66.                    ;
  67.  
  68. ' %.alist is .alist
  69.  
  70.