Write a constant declaration named arraysize

Assignment Help Assembly Language
Reference no: EM13167765

1. Given the following array definition, write a constant declaration named ArraySize that automatically calculates the size in bytes, of the array:

newArray DWORD 10,20,30,40,50

 

2. Which of the following will generate assembly errors?

a. var1 BYTE 1101b, 22, 35

b. var2 BYTE "ABCDE",18

c. var3 BYTE '

,'98778',

 

d. var4 BYTE 256,19,40

 

3. Use the following data definitions for the parts below:

byte1 BYTE 0FFh,1,2

byte2 BYTE 14h

word1 WORD 0FFFFh,1,2

word2 WORD 3

word3 SWORD 7FFFh,8000h

 

a. Write one or more statements that move the contents of word1 to word2.

b. For each of the following instructions, indicate whether it is legal (L) or illegal (I):

mov byte2,0FFh

mov word1,byte2

mov word2,10000h

mov si,word1

movzx ax,byte1

movzx edx,bl

movzx word2,al

movsx dl,al

c. Assume that the code below is part of an assembly program. Indicate the hexadecimal value of the destination operand next to each instruction. Use the letter I to indicate that a particular instruction is illegal.

mov dx,word3

movsx eax,byte1

mov dh,al

mov bx,dx

 

 

Reference no: EM13167765

Questions Cloud

Sdlc and the role of analysis and design : In this unit, you have examined phases of the SDLC and the role of analysis and design in the overall process. A question remains, however, about the analysis and design. What methodology or approach should you use? One common methodology is the ..
Create an output array using input x values 1 through 10 : The function is y=(x)/(sqrt(x)), create an output array using input x values 1 through 10. I can't seem to get this to work for some reason...
Who has the most money in their account at age 70 : Assuming both retire at 70, and that the interest rate both get on their investments is 10% (compounded annually) who has the most money in their account at age 70? Explain why you pick the answer you pick.
Implement the backend for a list : Using an array to implement the backend for a list, create a list class that can contain integers and implements all of the following funtionality via the following functions:List() - the constructor List (const List& 1) - a copy constructor
Write a constant declaration named arraysize : Given the following array definition, write a constant declaration named ArraySize that automatically calculates the size in bytes, of the array
What is the boiling point elevation : What is the boiling point elevation and boiling point of a solution that contains 1.20 moles of non-ionic solute in 800.0 g of H2O?
Determine the selling price of the house : Write and solve an equation to determine the selling price of the house. Jamie sold her house for x dollars. The real estate agent received a 5% commission and Jamie received $197,125.
What is the concentration of na ions in the final solution : if 100 mL of 0.800 M Na2SO4 is added to 200 mL of 1.20 M NaCl, what is the concentration of Na ions in the final solution?
Structured and object-oriented designs : Structured and object-oriented designs are the two main contenders for programming methodologies relevant to the creation of documentation for application programs. The choice of methodologies will greatly affect how we approach the challenge and ..

Reviews

Write a Review

Assembly Language Questions & Answers

  Create a procedure named validatepin that receives a pointer

Create a procedure named ValidatePIN that receives a pointer to an array of bytes containing a 5-digit PIN from your main proc. You are required to use the four byte arrays samplePin_1, samplePin_2,samplePin_3 and samplePin_4 declared below.

  Program that ask the user to input a number between 0-10

Write a program that ask the user to input a number between 0-10 (n). Then your program finds the factorial of the number

  Create a strcat procedure

Create a strcat procedure (like C's strcat function). Your procedure will be given the addresses (using the method presented in Chapter 8) of two string arrays.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  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(' + ', ' - ', ' * ', ' / ', ' % ')

  Assembly-language program

Write an assembly-language program to add each element of list1 to the corresponding element of list2 and store it in the same location of list2. Use a loop.

  Register address machine

Express the statement X= (A*B)-(C*D)-E in the assembly language of each of 0- memory address machine, 3-register address machine with 3 registers R1,R2,R3, and 2-memory-register-address machine with three registers R1,R2, R3. Your solution should use..

  Program that prints your full name on the screen

write an assembly language program that prints your full name on the screen

  Write an assembly program

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

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

  Displays a single character at 100 random screen

Write a program that displays a single character at 100 random screen locations, with a delay factor of 100 milliseconds.Hint: set the console window screen height to 200 at runtime.

  Write a sequence of two instructions

Write a sequence of two instructions that copies the inter in 4-7 from the AL registers into bits 0-3 of the Bl register. The upper 4 bits of AL will be cleared as will the upper 4 bits of BL. (Microsoft Assembly Language)

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