This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Microprocessors HW #2 Joshua Scazzero #558617 CPE-286 Chapter 5 (question 45, page 227; question 47, page 227; question 49, page 228) Chapter 6 (question 21, page 293; question 23, page 293) Due: 10/05/06 send to [email protected] Chapter 5 #45 Write a program that will read the word ASCII_DATA, to the current data segment of memory. Disassemble the two bytes and save them as separate characters in the lower byte location, as ASCII_CHAR_L and ASCII_CHAR_H. Use an SHR instruction to relocate the most significant bits. Make the upper eight bits in each of these character storage locations zero. (Note: SHR stands for Shift Logical Right, it shifts right whatever you put as inputs and fills the remaining bits with zero.) Solution: MOV AX, [ASCII_DATA]--Gets the word into AX MOV BX, AX--And BX MOV CL, 08H--This is the bit count set equal to CL SHR BX, CL-- BX gets set equal to the higher character....
View Full Document
This note was uploaded on 11/10/2011 for the course COMPUTER E 444 taught by Professor Amigo during the Fall '10 term at Al-Quds University.
- Fall '10