lecture04 - 0306-250 Assembly Language Programming Lecture...

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: 0306-250 Assembly Language Programming Lecture Four: Shift, Logical, and Unconditional Branch Instructions • Logical Shift • Rotate (Circular Shift) • Not, And, Or, and Xor • Unconditional Branch • Condition Codes General Classes of Assembly Language Instructions • Data Movement • Data Operation – Arithmetic – Logical – Shift • Program Control – Unconditional – Conditional 2 Logical Shift Instructions S12CPUV2 Reference Manual, p. 66 3 Logical Shift Left S12CPUV2 Reference Manual, p. 223 4 Logical Shift Right S12CPUV2 Reference Manual, p. 227 5 Rotate (Circular Shift) Instructions S12CPUV2 Reference Manual, p. 66 6 Rotate Left S12CPUV2 Reference Manual, p. 263 7 Rotate Right S12CPUV2 Reference Manual, p. 266 8 Logic Instructions • AND: AND • OR: OR • XOR: EOR 9 AND S12CPUV2 Reference Manual, p. 108 10 OR S12CPUV2 Reference Manual, p. 243 11 EOR S12CPUV2 Reference Manual, p. 179 12 Logic Instructions Uses • Boolean data operations • Bit masks: affect only certain bits while others remain unchanged – Clear specific bits: AND – Set specific bits: OR – Invert specific bits: EOR 13 Unconditional Branch Instructions • Change program flow – “Goto” instructions – Necessary in assembly language • JMP Label Absolute address specification • BRA Label Relative offset specification (8 bits) 14 JMP Label S12CPUV2 Reference Manual, p. 194 15 BRA Label S12CPUV2 Reference Manual, p. 136 16 ...
View Full Document

This note was uploaded on 05/06/2010 for the course EECC 0306-250 taught by Professor Roymelton during the Fall '10 term at RIT.

Ask a homework question - tutors are online