Tag: subtraction

Subtraction of 8-bit BCD numbers in Assembly – masm 8086

Subtraction of 8-bit BCD numbers in Assembly – masm 8086

org 100h .model small .data A DB 34 B DB 17 .code ;Initilize data segment mov ax,@DATA mov DS,ax mov al,a sub al,b ; converting hex to decimal by diving A mov ah,00h mov bh,0Ah div bh ; Quotiont mov cx,ax mov dl,cl add dl,30h mov ah,02h int 21h ;remainder mov dl,ch add dl,30h mov … Continue reading Subtraction of 8-bit BCD numbers in Assembly – masm 8086

Subtraction of Two numbers in ASSEMBLY LANGUAGE -MASM 8086

Subtraction of Two numbers in ASSEMBLY LANGUAGE -MASM 8086

ORG 100H .MODEL SMALL .DATA VAR1 DB 5, 2 DUP(?) VAR2 DB 5, 2 DUP(?) PROMPT DB 'ENTER FIRST NUMBER:', '$' PROMPT1 DB 'ENTER SECOND NUMBER :', '$' PROMPT2 DB 'RESULT OF FIRST AND SECOND NUMBER IS: ', '$' .CODE LEA DX,PROMPT MOV AH,09H INT 21H ;====================== MOV AH, 00 INT 16h MOV VAR1,AL MOV … Continue reading Subtraction of Two numbers in ASSEMBLY LANGUAGE -MASM 8086