Wednesday, October 30, 2013

8 bit Multiplication of signed bit

;Aim:- 8 bit Multiplication of signed bit
 .8086
 .model small
 .data
 num1 db 0FFh
 num2 db 0FEh
 product db ?
 .code
 Start:
 Mov ax,@data
 mov ds,ax
 mov ax,0000h
 mov al,num1
 mov bl,num2
 imul cl                      ;Multiplies Bl wit Al and the result in Cl Retaining the second bit
 mov product,al               ; Copies Al to product variable
 mov ax,4C00h
 int 21H
 End start
 ;result
 ;DS :0000 1000h(num1) 0ffffh(num2)
 ;DS:0008 0fffh(sum) 01 carry

No comments:

Post a Comment