version 1.5, 2000/06/02 19:20:19
|
version 1.6, 2000/06/03 07:56:03
|
Line 20
|
Line 20
|
|
|
\ this disassembler is based on data from the R4400 manual |
\ this disassembler is based on data from the R4400 manual |
\ http://www.mips.com/Documentation/R4400_Uman_book_Ed2.pdf, in |
\ http://www.mips.com/Documentation/R4400_Uman_book_Ed2.pdf, in |
\ particular pages A3,A181,A182 (offset 468 pages in xpdf). |
\ particular pages A3, A181, A182 (p. 471, 649, 650 in xpdf). |
\ it is limited to the R3000 (MIPS-I) architecture, though. |
\ it is limited to the R3000 (MIPS-I) architecture, though. |
|
|
\ instruction fields |
\ instruction fields |
Line 55
|
Line 55
|
|
|
: disasm-relative ( addr n -- w ) |
: disasm-relative ( addr n -- w ) |
\ compute printable form of relative address n relative to addr |
\ compute printable form of relative address n relative to addr |
nip ( + ) ; |
2 lshift nip ( + ) ; |
|
|
\ decode tables |
\ decode tables |
|
|
Line 128 $40 disasm-table cp0-tab-entry \ COP
|
Line 128 $40 disasm-table cp0-tab-entry \ COP
|
|
|
: disasm-J-target ( addr w -- ) |
: disasm-J-target ( addr w -- ) |
\ print jump target |
\ print jump target |
$3ffffff and swap $fc000000 and or hex. ; |
$03ffffff and swap $fc000000 and or 2 lshift hex. ; |
|
|
: disasm-I-rs,rt,imm ( addr w -- ) |
: disasm-I-rs,rt,imm ( addr w -- ) |
dup disasm-rs . |
dup disasm-rs . |