CE Lab Report 4 Encoding and Decoding Morse Code Brandon Gomez Lab Section: 2 11.14.14
CE Lab Report 4 Encoding and Decoding Morse Code Brandon Gomez Lab Section: 2 11.14.14
Lab
Report
4
Encoding
and
Decoding
Morse
Code
Brandon
Gomez
Lab
Section:
2
11.14.14
PROCEDURE:
The
purpose
of
this
lab
is
to
get
familiar
of
using
JSR
and
Stacks
in
LC-3
assembly.
We
should
also
get
familiar
of
converting
Morse
hex
to
a
string
and
string
to
Morse
binary.
Our
program
will
be
starting
at
x3000
and
will
be
storing
the
input
at
x3201
through
x3220
and
the
output
at
x3221
through
x3240.
Moreover,
if
the
user
encodes
SOS
into
Morse,
the
program
will
produce
the
output:
FOSOFO. If the user wants to decode a Morse message of
B810B8, the output will be LOL.
MATERIALS:
Orgin / .ORIG xXXXX / 0110 xXXXX
Tells the program where to start
AND DR, SR1, SR2 / 0101 DR SR1 0 00 SR2
This AND ands SR1 and SR2 and stores the result into DR
AND DR, SR1, imm5 / 0101 DR SR1 1 imm5
This AND ands SR1 and the digit and stores the result into DR
ADD DR, SR1, SR2 / 0001 DR SR1 0 00 SR2