
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: COMPUTER SYSTEMS; Subject: Electrical and Computer En; University: Auburn University - Main Campus; Term: Fall 2008;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

ELEC 2220 - Computer Systems Homework # Due: Friday, 10-3-
For example, if you type the number 135876 on the keyboard, the characters would be stored in memory as follows: STRG => '1' (31h) - Most significant digit (100000’s) STRG+1 => '3' (33h) – Next most significant digit (10000’s) STRG+2 => '5' (35h) – Next most significant digit (1000’s) STRG+3 => '8' (38h) - Next most significant digit (100’s) STRG+4 => '7' (37h) – Next most significant digit (10’s) STRG+5 => '6' (36h) - Least significant digit (1’s)
Your program is to convert this to packed BCD format. The above would be stored in memory (most significant byte first) as follows: PACK => 13h PACK+1 => 58h PACK+2 => 76h
Demonstrate your program in CodeWarrior by initializing the six bytes of STRG as shown above, and the three bytes of PACK to 00. Print the debug window showing the final values of these memory locations after executing the program. (You might also want to test your program on additional sets of data.)
Demonstrate your program in CodeWarrior by initializing the six bytes of STRG to 00, and the three bytes of PACK to the values shown above. Print the debug window showing the final values of these memory locations after executing the program.