Last name ________________ First name _________________
Section _________
CSE378 Autumn 2003
Miniquiz #4
Thu 10/16/2003
1 pt. per part except as noted
No calculators!

A. Mark each one A for architecture (part of the hardware specification of the machine) or C for convention (generally or even always observed by software but not required by architecture).


B. (4 pts.) A piece of MIPS code in your company's product includes these lines:

check:
    bne   $a0, $t3, notOK
    addi   $v0, $0, 13
    j         alldone
notOK:
    addi   $v0, $0, 14
alldone:
...

It is discovered that the first instruction is wrong: it should have been
    bne   $a0, $t4, notOK

In order to "patch" the program without making a new release of the software, you need to figure out what the correct machine language is for that instruction.   What should the patch be (in hex)?    (The address of "notOK" is 0x400504, in case you really want to know).