home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
CPROG
/
TASMSWAN.ZIP
/
MULDIV.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-07-10
|
552b
|
44 lines
%TITLE "MUL/DIV/IMUL/IDIV instructions demo"
IDEAL
DOSSEG
MODEL small
STACK 256
DATASEG
exitCode DB 0 ;if you want comments
opByte DB 8 ; buy the book
opWord DW 100
sourceByte DB 64
sourceWord DW 4000
CODESEG
Start:
mov ax,@data
mov ds,ax
mov al,[opByte]
mul [sourceByte]
mov ax,[opWord]
mul [sourceWord]
mov ax,[opWord]
mul ax
mov ax,[opWord]
div [sourceByte]
mov ax,[opWord]
mov dx,0
div [sourceWord]
Exit:
mov ah,04Ch
mov al,[exitCode]
int 21h
End Start