| 4.5 Bit fields, rotate instructions, and shift instructions |
rcl, rcr, rol & ror
Read IA-32 Volume 2b [5]
sal, sar, shl & shr
Read IA-32 Volume 2b [5]
bt, btc, btr & bts
Read IA-32 Volume 2a [4]
AND clearing fields
OR setting fields
XOR flipping bits
; swap upper and lower case
mov AH, AL ;save a copy
and AL, ~0x20 ;Convert to lower
cmp AL, 'A'
jl nochg ; below A - no change
cmp AL, 'Z'
jg nochg ; Above Z - no change
xor AH, 0x20 ; A letter - flip case bit
nochg: mov AL, AH ; Put result in AL
In this lab you will decode some numbers and print the results. The numbers represent a coded Moris Code. Moris Code, the 8086/Pentium instruction set, the code used in this lab, and data compression techniques use variable length codes.
AND off the low 8 bits. If the number is zero exit.
_".
.".
Test your program with the following numbers:
Turn in a printed error free listing and the output of your program for all of the requested tests. If the Moris Code doesn't contain something related to the class, one of us did something wrong!
| 4.5 Bit fields, rotate instructions, and shift instructions |