Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write an assembly program which uses a loop to increment a counter from 1 to 10

ID: 3873223 • Letter: W

Question

Write an assembly program which uses a loop to increment a counter from 1 to 10 and print the count as it runs. Choose any of the loop styles.

The code should run here:

; file: asm_main.asm sinclude "asm io.inc" : initialized data is put in the .data segment segment .data ; uninitialized data is put in the .bss segment segment .bss ;code is put in the .text segment segment.text asm_main: global asm_main , ; setup routine enter pusha : next print out result message as series of steps popa mov Leave ret eax, return back to C

Explanation / Answer

Answer)

below is corresponding c program.

#include <stdio.h>
int main()
{
int cnt=0;
for(cnt=1;cnt<=10;cnt++){
     printf("%d",cnt);
}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote