whatever way you can get it to work is fine - like if you need to put the 901 and the 399 and all that stuff. totally doesn't matter to me as this is due in less than 2 hours
Little Man Mnemonic Instruction Codes with
Their Corresponding OP Codes
COB or HLT
Coffee break (or Halt)
Branch if zero
Branch if positive or zero
Data storage location
(the first ‘‘m’’ is silent). Once you learn to read these mnemonics, you’ll find that programs
written with mnemonics are generally easy to read. It is more common to write programs this
way. For a while, we will continue to print both the mnemonic and the code, but eventually,
we will stop printing the code. Most programs are also written with comments, which help
to clarify the code. The mnemonic instructions that we will use are shown in Figure 6.3.
DAT abbreviation is used to indicate that a particular mailbox will be used to store data.
The data may be specified in advance, for example, to use as a constant, or it may be zero if
the particular location is to be used to store the data later, during execution of the program.
The program, shown in Figure 6.4, works as follows: the first four instructions simply
input and store the two numbers. The fifth instruction, in mailbox 04, subtracts the first
LMC Program to Find Positive Difference of Two
negative; reverse order
print result and
used for data