
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Instructions for a lab session on hexadecimal coding and interrupts. It includes defining codes, assembling instructions, and writing subroutines to perform specific tasks. Students are required to write code using int30 and int64 instructions, and to understand the role of flags and stack in interrupt handling.
Typology: Exercises
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Page 1 of 1
Note: every number is in hexadecimal. Define code at 1000:100 Define SS at 2000
Bit0 is the first bit in a byte / word Q1: Assemble the code at 1000: mov al, mov bl, int nop dump the contents of int32. write the contents of CS:IP Now append the following code at this CS:IP MOV al,ff MOV bl, add al,bl iret i) What is the contents of flag register before the int32 instruction ii) What happens to the flag register after the execution of int32 instruction iii) Dump the contents of stack what it shows write the contents along with register information iv) Does the ISR executes properly? If not then use another valid interrupt type v) What happens to flag register after the instruction add al,bl vi) Does iret retrieves the flag status vii) What happens if iret is replaced by retf. Does nop instruction execute in this case?
Q2: Write a code using int64 which copies the positive number to the location 3000:700 and the negative number using to the location 3000:800 from a memory location 2000:500 (10 bytes)
Q4:** What is the CS and IP for int21 instruction can you show the memory location where it is stored. What is the command for that? Un assemble few lines of the code written for int21. Write a short program to call int21 and trace to check whether the program control executes those instructions Q5: Initialize SS=2000 SP=FFFC Write following code POP AX POP BX POP CX POP DX i) Does the code fully executes what is the contents of SP when there is problem? ii) What is the remedy to solve the problem