Write an "Assembly handler" and a correspodning "C handler."
Try to follow the steps below and also the ones discussed in class yesterday:
Obtain the IDT table address using inline assembly. See store_idt()/load_idt() for loading and storing the IDT base address.
Replace the high and low address of IDT entry n with the new high/low address, where n is an exception number.
The new high and low address that would go into the IDT entry will be defined by your own assembly handler.
Write your own assembly handler. Use this handler address as the new high & low in IDT.
Your assembly handler will call your own C handler.
Your C handler will print or do something to indicate that your C handler is activated.
Your C handler will terminate normally and return to your assembly handler.
Upon returning from your C handler, your assembly handler will jump to the original asm handler.
Find the original C handler address from System.map.
The following statments in your application will generate a "divide error" exception with the message "Floating point exception."
int i=1, j=0;
Make sure to include some print statements to indicate that the handler is activated.
Bu iş için 3 freelancer ortalamada $84 teklif veriyor
Hello , I have bachelor's degree in computer science and i have been programming in C/C++ for both linux and windows for more than 8 years.I have written various network applications some of which are down to the IP Daha Fazla
Hi, Is this Computer Science Department, New Jersey Institute of Technology? I am a multimedia expert with Audio Video encoding/decoding experience in Linux/Android Domain. Delivered several projects on RPI, Y Daha Fazla
Hi, I have over 5 years of experience in kernel coding. I have completed similar assignments in a Linux kernel for other students in the past. Please ping me to discuss further. Thanks, -Vinod