'How to print the phrase in the next line and the problem of repeating loop in infinity [duplicate]
good morning everyone I am writing a program whose output is in accordance with this image Operation in question and the main loop (k1) must be run again and run a second time on the next line, but when I run this code the first loop (k1) will not run a second time and Even the commands of the second (k2) and third (k3) loops are repeated infinitely.The result of the program and its problem
.code
mov cx, 2
k1:
mov al, 'a'
mov ah, 0eh
int 10h
push cx
mov cx, 3
k2:
mov al, 'b'
mov ah, 0eh
int 10h
mov cx, 2
k3:
mov al, 'c'
mov ah, 0eh
int 10h
loop k3
loop k2
pop cx
loop k1
Solution 1:[1]
Single step in the debugger and look here:
int 10h
loop k3
loop k2 <------------
inspect and observe the registers.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Erik Eidt |
