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

  Design a calculator that can do add sub mul and div

Assignment: Codeworrior Programming in Assembly Language- Design a calculator that can do add, sub, mul, and div with two 4-digit (0 - 9999) decimal numbers.

  Bresenham''s algorithm for drawing a line

This assignment is about writing a line drawing subroutine in ARM assembly language. The following is a C implementation of Bresenham's algorithm for drawing a line between two points.

  Explain about the ascii functions

Explain about the ASCII functions we use in assembly language programming

  Calculate the number of one bits in bx

Calculate the number of one bits in bx and complement an equal number of least significant bits in ax hint use the xor instruction

  How to express restrictions in register interference graph

The DEC Alpha architecture places the following restrictions on floating-point instructions. Show how to express these restrictions in the register interference graph.

  Develop assembly program to implement a finite state machine

In this lab we will write an assembly program to implement a Finite State Machine (FSM) that recognizes hexadecimal integer constant that conforms to MASM syntax.

  Compute number of lines of the address bus

Compute number of lines of the address bus connecting the RAM and the CPU - what is the maximum size in Bytes for RAM.

  Write an equivalent m68000 assembly language

write an equivalent M68000 assembly language - What are the resulting values in the CCR - show any changes to register(s) and/or memory that would result

  Write assembly language program to add three numbers stored

Write an assembly language program to add three numbers stored at locations 20, 21, 22 and store the result in location 23.

  Write the required embedded assembler code

Write the required embedded (_asm) assembler code for each section in the corresponding inline assembler blocks denoted by the _asm keyword.

  Draw a flow chart for this

Draw a Flow Chart for this 8051 assembly language program below. This program calculate y=x^2+ 2x+9. Register R0 has the x, and at the end of the program R2 should have y. (Test program for x=9).

  Part a clockuse a timer interrupt to design a simple

part a clockuse a timer interrupt to design a simple digital clock. this clock will count only minutes and seconds

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