Solved programming problem

Use for Loop in Assembly.

Source code

org 100h

.model small

.stack 100h

.data

 c db '0'

.code  

 

 mov dx,@data

 mov ds,dx

main proc  

   

 mov cx,5 ;set a counter value at max

L1:  

    mov ah,2

    mov dl,c ;print c value

    int 21h

     

    add c,1 ;increment c value

    loop  L1  ;while c<cx value...it will work

   

    mov ah,4ch

    int 21h

   

endp

end main

Output

01234

Join the discussion

Add your comment

6 previous comments

augmentin for periodontitis

I have taken 4 months of clomid up to 150mg and did not produce one egg <a href=https://augmentin.top/>what is the drug augmentin</a> Claudio SnMQAJkkjiFO 6 20 2022

Jetetwive

<a href=https://cials.autos>buy cialis generic online</a> Impact of zoledronic acid on renal function in patients with cancer Clinical significance and development of a predictive model

oriffmato

The two neighbors came close to war in April 2012, the worst violence since the South seceded in 2011 <a href=https://bestcialis20mg.com/>buying cialis generic</a>

intuiff

<a href=https://bestcialis20mg.com/>cialis generic 5mg</a> ethambutol ibuprofen or paracetamol hangover She was really looked at among my fellow jurors and myself as to the possibility what the district attorney Mr

Smesmarie

Synthroid No Prescription Online <a href=http://iverstromectol.com/>dosage of ivermectin for dogs</a>

Foepure

[url=https://oscialipop.com]Cialis[/url] Procurer Du Viagra Sans Ordonnance Etfbmm <a href=https://oscialipop.com>cialis generic</a> Zfidka https://oscialipop.com - generic cialis online europe Cialis Puo Non Funzionare