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 0 to 9 numbers using loop
Code: org 100h .stack 100h .data .code main proc mov ah,01 ;taking input that save in ax(al) int 21h ;now move value of ax into bx to get another value mov bx,ax ;now again gat a number mov ah,01 int 21h ;subtract 2nd number from first number result is save in bx sub bx,ax ;code for print newline mov dx,10 mov ah,02 int 21h mov dx,13 mov ah,02 int 21h ;now display the result mov dx,bx ;now there is an assci value in bx ;so get a real number we add 48 into result that is 0 add dx,48 mov ...
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 ...
Comments
Post a Comment