Question: Help with Java, need to complete missing partsPROBLEM The Motorola 6 8 0 0 0 family of CPUs is a Complex Instruction Set Computer (

Help with Java, need to complete missing partsPROBLEM
The Motorola 68000 family of CPUs is a Complex Instruction Set Computer (CISC); ie, there
are many formats, lengths, etc. We will consider only four instructions with a single addressing
mode. An instruction in assembly language is written like
ADD.W D3,D5
That instruction says to add a "word" (16-bit) value from data register 3 to the value in data
register 5. In machine language, the instruction looks like
Binary
Hex
1101011001000101
D645
The format of the instructions that we will consider is
where "s" is the size of the data
and "x" and "y" are register numbers (0-7).
ASSIGNMENT
You will be given a Java application with a graphical user interface that allows a user to encode
and decode M68000 instructions. The user will enter a four digit hex number or 16 digit binary
number and request that it be decoded into assembly language or enter an assembly language
instruction and request that it be encoded into hex and binary representations. You must write the
code for the methods encode(), decodeBin(), and decodeHex() which are called from the
actionPerformed method when a button is pressed. Your program needs to encode/decode only
the four instructions shown above.
Display an error message if the input cannot be encoded/decoded.
Your program must check for all possible errors.
NOTE: This lab is intended to give you experience in using bitwise operators. You must
encode/decode the machine instruction as a short (or an int) and convert to a String only for
display. Do not use a String to manipulate the machine language instruction. You may use a
String to manipulate assembly language instruction.
Use the code in the file "Lab1.java". Do not change any of that code. You should only fill in
the three methods at the end.
 Help with Java, need to complete missing partsPROBLEM The Motorola 68000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!