Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Adrian Hendels
abh12@students.uwf.edu
Dept. of Electrical & Computer Engineering
University of West Florida
Course: EEL4744L Spring 2015
September 30, 2015
Objective:
Introduce students to writing and testing a program in HC11 assembly language and using the BUFFALO
I/O routines to display/verify the results.
Introduction/Expectations:
In this lab we will the skills learned in lab two, in order to write and create a program which multiplies a 3
bit number with a 1 bit number, and saves the result at memory locations $04- $07. We will do so by
following each procedure laid out in the lab manual, in order to write a program which performs this task.
This program can be explained by the following figure which was given in the lab report.
Procedure:
Following the procedures laid out in the lab report, I was able to generate the following code shown
below.
*AdrianHendels
*LAB03
M
N
P
P1
P2
P3
ORG
$00
RMB
RMB
RMB
RMB
RMB
RMB
3
1
4
2
2
3
;ALLOCATEMEMORYFORM
;ALLOCATEMEMORYFORN
;ALLOCATEMEMORYFORP
;ALLOCATEMEMORYFORP1
;ALLOCATEMEMORYFORP2
;ALLOCATEMEMORYFORP3
ORG
LDAA
LDAB
MUL
STAB
STAA
LDAA
LDAB
MUL
STD
LDAA
LDAB
MUL
STD
LDAA
ADDA
STAA
LDAA
ADCA
STAA
LDAA
ADCA
STAA
SWI
$100
M+2
N
;PUTPROGRAMINRAM
;READMULLSBTOA
;READMULTIPLIERTOB
;MULTIPLYA&B
;STOREBTOPRODLSB
;STOREATOP1MSB
;READMULMIDTOA
;READMULTIPLIERTOB
;MULTIPLYA&B
;STOREDTOP2
;READMULMSBTOA
;READMULTIPLERTOB
;MULTIPLYA&B
;STOREDTOP3
;READP1MSBTOA
;ADDP2LSB
;STORESUMTOPRODMIDL
;READP2MSBTOA
;ADDW/CARRYP3LSB
;STORESUMTOPRODMIDH
;READP3MSBTOA
;ADDW/CARRYZERO
;STORESUMTOPRODUCTMSB
P+3
P1
M+1
N
P2
M
N
P3
P1
P2+1
P+2
P2
P3+1
P+1
P3
#0
P
When executing the above code, I received the following results. I will show 5 different executions of the
code when multiplicand N holds different values. This will show that the program performs the expected
operations, and stores them in the appropriate memory locations.
NOTE: I have denoted the 3 bit multiplicand M by yellow highlight, 1 bit multiplicand N by green
highlight, and 4 bit product P by red highlight.
>LOAD T
done
>G 0100
P-0129 Y-FFFF X-FFFF A-37 B-BC C-D0 S-0041
>MD 00 0
0000 A4 79 C8 57 37 E5 62 F8 43 FF 29 1F 37 BC FF FF
y W7 b C )
# @
N8
Conclusion:
In conclusion the lab was completed successfully. Every execution of the code produced accurate results,
as shown in figures 2-6. The instructions included in this lab were concise enough for one to write and
test this program and achieve the desired results.