Question

In: Computer Science

Using the software Emulator EMU8086, write an assembly program that uses a loop to print "HELLO...

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

  

Solutions

Expert Solution

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....


Related Solutions

Write a program that uses a for loop to print One of the months of the...
Write a program that uses a for loop to print One of the months of the year is January One of the months of the year is February ...
Write a Java program using jGRASP directions are as follows: Uses a while loop to print...
Write a Java program using jGRASP directions are as follows: Uses a while loop to print the numbers from 3 - 19. Uses a do-while loop to print the numbers from 42 - 56. Uses a for loop to print the numbers from 87 - 95. Asks the user for 2 numbers. Uses a loop to print all numbers between the given numbers, inclusive. Note: Consider that your user's second number can be lower! (see example below) Note: Also consider...
using Emulator Write an Assembly program that will produce all divisors for a 1-digit decimal number....
using Emulator Write an Assembly program that will produce all divisors for a 1-digit decimal number. For example, if the number is 6, then the outputs will be 1,2,3,6 which are the divisors of 6. show me the output
Write a program using c++. Write a program that uses a loop to keep asking the...
Write a program using c++. Write a program that uses a loop to keep asking the user for a sentence, and for each sentence tells the user if it is a palindrome or not. The program should keep looping until the user types in END. After that, the program should display a count of how many sentences were typed in and how many palindromes were found. It should then quit. Your program must have (and use) at least four VALUE...
Write an assembly program (Data and Code) that uses loop to read 10 numbers and output...
Write an assembly program (Data and Code) that uses loop to read 10 numbers and output the largest of those numbers, you can assume any length for those numbers. 80x86 assembly language
Microsoft Visual C++ Assembly language Problem 3. Write a program that uses a loop to calculate...
Microsoft Visual C++ Assembly language Problem 3. Write a program that uses a loop to calculate the first seven values of the Fibonacci number sequence, described by the following formula: Fib(1) = 1, Fib(2) = 2, … Fib(n) = Fib(n-1) + Fib(n-2). Place each value in the EAX register and display it with a call DumpRegs statement inside the loop For example: Fib(1) = 1, Fib(2) = 2, Fib(3) = Fib(1) + Fib(2) = 3, Fib(4) = Fib(2) + Fib(3)...
2) create a python program that uses a for loop and range to print out the...
2) create a python program that uses a for loop and range to print out the values 10 8 6 4 2 3) Create a python program that yses a for loop to print out ["bob","al","bert"]
Using Matlab Write a program that print the following matrix. (hint: use nested for-loop and if-statement)...
Using Matlab Write a program that print the following matrix. (hint: use nested for-loop and if-statement) mat = [2 -1 0 0 0 -1 2 -1 0 0 0 0 -1 2 -1 0 0 0 -1 2];
Write a program named subtract.asm that does the following using LC3 assembly language: Print a prompt...
Write a program named subtract.asm that does the following using LC3 assembly language: Print a prompt "PRESS TWO KEYS: " Note that the prompt MUST LOOK EXACTLY like the above, with a colon and a space after the word KEYS with no newline. Get a two key press from the user. Subtract the second characters ASCII code from the first characters ASCII code. If the result is positive, print the word POSITIVE. Turn in subtract.asm to the appropriate submission point...
Write an 8086 assembler program (using the emulator) that will perform the following calculations. All values...
Write an 8086 assembler program (using the emulator) that will perform the following calculations. All values below are decimals. You must attach Screenshot of emu8086 showing the different register values at the end of the execution A printed copy of your code (screenshot is OK) a) (6 -4) * 20 - (9 + 1)            Place the answer in the AX register b) 1000 - 4 * (3 *32)             Place the answer in the AX register
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT