Question: find the initial values the assembler will generate for each the directives given below result using 2 hex digits for each byte generated. note and
find the initial values the assembler will generate for each the directives given below result using 2 hex digits for each byte generated. note and skip any errors . a. byte1 BY T E 1 1 0 1 0 1 1 1 B b. b y te2 B Y TE 65 Q c. byte3 BYTE 0 F B H d. b y te4 B Y TE 1 1 9 e. b y te5 B Y TE - 7 7 f. byte6 BY T E ' T ' g. b y te7 B Y TE " I Come To Bury Caesar, Not To Praise Him ", 0 D H,0AH , 0 h. b y te8 B Y TE 1 0 1, 1 0 2, 1 0 3, 1 0 4 , 1 0 5, 1 0 6, 1 0 7, 1 0 8 i. b y te9 BY T E 1 5 DUP ( * ) j. dwrd1 DWORD 2 00 0 0 0 2 H k. dw r d2 D W ORD 20 DUP(0) l. drwrd3 D W ORD 2 000 00 2 Q n. d w r d5 DWORD 5 1 4 2 o. q wrd1 Q W ORD - 6 1 p. q w r d2 Q W ORD CC DD EE FF AA BB 99 FFH q. Create the M e mory Map t hat results i f t h e data declar a tions a b ove are c ons i dered to be d one in the seque n ce sh o wn. That is, indicate the amounts of storage space used or reserved . 2 . For ea c h f o llowing, a s sume the Bef or e values w he n t h e given in struct i on is exec u ted. G i ve t he request e d A f ter v a lues. Notes: MOVZX adds leading zero es (0) to fill up the destination storage MOVSX adds copies of the sign in the source storage as leading values to fill up the destination storage. XCHG: exchanges the values of the given pair of storage locations . The Status Flags are set according to the result obtained: ZF: zero flag, SF: sign flag , OF: overflow flag, PF: parity flag a ) ; Bef o re: E BX: FF EE FF D A H; ECX: A BCD 01 F 2H M O V E BX, ECX; ; Aft e r: EAX, E BX, E CX , AH, AL, BH, BL, CH, CL b ) ; Bef o re: E BX: F FBD 3A D C H; dValue: D W ORD ? (2017). Prof. A menyo. CS 397. Fall 2017. Quiz 2 B . Page 3 of 4 M O VZX dVa l ue, BX ; Aft e r: E BX, dValue , BX c ) ; Bef o re: R 15: E 234 5 678 A BCD E EFF H; wV a lue: W O RD - 1 7 M O V S X R15 , wV a lue ; Aft e r: R 15 d ) ; Bef o re: E BX: 1234 5 6 78H; EDX: 9ABC D EF0H XCHG BX, DX ; Aft e r: E BX, E DX , BL, DL e ) ; Bef o re: R A X : F A E A F A D A F A C A F A B AH; R DX : 15 2 5 1 5 3 5 15 4 5 15 5 5 H XCHG EAX, E DX ; Aft e r: RAX, E AX, R15 , RDX f) ; Bef o re: E BX: FF 0 0 FF 9 5H; ECX: 0000 0 1 B 2H ADD E BX, E C X ; Aft e r: E BX, E CX, SF, ZF, CF, OF g) ; Bef o re: BX: FF B 5H; CX: 0 2 A2H SUB CX, BX ; Aft e r: BX, CX, SF, ZF, CF, OF h) ; Bef o re: CX: 03 1 B H INC CX I NC C L DEC CX ; Aft e r: CX, S F , ZF i) ; Bef o re: E BX : FFFF FFF E H DEC E BX DEC BX (2017). Prof. A menyo. CS 397. Fall 2017. Quiz 2 B . Page 4 of 4 DEC BL DEC BH ; Aft e r: E BX , S F, ZF j) ; Bef o re: R D X : FFFF FFFF FFFF FFF D H NEG R DX ; Aft e r: RDX, E DX, SF, ZF. 3. Use the following data definitions to answer the questions that follow: .Data N um1 D WORD 100 Num2 W ORD 225 Char1 WORD 6FABH Num3 Q WORD 0 Indicate which of the following instructions are legal or illegal. Explain the reason for each illegal instruction. a. MOV EAX, EBX b. MOV EAX, Num2 c. MOV BL, Num1 d. MOV DH, Char1 e. MOV Char1, Num2 f. ADD 75, EAX g. INC 23 h. XCHG AL, NUM2 i. NEG 100 j. INC Num 3 4. Write a complete assembly program code that implements the following algorithm (in pseudo - code). a. D isplay a greeting to the user. b. Ask for user s N ame c. Ask for user s Id d. Display a customized greeting to user, incorporating Name and Id e. A sk user for two integers and store in memory f. M ultiply the two integers and store result in memory g. D ivide the two integers from each other, store the results in memory h. Display the original integers and the three computation s results to the user
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
