Tag: 8086

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

Find substring in string in Assembly – masm 8086

Find substring in string in Assembly – masm 8086

org 100h .data buf1 DB "Enter String :::: $" buf2 DB 0dh,0ah,"Enter Substring to search :::: $" buf3 DB 0dh,0ah,"Substring Found $",1 buf4 DB 0dh,0ah,"Substring not Found...$" str DB 120,120 DUP(?) str_len DW 0 substr DB 120,120 DUP (?) substr_len DW 0 counter DW 0 .code ;initilize Data Segment mov ax,@DATA mov DS,ax ;==========Input String===== … Continue reading Find substring in string in Assembly – masm 8086