Microprocessor: Terminology and Analysis

Introduction

A microprocessor, commonly referred to as the Central Processing Unit (CPU), a central place where all data processing is done, is a gadget that distinguishes only binary code as numbers and ascertains basing on the orders by employing assemblage languages. This piece of writing is a detailed explanation of program written in assembler language using Easy68K software. A simulant, 6800 Editor, and designed assembler are being assembled together as a unit, and then coded and used to produce and execute 6800 assembly language software package (Huang 2005, p. 34).

To put the system in place, an intelligent interpreting and communication machineries must be put in place. By using Motorola 68k assembler code, a system is for different application was designed and run to test its operation. To perform design simulation, we used the keyboard to key in text, which was printed on the screen. This report elucidates the tow software packages, which we composed and simulated.

The first set of exercise was aimed at helping us have a better understanding of the system and perform the assemble language methods. The model of these laboratory exercises entails inputting and outputting character by employing Trap command, the utilization of Stack for transitory storing of information and knowing of diverse ways of addressing styles/modes. Finally, in the exercise we will separate codes into subroutine.

The second task will involve writing a program in assemblage language that will allow us to compose note(s) that will pop up on the monitor requesting the operator to key in digits f, e and g. The designed program must be in a position to read these digits and compute y value where:

  • y=ex2 + fx + g

In addition, the write up illustrates with detailed models the positive assessment of the imitations and the programs of the two laboratory exercises. Lastly, the report exemplifies the outcomes attained after running the designed programs and deliberates the objectives achieved after carrying out the exercises, which may turn out to be beneficial for forthcoming technological advancement.

To achieve all these tasks as planned an intelligence system needs to be installed. This intelligence system is the microprocessor or microcontroller since it is able to accurately integrate commands and decode them into actions. Such a microprocessor will be chosen based on its speed, cost, and robustness. However, due to the complexity of the tasks involved, a microprocessor that will deliver results needs to be chosen.

Programming Background

Terminology used

  • Last in, first out(LIFO)
  • Pushed onto the top-of-stack
  • Next-on-stack
  • Pulled or propped from the top-of-stack

What is stack?

As stack consists of items where addition or subtraction can be performed on one of the end of the loop. It is regulated by assemblage language orders. To gain entry to the stack, items are added or detached at the top of the stack (LIFO).

The diagram below illustrates how a stack machine works.

How a stack machine works

The 68k Stack

Some specific computers are assembled in such a way that they utilize a hardware stack and it operates in a manner items relocated up and down the stack at the same time the pull and push process of the memory as the stack(no relocating of items). A stack cursor points to the top-of-stack. A 68k stack employs the address index A7 as a structure stack cursor. The 68k design process permits the utilization of A7 or SP in the orders executed. We have other optional register that can be employed as stack cursors to upsurge sum of stacks.

Below is a demonstration of how register A7 is used in the design:

  • MOVE.B D1, (A7) *push data in D1 to the stack
  • MOVE.B (A7), D0 *pop data from stack to DO

In information technology world, the stack is the crucial part when it comes to data storage. Stack is not on vital in data configuration but also has numerous significant applications namely:

  • Provisional storing of variables
  • Transitory storing of program addresses
  • Serving as communication link between codes and the subroutines

Addressing Modes

This is the process of locating the data in the design that is the system is designed in such a way that it is easy to find the data stored (memory addressing). The 68k microprocessor unit has five key memory addressing codes under full control of the programmer (Programmers Heaven 2010, p.1). These include:

  • Information or address index/register( this one has no right of entry to memory)
  • Immediate addressing( also known as the literal addressing)
  • Relative addressing modes(utilizes program/package offset and counter address)
  • Address resister secondary/indirect locating or addressing( they are variants in this mode)

Absolute Addressing

The operand is stated by its position in central memory. The absolute addressing mode is utilized to contact access. This mode does not offer a locating independent code and therefore cannot be used in retrieving lists. An example of absolute addressing code is MOVE.B D3, 1234 [M (1234)] < [D3]

Register Direct Addressing

The address is a central processing unit register, which does not access central memory (ARM 2011, p.2). The information is in a definite register. Register direct addressing mode is utilized in accessing those variables that are regularly used. For instance, variables such as CLR.B {A0}

Immediate Addressing

This is the operation procedures part of the orders of the design. A #sign designates it. This addressing mode is employed in stipulating a non-varying constant. For example, the addressing code written as MOVE.B #123, D4 [D4] <123

Indirect Addressing

Address resister indirect addressing mode (68k microprocessor unit support 4 variants of indirect addressing mode). The address/location of the operand is kept in any of the 68k location registers. Such operand is specified by encircling the register in ( ). The 68k microprocessor unit supports four variants of indirect addressing mode namely;

  • Indexed/catalogued addressing
  • Address register indirect with a displacement
  • Address register indirect with predecrementing
  • Address register indirect with postincrementing

For example, MOVE.B (A0), D3 [D3] < [M (A0)]

Relative Addressing

Relative addressing mode allows programmer to stipulate address with regard to the existing contents of program counter. Furthermore, it permits the programmer to compose location autonomous code. They utilize was is known as the Load Effective Address (LEA) orders, and once instructions are keyed in, the assembler will compute relative/comparative address offset. An example relative addressing is a below:

MOVE.B d16 (PC), D1 [D1] < [M (PC) +d16]

Laboratory Exercises

Exercise 1

In this laboratory exercise, we will compose a program in assemblage language of keying in characters from the keyboard and then the keyed in character will be displayed as message on the screen. Subroutines will be utilized in breaking down this huge program into easily controllable segment.

Below is the flowchart of the program that we will write:

Program flowchart.
Figure 1: program flowchart.

Figure 2 below shows the code and figure 3 shows the resulting message of the program

Program codes.
Figure 2: program codes.
Results for this program.
Figure 3: results for this program.

Exercise 1 (b)

For this second exercise, we will use the program developed in exercise 1(a) above and then key in string of characters using the keyboard/ control panel from the stack and display those characters on the screen. In this exercise, we will employ the push and pop subroutines and utilize them to put in practice the solution. Below is the flowchart of the program:

Flowchart diagram.
Figure 4: Flowchart diagram.
Program codes.
Figure 5: Program codes.
Program results.
Figure 6: Program results.

Exercise 1(c)

In this exercise, we will the same as in exercise 1(a) but this time round, we will make use of

  • absolute addressing modes
  • indirect addressing
  • immediate addressing.

The objective this exercise is to study how to program 68k microprocessor unit to interchange data from one place to another in diverse ways. Below diagram shows the program codes and the results of the program.

Program codes.

Program codes.
Figure 7: program codes.
Program results.
Figure 8: program results.

Exercise 2

This set of experimental exercise; we will compose a program using assembly language, which we will then use to key in message(s) to the monitor prompting the operator to key in three numbers namely a, b and c. The coded program must be in a position to read the keyed in numbers and compute the value of y in the equation:

  • y=ax2 + bx + c

In this exercise, we must describe x as a constant equivalent to 8, while the varying values in the equation being a, b and c. to be successful, we employ trap command for keying in and outputting of the information. Additional, the Stack is utilized as a provisional storage and then a single or multiple addressing modes from exercise 1(c). Subroutines likewise ought to be used where applicable (Easy68k, 2009, par. 4). The solution to the equation above must be displayed on the screen once the command is given. Below is the flowchart of the program

Program results.
Figure 9: program results.
Program codes.
Figure 10: program codes.
Program results.
Figure 11: program results.

Conclusion

In short, the report has talked about the tow practices for wring programs using 68k microprocessor assembler language and the simulation employed in testing their functionality. All the above programs were successful as seen by the display of the message(s) keyed in. All codes were successful for instance in exercise 2 where we were able to solve the equation and find the value of y. it is in this regard that we can say the programs were coded correctly and the codes developed are being utilized correctly without any errors.

Furthermore, the significance of these exercises is that we have gained many benefits, which is applied and developed further can help us in the future. Learning or understanding how to write or code a program on 68k assembler language helped us to gain the basic knowledge that we could use to be more inventive for future work. In addition, one of the learned lessons is that is critical to comprehend the codes and to use them accurately so as to have the correct result.

Above all, we have been able to have a thorough understanding of different programs and microprocessors and each specify areas where they are applied in our daily life. There were no setbacks in carrying out these exercises. Give resources, I will do more research and improve on the system.

List of References

ARM 2011, Processors. Web.

Easy68k, 2009, Editor/assembler/simulator for the 68000 S-record and binary file utility. Web.

Huang, H 2005, PIC microcontroller: An introduction to software and hardware interfacing, Cengage Learning, Stamford.

Koopman, P 1989, What is a stack?. Web.

Programmers Heaven, 2010, EASy68k 68000 editor, structured assembler, and simulator. Web.

Cite this paper

Select style

Reference

StudyCorgi. (2022, March 29). Microprocessor: Terminology and Analysis. https://studycorgi.com/microprocessor-terminology-and-analysis/

Work Cited

"Microprocessor: Terminology and Analysis." StudyCorgi, 29 Mar. 2022, studycorgi.com/microprocessor-terminology-and-analysis/.

* Hyperlink the URL after pasting it to your document

References

StudyCorgi. (2022) 'Microprocessor: Terminology and Analysis'. 29 March.

1. StudyCorgi. "Microprocessor: Terminology and Analysis." March 29, 2022. https://studycorgi.com/microprocessor-terminology-and-analysis/.


Bibliography


StudyCorgi. "Microprocessor: Terminology and Analysis." March 29, 2022. https://studycorgi.com/microprocessor-terminology-and-analysis/.

References

StudyCorgi. 2022. "Microprocessor: Terminology and Analysis." March 29, 2022. https://studycorgi.com/microprocessor-terminology-and-analysis/.

This paper, “Microprocessor: Terminology and Analysis”, was written and voluntary submitted to our free essay database by a straight-A student. Please ensure you properly reference the paper if you're using it to write your assignment.

Before publication, the StudyCorgi editorial team proofread and checked the paper to make sure it meets the highest standards in terms of grammar, punctuation, style, fact accuracy, copyright issues, and inclusive language. Last updated: .

If you are the author of this paper and no longer wish to have it published on StudyCorgi, request the removal. Please use the “Donate your paper” form to submit an essay.