Using Assembly Language Easy68k only
res EQU 0
X EQU 10
Y EQU 5
sub1:
ADD.W D1, D2 // X+Y
RTS
sub2:
MUL.W D1,D2 // X*Y
RTS
main:
MOVEA.L #X, D1
MOVEA.L #y, D2
BSR sub1
MOVE.L D2, A1 // store X+Y in A1
MOVEA.L #X, D1
MOVEA.L #y, D2
BSR sub2
MOVE.L D2, A2 // store X*Y in A2
DIV.W A1, A2 // X+Y / X*Y
MOVE.L A2,res
STOP #$2000
Using Assembly Language Easy68k only 2. Write two subroutines one for (X+Y) and next one is...
Please answer using assembly language Easy68k ONLY. I. Write a program called Sorted Primes to a. Find out the prime numbers in a method from the following list (15, 16, 17, 23, 2, 32, 3, 31, 13, 19, 12, 9) and push/store them in a stack and then PRINT. (15 points) b. Sort those prime numbers passed by reference (using PEA) to a second method that you found out from the above list in descending order and then PRINT. (20...
Please, implement these subroutine. Write assembly language subroutines to perform the calculations listed hereunder: Table 1: List of required subroutines. z= ABS (1) umber z=MAX(x, y) Get absolute value of a x: 16-bit signed z: 16-bit unsigned signed number. integer integer for the Assume signed number are absolute value of x represented in 2's i.e. X complement format. Given the elements x and x, y: 16-bit z: 16-bit unsigned y. Return the element with unsigned integers. integer storing the greater...
7. Write the following code segment in MARIE's assembly language (If-Else): If x < Y Then X = Y - X; Y = Y + 1; Else X = Y; Y = 0; Endif;
Assembly language (MIPS) Let register $8 be x and register $9 be y. Write a program to evaluate: Z = 3x - 5y+5 Leave the result in register $10. Inspect the register after running the program to check that the program works. Run the program several times, initialize x and y to different values for each run.
Write the following code segment in MARIE's assembly language: if X < 1 then Y = X - 2; X = 0; endif; Y = Y + 7;
IN SPARC ASSEMBLY ONLY, write a program that prompts the user for two numbers and prints the sum. THIS MUST BE IN SPARC ASSEMBLY. DO NOT WRITE IT IN NORMAL ASSEMBLY LANGUAGE. Sample: Enter Number 1: 2 Enter Number 2: 3 The sum of 2 and 3 is 5 Note: -Your program should contain .data, .bss, and .text sections -DO NOT try to optimize your code (i.e remove nops) -DO NOT write this in regular assembly, it must be in...
Write a simple program in arm, assembly language , using only Registers, to test if 371 is an Armstrong number. The program written should only have instruction set from the Cortex m0+. And then put a 1 in a register to show it It is, or 0 if it isn’t. The second program is about the Armstrong numbers. You assume it will be a 3-digit number which will be entered through the data area. You can use a register so...
Use HCS12 assembly language only - not C code Using CodeWarrior to create a new project that uses assembly language. Write an assembly program that turns on the red LED at the beginning. It switches to off 2 seconds later and switches back to on after three more seconds. (That is, it stays on for 2 seconds and off for 3 seconds.) This switching process lasts forever. Use a loop (or nested loops) for each of the 2/3-second delay where...
Using the console32 framework, write a complete assembly language program that computes in EAX the perimeter (2*length + 2*width) of a rectangle where the length and width are in memory doublewords. ASSEMBLY LANGUAGE console 32
. Write an 8086 assembly language program to find the prime numbers among 100 bytes of data in an array stored from the address 4000H: 1000H in the data segment and store the result from the address 4000H: 3000H. write the code using 8086 assembly language only i do not want any other language If you Do not sure please do not solve it