quiz2 (1) - 7-11-2007 BILKENT UNIVERSITY Department of...

Info iconThis preview shows pages 1–2. 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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 7-11-2007 BILKENT UNIVERSITY Department of Electrical and Electronics Engineering EEE212 Microprocessors QUIZ-2 open book Duration: 45 minutes Surname:_______________________________________ Q1 ( 80 points) Name:_________________________________________ Q2 ( 20 points) ID-Number:_____________ TOTAL SECTION: ____1_______ Signature:_______________________________________ 1) (80 pts) Write an assembly language procedure with the name FIND_STRING that would find the count of the string ‘AB’ in the internal RAM locations 30h-FFh assuming a 8052 available at hand that implements the upper memory locations 80hFFh. The final count should be returned in R4 in packed BCD. As an example below, we have the string ‘AB’ three times in the specified memory range and therefore the value 03h should be returned in R4. Your procedure should work for any scenario and not only for this example and you should use comments for readability purposes. 8052 Lower-upper memory range 30h-FFh Byte Address Value FFh ‘B’ FEh ‘A’ 81h ‘B’ 80h ‘A’ 31h ‘B’ 30h ‘A’ FIND_STRING: RET 2) (20 pts) a. Write the decimal number -2561 in 16 bit signed arithmetic b. What is the decimal equivalent of FEDCh if we are using 16 bit signed arithmetic? ...
View Full Document

Page1 / 2

quiz2 (1) - 7-11-2007 BILKENT UNIVERSITY Department of...

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

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