INCLUDE Irvine32.inc
.model small
.stack 100h
.data
name db 'YourName', 0Dh, 0Ah, '$'
count db 5
.code
main proc
mov ax, @data
mov ds, ax
mov cx,5 count ; Set loop counter to 5
print_name:
mov ah, 9 ; DOS function to print string
lea dx, name
int 21h ; Call DOS interrupt
loop print_name ; Loop until CX is 0
mov ah, 4Ch ; DOS function to terminate program
int 21h ; Call DOS interrupt
main endp
end main
I have tried moving around the commands and altered the data a bit but instead of activating, I got 4 errors and a warning. ie: A4011, A2008, A2206, A2004 and the normal error: MSB3721. I expected it to print “YourName” 5 times
1