Diff for /gforth/arch/alpha/disasm.fs between versions 1.2 and 1.3

version 1.2, 1999/10/13 13:00:08 version 1.3, 2000/06/17 12:01:55
Line 4 Line 4
   
 \ util  \ util
   
 : h@ ( addr -- n )  \ 32 bit fetch  require asm.fs
 dup dup aligned = if  
   @  \  : h@ ( addr -- n )  \ 32 bit fetch
   $00000000ffffffff and  \  dup dup aligned = if
 else  \    @
   4 - @  \    $00000000ffffffff and
   $20 rshift  \  else
 endif  \    4 - @
 ;  \    $20 rshift
   \  endif
   \  ;
   
   also assembler
   vocabulary disassembler
   get-current
   also disassembler definitions
   
 create string_table  create string_table
 1000 allot  1000 allot
Line 415  create opcode_table Line 422  create opcode_table
   
 drop \ string_table end  drop \ string_table end
   
 : decode_inst ( n -- )  \ instruction decoder  set-current
   
   : disasm-inst ( n -- )  \ instruction decoder
   dup $fc000000 and    dup $fc000000 and
   26 rshift cells    26 rshift cells
   opcode_table +    opcode_table +
Line 424  drop \ string_table end Line 433  drop \ string_table end
   $2c emit cr    $2c emit cr
 ;  ;
   
 : disasm ( addr n -- )  \ disassembler  : disasm ( addr u -- )  \ gforth
 cr 0      \G disassemble u aus starting at addr
 ?do      cr bounds
   dup h@      u+do
   over $28 emit space . $29 emit space          ." ( " i hex. ."  ) "
   decode_inst          i h@ disasm-inst
   4 +          4
 loop      +loop ;
 drop  
 ;  ' disasm is discode
   
   previous previous

Removed from v.1.2  
changed lines
  Added in v.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>