190 likes | 459 Views
Prev:LoopsToday:Shift and Rotation. Shift and Rotate InstructionsThe 68HCS12 has shift and rotate instructions that apply to a memory location, accumulators A, B and D. A memory operand must be specified using the extended or index addressing modes. Logical ShiftShift Left (Memory,A,B
E N D
1. ECE3120: Computer SystemsShift and Rotation Dr. Xubin He
http://iweb.tntech.edu/hexb
Email: hexb@tntech.edu
Tel: 931-3723462, Brown Hall 319
2. Prev:
Loops
Today:
Shift and Rotation
4. Logical Shift
5. Arithmetic Shift
6. Rotation (Cyclic Shift)
13. Bit Test and Manipulate Instruction Bclr,bita,bitb,bset
Examples:
Bclr 0,x,$81
Bita #$44
Bitb #$22
Bset 0,y,$33
17. Chapter Review Assembly Language Program Structure:
Label, operation, operand, comment
Directives: end,org,db,ds,fill
Flow chart
Arithmetic
Loops, branch instructions
Shift and rotate
Boolean logic
Bit test and manipulate
Program execution time
18. Now, you should be able to:
Allocate memory blocks, define constants, and create a message using assembler directives
Write assembly programs to perform simple arithmetic operations
Write loops to perform repetitive operations
Use loops to creat time delays
Use boolean and bit manipulation instructions to perform bit field operations.
19. Next:
Work examples
Chapter 3