================================== DEBUG dump interpretation practice ================================== idallen@ncf.ca The following DEBUG dump excerpt is from the registers and memory given in the final Trace and Display on the call_push_out.txt web page: http://www.algonquincollege.com/~alleni/dat2343/01f/call_push_out.txt Given this DEBUG dump output: -t AX=0000 BX=0000 CX=0000 DX=0000 SP=FFE0 BP=0000 SI=0000 DI=0000 DS=1426 ES=1426 SS=1426 CS=1426 IP=1234 NV UP EI PL NZ NA PO NC 1426:1234 E84144 CALL 5678 -d ffe0 1426:FFE0 BF 9A 7B 56 37 12 BF 9A-7B 56 37 12 03 01 00 00 ..{V7...{V7..... 1426:FFF0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 1. Is this a .COM program or a .EXE program? How can you tell by looking at the dump? 2. What is the Real Address of the high byte of the item on top of the stack at this point? (The high byte is the higher memory address of the 16-bit quantity on top of the stack. The "top" of the stack is the 16-bit quantity addressed by the current value of SS:SP. Note that, since the stack grows *downward* in memory, the "top" of the stack has an address *lower* than the "bottom" of the stack. The high byte will be stored in higher memory than the low byte [according to Intel rules], so the address of the high byte will be one larger than the address of the low byte.) 3. From the dump, what is the actual value (in hex) stored in memory at the address of the byte calculated in the previous question? For each question below provide these three things: a) What is the Segment:Offset used in the final MOV instruction? b) What is the Real Address used in the final MOV instruction? c) What value would be picked up from memory and copied to register AL? 4. MOV BP,SP MOV AL,[BP] 5. MOV BX,SP ADD BX,1 MOV AL,[BX] 6. MOV BX,1446h ; cannot move a constant directly into ES, so MOV ES,BX ; we must use an intermediate BX register MOV BX,SP SUB BX,1FEh MOV AL,ES:[BX] ; ASM syntax for address [ES:BX] 7. Using the final Real Address given by ES:BX in the question above, and the SS:SP value from the DEBUG dump, how many bytes separate Real Address ES:BX from Real Address SS:SP? How many bytes separate Real Address ES:0000 from Real Address SS:0000? ================================ Intel Assembly Language Practice ================================ 8. What is the difference between (a) and (b): a) MOV AH,4Ch MOV AL,01h INT 21h b) MOV AX,4C01h INT 21h 9. What ASCII character is output on your screen after this executes? MOV AX,2Fh ADD AX,5 MOV DL,AL MOV AH,02h INT 21h