home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
assemblr
/
library
/
tasmswan
/
divfault.asm
< prev
next >
Wrap
Assembly Source File
|
1989-07-17
|
561b
|
41 lines
%TITLE "Divide-Fault demo"
IDEAL
DOSSEG
MODEL small
STACK 256
;----- Equates
cr EQU 13
lf EQU 10
DATASEG
exitCode db 0
message1 db cr,lf,'Forcing a divide by Zero fault...', 0
message2 db cr,lf,'Program continued normally',cr,lf, 0
CODESEG
;---------- from STRIO.obj
EXTRN StrWrite:proc
Start:
mov ax,@data
mov ds,ax
mov es,ax
mov di, offset message1
call StrWrite
mov ax, 100h
xor bx,bx
div bx
Exit:
mov di, offset message2
call StrWrite
mov ah,04Ch
mov al,[exitCode]
int 21h
END Start