In: Computer Science
Using the software Emulator EMU8086, write an assembly program that uses a loop to print "HELLO WORLD" 3 times and "LIFE" 2 times.
Example:
HELLO WORLD
HELLO WORLD
HELLO WORLD
LIFE
LIFE
CODE:
include 'emu8086.inc'
.model small
.data
.code
MOV AX,3
MOV SI,2
FIRST:
PRINTN
PRINT "HEllO WORLD"
DEC AX
CMP AX,0
JNE FIRST
JE NEXT
NEXT:
PRINTN
PRINT "LIFE"
DEC SI
JZ GO
JNZ NEXT
GO:
MOV AH,4CH
INT 21H
ret
DEFINE_PRINT_NUM
DEFINE_PRINT_NUM_UNS
REFERENCE:
OUTPUT:
HERE I am giving 3 screen shots one which shows output:
2) which shows program terminated successfully:
when AH value becomes 4CH it is an interrupt to operating system to take over the control.
3)Where the program has stopped:
yellow colour indicates the last lline....