Question

[ASSEMBLY LANGUAGE] Write a program that prompt a message to one letter from the user's input...

[ASSEMBLY LANGUAGE]

Write a program that prompt a message to one letter from the user's input and displays this single character in all possible combinations of foreground and background colors (16 x16 = 256). The colors are numbered from 0 to 15, so you can use a nested loop to generate all possible combinations.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

INCLUDE Irvine32.inc

.data
count DWORD ?

.code
main PROC

   mov eax, 0 + (0 * 16)
   mov ecx, 16
   L1:
       mov count, ecx
       push eax
       mov ecx, 16
       L2:
           call SetTextColor
           push eax           
           mov al,'H'
           call WriteChar
           pop eax
           inc eax
       LOOP L2
       call crlf
       pop eax
       add eax, 16
       mov ecx, count
   LOOP L1

   call crlf
   call WaitMsg
   exit
main ENDP

END main

Add a comment
Know the answer?
Add Answer to:
[ASSEMBLY LANGUAGE] Write a program that prompt a message to one letter from the user's input...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Programming: Write a SPIM assembly language program num-vowel.s based on the hardware implementation method in the...

    Programming: Write a SPIM assembly language program num-vowel.s based on the hardware implementation method in the lab notes and the above practice. The program will do the following: Prompt the user to enter a string. The program will call the procedure vowelp to check if a character entered in the string is a vowel or not. Count how many vowels and how many non-vowels are in the string. Print out the calculated results with appropriate message. Hint: A loop is...

  • Please use Assembly Language to write: Write a program that draws an 8 times 8 chess...

    Please use Assembly Language to write: Write a program that draws an 8 times 8 chess board, with alternating gray and white squares. You can use the SetTextColor and Gotoxy procedures from the Irvine32 library. Avoid the use of global variables, and use declared parameters in all procedures. Use short procedures that are focused on a single task. (A VideoNote for this exercise is posted on the Web site.) This exercise extends Exercise 9. Every 500 milliseconds, change the color...

  • MASM Assembly language -- Message Encryption Pgm You are to write a program to input a...

    MASM Assembly language -- Message Encryption Pgm You are to write a program to input a text and a key and encrypt the text. I will supply you an encryption key consisting of multiple characters. Use this key to encrypt and decrypt the plain text by XOR-ing each character of the key against a corresponding byte in the message. Repeat the key as many times as necessary until all plain text bytes are translated. Suppose, for example, the key were...

  • Step 2: Create the method specified below. static int GetValidWidth(string prompt) Input parameters prompt: message for...

    Step 2: Create the method specified below. static int GetValidWidth(string prompt) Input parameters prompt: message for user describing the input required Returns A non-zero width entered by the user Step 3: Create the method specified below. static int GetValidHeight(string prompt) Input parameters prompt: message for user describing the input required Returns A non-zero positive height entered by the user Step 4: Create the method specified below. static void DisplayBox(int width, int height, char fillChar) Input parameters width: width of each...

  • In C programming language have a program request the user to enter an uppercase letter. Use...

    In C programming language have a program request the user to enter an uppercase letter. Use nested loops to produce a pyramid pattern like this: The pattern should extend to the character entered. For example, the preceding pattern would result from an input value of E. Hint: Use an outer loop to handle the rows. Use three inner loops in a row, one to handle the spaces, one for printing letters in ascending order, and one for printing letters in...

  • Write a machine language program to input two one-digit numbers ranging from 0 to 4 (using...

    Write a machine language program to input two one-digit numbers ranging from 0 to 4 (using the character input instruction), add them, and then output the single digit sum (using the character output instruction). Execute your program in the PEP/8 simulator. Example Input: 43 (this is the numbers 4 and 3. Remember, this is two ASCII characters when inputted into your program) Output: 7 (ASCII character 55dec)

  • this assignment should be delivered in C language Program 4 will prompt the user for one...

    this assignment should be delivered in C language Program 4 will prompt the user for one or two token, space delimited, inputs of at most 20 characters. If the user provides more than 20 characters before a newline is reached print the provided error message. If the number of tokens is incorrect, print the appropriate error message. If the input is correct, print the appropriate token types. Prompt the user for input (and provide output) until the user provides a...

  • Write a C program named space_to_line.c that features a while loop that continuously reads input from...

    Write a C program named space_to_line.c that features a while loop that continuously reads input from the user one character at a time and then prints that character out. The exception is that if the user inputs a space character (‘ ‘), then a newline character (‘\n’) should be printed instead. This will format the output such that every word the user inputs is on its own line. Other than changing the spaces to newlines, the output should exactly match...

  • Write a program in MIPs Assembly Language to compute nth number of a fibonacci number sequence....

    Write a program in MIPs Assembly Language to compute nth number of a fibonacci number sequence. Your program should prompt for an integer input n from the user. The program should call a recursive function to compute the nth fibonacci number. Your program must follow programming convention. You should submit program and screenshot of output in a single word/pdf file. You should use following recursive definition of fibonacci function: fib(0) = 0 fib(1) = 1 fib(n) = fib(n-1) +fib(n-2)

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT