

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


; hooking divide by zero interrupt [org 0x0100] jmp start message: db 'You divided something by zero.', 0 ;;;;; COPY LINES 028-050 FROM EXAMPLE 7.4 (strlen) ;;;;; ;;;;; COPY LINES 005-024 FROM EXAMPLE 7.1 (clrscr) ;;;;; ;;;;; COPY LINES 050-090 FROM EXAMPLE 7.4 (printstr) ;;;;; ; divide by zero interrupt handler myisrfor0: push ax ; push all regs push bx push cx push dx push si push di push bp push ds push es push cs pop ds ; point ds to our data segment pop es pop ds
call clrscr ; clear the screen mov ax, 30 push ax ; push x position mov ax, 20 push ax ; push y position mov ax, 0x71 ; white on blue attribute push ax ; push attribute mov ax, message push ax ; push offset of message call printstr ; print message