{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw10 - University of Florida EEL 3701 Dr Eric M Schwartz...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
University of Florida EEL 3701 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering HOMEWORK 10 Page 1/1 Revision 0 Note: Late HW is not accepted! HW is due at the beginning of class. Put your “last name, first name” and the HW number in the top right hand corner of the first page of all HW assignments. Staple your pages together. Do not put your social security number or your UF ID number on your HW. 1. List all the addressing modes for the G-CPU and provide short examples of code for each addressing mode. 2. a) Hand-assemble the following code. Briefly explain (but in detail) the function of this code. ORG $0 ; assembler directive (origin) to tell where code will be placed in memory LDX #$1100 ; pointer to data LDAA #$10 ; counter value STAA $1200 ; counter will be saved in memory to free up a CPU register LOOP: LDAA 0,X ; get 1 st data value LDAB $10,X ; get 2 nd data value SUM_AB ; data1 + data2 SHFB_R ; divide sum by 2 STAB $20,X ; store average. value INX ; increment pointer LDAB #$FF ; -1 in 2’s complement format LDAA $1200
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Ask a homework question - tutors are online