All about programming. If you want to learn programming and get solution of any programming questions then you are at right place. Here you will find different language programs which is C++, Assembly language, Java and many more.
Assembly language program to print small alphabet a to z using loop
Code org 100h .stack 100h .data even db "The number is Even$" odd db "The number is Odd$" .code main proc mov ax,@data mov ds,ax mov ah,01 int 21h mov dx,0 mov bx,2 div bx mov cx,dx cmp cx,0 je eve call line ;caling line procedure mov dx,offset odd mov ah,09 int 21h mov ah,4ch int 21h eve: call line ;caling line procedure mov dx,offset even mov ah,09 int 21h mov ah,4ch int 21h main endp line proc ;this is another procedure for new line mov dx,10 mov ah,02 ...
Code org 100h .stack 100h .data string db 100 dup ('$') .code main proc mov ax,@data mov ds,ax mov si,offset string l1: ;lable mov ah,01 int 21h cmp al,13 ;13 is enter key in ASCI je dis mov [si],al inc si jmp l1 dis: ;dis is a lable mov dx,10 mov ah,02 int 21h mov dx,13 mov ah,02 int 21h mov dx,offset string mov ah,09 int 21h mov ah,4ch int 21h main endp end main Output
Code org 100h .stack 100h .data string db 100 dup ('$') length db "The total length is: $" .code main proc mov ax,@data mov ds,ax mov bx,0 mov si,offset string l1: ;lable mov ah,01 int 21h cmp al,13 ;13 is enter key in ASCI je dis mov [si],al inc bx inc si jmp l1 dis: ;dis is a lable mov dx,10 mov ah,02 int 21h mov dx,13 mov ah,02 int 21h mov dx,offset length mov ah,09 int 21h mov ax,bx mov bx,10...
Comments
Post a Comment