Answer :- 1) The number of bytes allocated can be known by using the letter 'W' or 'B' just after DS in the declaration of the variable. W means word and one word = 2 bytes. B means a single byte.
So, va has a sigle byte.
vb has 5 bytes.
vc has (2x4) = 8 bytes.
vd has (1x4) = 4 bytes.
ve has (2x6) = 12 bytes.
Answer :- 2) The content of register has been written in comment in the figure below-
2. For cach of the instructions highlighted (boldface), derive the effective address of the memory variable (source) if any mmory variable is involved, and the contents of the register a or d (whichever one involved) right after the instruction is executed. Answer in hexadecl. Assume that all bytes in the variables va, vb and vc are initially zero. ORG Idaa idd Idd ROMStart #812 #$802 $802 D value at memory $802 ;A = $12 $802 ;D :A = value in va = 0 ;A = value at location $810 10 #vd ldx ldaa 0.5 ;A = value at location which is kept in register x daa ldaa2,+x first x-x+1, then A-value at location(x+2) 3.x ;A = value at location (x+3) aaLxA-value at location(x+1) then x-x-1 ldab ldaa ldx Idaa idd #2 b.x A-value at location (x+b), note b -2 #8802 l$14M ;x=$802, add $14 gives $816. Get value at $816, let it #22 be z. Now find the value stored at this address z and ldaa [d.x keep this value in A. first find the value at (d+x), let it be z. Now assuming z as an address find the value at z, keep this value in A.
Thanks for the help 1. How many bytes are allocated in total for the variables (va...
1. How many bytes are allocated in total for the variables (va, vb, vc, vd, and ve)? 2. For each of the instructions highlighted (boldface), derive the effective address of the memory variable (source) if any memory variable is involved, and the contents of the register a or d (whichever one involved) right after the instruction is executed. Answer in hexadecimal. Assume that all bytes in the variables va, vb and vc are initially zero. $0800 RAMStart EQU EQU ROMStart...