5 - 1 BME 303 Lecture 16 Reminder: I am canceling Tuesday...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 BME 303 Lecture 16 Reminder: I am canceling Tuesday office hours will be available after class on both Tuesday and Thursday instead 2 Being Returned Circulating: Daily quizzes from before exam that werent claimed yet last time (after this, get them at Friday office hours) Corrected HW #1s that werent claimed yet last time (after this, get them at Friday office hours) Some corrected HW #2s (see following) HW #3s that werent claimed Returning corrected exams 3 Remaining Grading Issues Exam #1 bonus points Are there any HW #3 grading issues? (Im unaware of anything widespread.) HW #2 issues: 2.37: incorrectly marked off for not having parentheses: [ ( nms ) + ( nms ) ]1000 2.48: correctly marked off for not having leading zeros in parts a, c. Losing all points is overly harsh, however; return to be adjusted if that happened. Other miscellaneous problems 4 Machine Language to Assembly As youve seen, calculating your offsets and translating your commands to binary is a tedious, detailed, mathematical process prone to human error Computers exist to perform tedious, detailed, mathematical processes lets make the computer do the translation to binary machine code! 5 Assembly Language High-level Language Program Assembly Language Program Machine Language Program Compiler Assembler Programmer Programmer f Computer Computer Computer Instead of writing in machine code, we can write our programs using a more friendly programming language: Assembly language (now) C++, MATLAB, LabVIEW (later) System software provides us with software tools to translate programs into machine code: Assembler / Compiler Interpreter 6 The Instruction Mnemonics Mnemonic: A system to develop or improve the memory. Better term: Symbolic Name ADD, AND, NOT, LD, LDI, LDR, LEA , ST, STI, STR, BR, TRAP, JMP, JSR/JSSR, RTI Still have a one-to-one correspondence with Machine Language Instructions 7 Weve seen mnemonics already: 0001 010 010 1 00101 ADD R2 R2 #5 0101 010 010 1 00000 AND R2 R2 #0 0011 010 111111011 ST R2 #-5 0001 010 001 1 01110 ADD R2 R1 #14 1110 001 111111101 LEA R1 #-3 Instruction R2 R2 + 5 = 5 R2 AND x0000 = x0000 R2 PC +1-5 = x30F9 - 5 = x30F4 M[0x30F4] R2 R2 R1 + 14 = x3102 PC +1 = x30F7 R1 PC +1 - 3 = x30F4 Comments x30FA x30F9 x30F8 x30F7 x30F6 Address 8 Synonymous Instructions RET = JMP R7 HALT = TRAP x25 BR = BRnzp Number Base Designation x1000 is hexadecimal #22 is decimal (can be negative) No designation: decimal (?) 9 Instruction Format In the LC-3 assembly language, instead of instructions being 16-bit words, they have the following format: LABEL OPCODE OPERANDS ;COMMENTS The OPCODE and OPERAND parts are mandatory; the LABEL and COMMENTS parts are optional OPCODE is a symbolic name for the 4-bit opcode of the corresponding LC-3 machine language (ML) instruction OPERANDS are likewise symbolic names 10...
View Full Document

This note was uploaded on 09/06/2009 for the course BME 303 taught by Professor Ren during the Spring '08 term at University of Texas at Austin.

Page1 / 55

5 - 1 BME 303 Lecture 16 Reminder: I am canceling Tuesday...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online