Professional Documents
Culture Documents
LCM of N Number in 8086 ALP
LCM of N Number in 8086 ALP
data ends code segment assume cs:code,ds:data start: call lcm jmp h1 lcm proc near mov mov mov mov ax,data ds,ax si,offset arr di,offset arr
mov ax,00h mov cx,04h mov mov mov l1: inc mov al,[si] si,offset arr1 [si],al di bl,[di]
up:cmp al,bl je exit jb excg up1: div bl cmp ah,00h je exit mov al,ah mov ah,00h jmp up excg:xchg al,bl jmp up1 exit: mov mov mul div mov al,[si] dl,[di] dl bl [si],ax
end start