Write an equivalent m68000 assembly language

Assignment Help Assembly Language
Reference no: EM132175033

Assembly Problem 1:

- Ensuring that it assembles and runs correctly using the tools on edoras.
- Documenting your solutions correctly.
- Organizing your handin directory and submissions correctly.

Problem :

1) Your program will prompt the user to enter a number that is less than 500. Your program will then print each of the even numbers 2 through N, one number per line.

2) You must ensure that your assembler can be assembled and run on edoras using the tools ppasm and bsvc. You may develop your solution on any machine you desire, as long as the final solution works on edoras.

3) Your solution must have a complete comment header as is detailed in your template.s file. During runtime, your solution to section 1 must output a correct title string as the first line printed. It should be in this format:

Program #3, Student Name, csscxxxx

Example Output
Output is being recorded in, outfile 55555 Program #3, Scott Kppppp, cssc1558
Enter a Number less than 500: 6
2
4
6
Output is being recorded in, outfile 55555 Program #3, Scott Kppppp, cssc1558
Enter a Number less than 500: 9
2
4
6
8

Additional Details

You do not need to do input checking. You can assume that the input value is a valid input.

Your response line must be on a single line as per the example output.

Assembly Problem 2:

1. What is printed by the following program?

  move.1                     alpha,D1

  move.1                    beta,D2

  cmp.w                      D2,D1

  bge                            next

  lineout            one

  bra                            done

next:

  lineout            two

done:

  break

alpha:            dc.1                    12345678

beta:             dc.1                    87654321

one:              dc.b                    'Message one',0

two:              dc.b                    |'Message two',0

  end

2. What is printed by the following program?

  move.1                     alpha,D1

  move.1                     beta,D2

  cmp.w                      D2,D1

  ble                           next

  lineout                      one

  bra                           done

next:

   lineout                     two

done:

   break

alpha:             dc.b          1234

beta:              dc.1          '1234'

one:               dc.b          'Message one',0

two:               dc.b          'Message two',0

end

3. Given the code fragment below, write an equivalent M68000 assembly language.

sum = 0

for i = 0; i <= 25; i+= 3 }

    if { i % 2 == 0 }

sum = sum + i

You must assume that the following variable -> register assignments.

i -> DO

sum -> D1

You do not know the values of i or sum prior to where your code begins, but you can assume that they are valid. Use the provided lines and provided labels. (You do not need to use all lines ).

1)        

2)        

3)        

4)  

5)  

6)  loop:

7)  

8)  

9)  

10)  

11)  

12)  

13)  

14)  

15) sum:

16)  

17)  

18)  

19)  

20)  

21)  

22)  

23)  exit:

24)  

25)

4. Given the following register values:

D0: FFFF FFF2
D1: 0000 4321

After execution of the instruction:

cmp.l D0,D1

a) What are the resulting values in the CCR?

N Z V C




b) State (YES or NO) whether or not each of the following branches to <label> would occur:

i. BHI <label>
ii. BLO <label>
iii. BCS <label>
iv. BVS <label>
v. BLE <label>
vi. BMI <label>

5 . Given the following initial register and memory values, show any changes to register(s) and/or memory that would result from execution of each instruction below, and show the value of the CCR after each.

Use the same initial values for each question.
[Note : do not translate these irstructions to machine code ].
            DO: 7FFF FFFF

            AO: 0000 7010

            CCR: 0100
    0000 7000           alpha:     dc.w.         1,2,3,4,5,6,7,8,9,10
a) move.1            (A0),D0
b) add.1             alpha+8,D0
c) adda.1            #2,A0
d) addi.1             #6,D0
e) add.1             (A0),D0

6. Write Motorolla 68000 assembler code that will prompt the user to enter any number N up to 10,000. Your program will then split that number into three roughly equal chunks that add up to that original number N and print those three numbers on a single line separated by a space. If N is divisible by 3, the three chunks will be exactly equal, otherwise you will print the three numbers closest to dividing the number by 3 such that adding those 3 numbers you will have exactly N.

For example:
Enter a number:
9
333
Enter a number:
10
433
Enter a number:
11
443
Enter a number: 9997
3333 3332 3332

Attachment:- Assignment.rar

Reference no: EM132175033

Questions Cloud

What are the benefits of empowering employees : What is empowerment? How would you define empowerment? What are the benefits of empowering employees? The response must be typed.
Create contemporary typography design : DIGITAL DESIGN - Perform document layout and typesetting functions using Adobe InDesign - Create contemporary typography design
Research information on performance management : Using the Internet and the library, research information on performance management and then develop a detailed plan to present to your chief executive officer.
Create policies regarding pay and benefits : It is your responsibility as the HR Director of an organization to create policies regarding pay and benefits for the selected job opportunity.
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
Discuss briefly the ethical dilemma that juan faces : Professional Environments - Discuss briefly the ethical dilemma that Juan faces. Show your utilisation of either Thomas White or Chris MacDonald's methodology
Determining the freezing point of test liquids : Cost-friendly method of Lowering the freezing point using the locally available materials - Calculate the expected freezing point depression for each of test
Explain gender development : Explain gender development, including environmental effects on the process and the role of culture in gender identity. Support your explanation with your course
Identify and discuss the challenges that may be faced : FINC 305 - Entrepreneurial Finance - How can Venture Capital Institutions add value the founder and management team of the entrepreneurial venture

Reviews

Write a Review

Assembly Language Questions & Answers

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

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

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  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.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  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.

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