Write a program that displays a single character

Assignment Help Assembly Language
Reference no: EM132194694

Programming Assignments

These must be completed in the Microsoft environment. Only need to submit the ASM file.

Exercise 1

Integer Expression Calculation

Using the AddTwo program from Section 3.2 as a reference, write a program that calculates the
following expression, using registers: A = (A + B) - (C + D). Assign integer values to the EAX,
EBX, ECX, and EDX registers.

Exercise 2
Symbolic Integer Constants
Write a program that defines symbolic constants for all seven days of the week. Create an array
variable that uses the symbols as initializers.

Exercise 3
Data Definitions
Write a program that contains a definition of each data type listed in Table 3-2 in Section 3.4.
Initialize each variable to a value that is consistent with its data type.
Table 3-2 Intrinsic Data Types.

Type Usage
BYTE 8-bit unsigned integer. B stands for byte
SBYTE 8-bit signed integer. S stands for signed
WORD 16-bit unsigned integer
SWORD 16-bit signed integer
DWORD 32-bit unsigned integer. D stands for double
SDWORD 32-bit signed integer. SD stands for signed double
FWORD 48-bit integer (Far pointer in protected mode)
QWORD 64-bit integer. Q stands for quad
TBYTE 80-bit (10-byte) integer. T stands for Ten-byte
REAL4 32-bit (4-byte) IEEE short real
REAL8 64-bit (8-byte) IEEE long real
REAL10 80-bit (10-byte) IEEE extended real

These must be completed in the Microsoft environment. Only need to submit the ASM file.

Exercise 1
Converting from Big Endian to Little Endian
Write a program that uses the variables below and MOV instructions to copy the value from bigEndian to littleEndian, reversing the order of the bytes. The number's 32-bit value is understood to be 12345678 hexadecimal.
.data
bigEndian BYTE 12h,34h,56h,78h
littleEndian DWORD

Exercise 3
Summing the Gaps between Array Values

Write a program with a loop and indexed addressing that calculates the sum of all the gaps between successive array elements. The array elements are doublewords, sequenced in nondecreasing order. So, for example, the array {0, 2, 5, 9, 10} has gaps of 2, 3, 4, and 1, whose sum equals 10

Exercise 7
Copy a String in Reverse Order
Write a program with a loop and indirect addressing that copies a string from source to target, reversing the character order in the process. Use the following variables:
source BYTE "This is the source string",0
target BYTE SIZEOF source DUP('#')
These must be completed in the Microsoft environment. Only need to submit the ASM file.

Exercise 6
Random Strings
Create a procedure that generates a random string of length L, containing all capital letters.
When calling the procedure, pass the value of L in EAX, and pass a pointer to an array of byte that will hold the random string. Write a test program that calls your procedure 20 times and displays the strings in the console window

Exercise 8

Color Matrix
Write a program that displays a single character in all possible combinations of foreground and background colors (16 16 256). The colors are numbered from 0 to 15, so you can use a nested loop to generate all possible combinations.

Attachment:- Assembly Language.rar

Verified Expert

Assembly language is the machine level language in which the instructions are give to calculate various methodology performed in various specific instructions for machine code there are various specifications given in the assignment in which i have applied the instruction code as X86 emulator and it is saved as .asm which can run in any machine.

Reference no: EM132194694

Questions Cloud

Profit maximizing price and quantity of resources : Explain how the profit maximizing price and quantity of resources in factor markets under perfect competition are determined by marginal analysis.
Describe governmental efforts to address market failure : Describe governmental efforts to address market failure such as monopoly power, externalities, and public goods.
Deal with the underfunded pensions problem : How do you think state and local governments will deal with the underfunded pensions problem? What problems would it cause?
Calculate the value of e using a function : Write a C++ program that will calculate the value of "e" (Euler's number, e = 2.71828...) using a function you create named "find_e".
Write a program that displays a single character : Write a program that displays a single character in all possible combinations of foreground and background colors (16 16 256). The colors are numbered
Do you believe that the federal reserve should be controlled : Do you believe that the Federal Reserve should be controlled by Congress? Please Explain.
Describe the effect on gdp-unemployment : Describe the effect on GDP, unemployment, and inflation of each of the following: (a) war, (b) elimination of environmental regulations, and (c) cuts in welfare
A program that converts knuts to sickles and galleons : Write a C program that converts knuts to sickles and galleons (the currency of the HarryPotter novels).The user will enter the total number of knuts.
Accurate measure of the standard of living : Is gross domestic product an accurate measure of the standard of living? Why or why not?

Reviews

Write a Review

Assembly Language Questions & Answers

  Implement a simple 32 bit calculator program

Operand A  and  Operand B  have to be  signed  32 bit integers. So an operand can be a negative number. For example, if you input is (-1 + 3), it should return 2. Operator  must be one of the characters(' + ', ' - ', ' * ', ' / ', ' % ')

  Project - game of nim

Nim is a mathematical game of strategy in which two players take turns removing objects from distinct heaps - a player must choose one pile and remove

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an arm assembly function that takes an array of intege

Write an ARM assembly function that takes an array of integers and returns the index of the first occurrence of the integer in the array if it exists or -1 if it does not. Remember the initial integer in the array is at index zero.

  Translate assembly language program into machine code

Translate the following assembly language program into machine code Translate the following machoine language program into assembly code

  Write a single arm assembly language instruction

Write a single ARM assembly language instruction equivalent to a function that takes in three strings and checks if any are a substring to one another, if so return 1, if not return 0.

  What would be the ieee 754 double precision binary

What would be the IEEE 754 double precision binary representation of the floating point value 2.71828×10-13? Express your final answer as a 16-hexdigit number and explain how your answer was obtained for full credit.

  Show where biased coloring helps make the right decisions

Use both conservative coalescing and biased coloring in allocating registers. Show where biased coloring helps make the right decisions.

  Write a program that declares a string in the data section

Write a simple Assembly Language program that declares a string in the data section. Write a program that converts the string to all lower-case characters.

  Write an assembly program that reads in a number of cents

Write an Assembly program that reads in a number of cents. The program will write out the number of dollars and cents separately

  Machine execution cycle

Explain the difference between the two instructions as far as the machine execution cycle - Pay attention to the BASEs in each expression

  What would be the twos complement representation of integer

CSE/EEE 230- Continuing, what would be the two's complement representation of the decimal integer -1? Write your answer in hex and for full credit, explain your answer.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd