Assume that Q is an array of 32-byte records and the VAL field is in the first
Fantastic news! We've Found the answer you've been seeking!
Question:
Assume that Q is an array of 32-byte records and the VAL field is in the first 4 bytes of each record. Using x86 code, we can compile this program fragment as follows:
MOV ECX,1 ;use register ECX to hold I
LP: IMUL EAX, ECX, 32 ;get offset in EAX
MOV EBX, Q[EAX] ;load VAL field
ADD S, EBX ;add to S
INC ECX ;increment I
CMP ECX, 101 :compare to 101
JNE LP ;loop until I 100
Interpret them.
Related Book For
Posted Date: