Sunteți pe pagina 1din 10

LAB 1 DISCUSSION

1
WELCOME TO EECS 20
 Lecture Session
 MW 6:30 – 7:50 PM
 EH 1200
 Main content of the course
 Discussion Sessions
 M 12pm, 1pm, 2pm, 3pm
 PCB 1300
 Discussion of assignments
 Lab Sessions
 Tu 11AM, 1PM, 3PM, 5PM
 PCB 1300
 Work on your assignments
 Questions after lab sessions?
 EEE Message Board
 Office Hour (Posted on the Website) 2
LAB 1
 Part (a)
 Download and Install LC-3 Simulator
 Go to this link
 http://highered.mheducation.com/sites/0072467509/student_
view0/lc-3_simulator.html
 There are 2 important files
 LC-3Edit.exe
 This is where you will load and write your code/lab

assignments
 Simulate.exe

 You will load the program you wrote in LC3Edit.exe into

Simulate and see the output

3
LAB 1
 Part (b)
 Open LC-3Edit.exe
 Copy and paste the following example:

.ORIG x4000
LEA R0, L1
TRAP x22
LEA R0, L2
TRAP x22
TRAP x25
L1 .STRINGZ "Dear Student"
L2 .STRINGZ "Welcome to
EECS20"
.END
4
TRAP INSTRUCTIONS
 What does TRAP x22 do?

 What does TRAP x25 do?

5
LAB 1
 Part (b)
 Save the file as Lab1.asm

 Click on Translate

 Then, click on assemble

 Your program is converted into Lab1.obj

6
LAB 1
 Part (c)
 Open Simulate.exe

 Load Lab1.obj

 Click Simulate

 Set location value to x4000

 Click Execute and Run

7
LAB 1
 Part (d)
 Modify code from part (b)
 Your program should display
 Your Major
 Your First Name

 Your Last Name

 Spring 2016

In four separate lines

8
LAB 1
 Part (e)
 Modify the program from part (b) by changing
 “.ORIG x4000” to “.ORIG x5000”
 Observe the changes
 Paste 2 screenshots to your word file (One at x4000
and one at x5000)
 Part (f)
 Explain the use of
 “.ORIG”
 “TRAP x22”
 “TRAP x25”
9
WHAT TO SUBMIT
 A doc file containing
 Answers to Part D, E and F
 1. Paste your code for Part (d)
 2. Paste 2 screenshots from Part (e)
 3. Answers to Part (f)

 Deadline
 Sunday, 11:55PM

10

S-ar putea să vă placă și