Order from us for quality, customized work in due time of your choice.
Introduction
The basic concept of a microprocessor is a component hardware referred to as the central processing unit (CPU) that executes data and instructions in a logical sequence of computations in the CPU through instructions written in an assembly programming language recognizable by the CPU. Assembly language instructions are usually written in binary code that is typically represented in 0s and 1s. Assembly language instructions are executed in real time and no translations are required to create executable object code of the instructions.
The following sections of the report discuss four laboratory exercises performed with the objective of understanding assembly language techniques and operations using Easy68k software. The 6800 program code or instructions are written in assembly language and are created using a structured Assembler and Simulator and translated into the object code using the 68000 Editor.
The process involved writing assembly language instructions in a typical environment that consisted of a Motorola 68k assembler code. The program code was written and run or executed to verify the functional operation of the Motorola 68k assembler code. Simulations were done by entering inputs through the keyboard which were output to the console unit in text format. The entire project was covered in the four exercises as discussed below.
Typically, the laboratory exercises were simple simulations conducted to perform arithmetic, multiplication, division, and subtraction operations on input simulation data values as the first step. The second step consisted of running a coffee menu system, while the third consisted of reading and displaying array elements in reverse order. Each of the exercises involved character inputs and outputs that employ address registers and the trap command.
Technical Background
Motorola 68000 Microprocessor
The Motorola 68000 microprocessor is a 16/32 bit hardware component whose architecture is a complex instruction set computer (CISC).It executes or performs low level operations such as load from memory, and performs a number of other operations such as loading from memory store and arithmetic operations. Operations for handling data and memory are done in three steps. The operations are done with the instruction to set register, then migrating data in and out of the register, and finally performing read and write operations on the data. Arithmetic operations are bitwise operations that are done by comparing values stored in the hardware registers.
Doty (1979) explains that these instructions are executed in a logical sequence of steps through control flow techniques. Control flow constructs are typically characterized by branching to execute specific instructions when specific conditions are identified to be true, conditional branching where a condition leads to the selection of instructions to be executed, and indirect branching where calls can be made to execute instructions saved at a particular location in a memory location (Clements, 2000).
Clements (2000) shows that the processor can perform a multi-set of operations based on single a instruction and addressing mode. Addressing mode is specific to the architecture of the computer and is related to program instructions that include machine language specific data types, small memory storage areas known as registers, interrupts that are signals sent to inform the CPU of the need to swap instructions out of memory after saving the status of the instructions. Interruptions are caused by interrupt handlers. The interruption processes are referred to as interrupt requests (IRQ).
The microprocessor is a family of microprocessor that were introduced in 1979 with the first family microprocessor identified to be the 68000 being the first of the array of the 68k microprocessors.
The microprocessor has found a range of applications in the last 20 years particularly in personal computers for home use. Among these family of computers included the Apple Lisa and Macintosh, among others. In addition to that, the microprocessor has been successfully used in laser printers that is operated and driven by controllers that were external by integrating the functionality of the 68000 CPU (EASy68K, 2009).
Other typical applications areas have been in home consoles, arcade games like the Sega mega drive.
The microprocessor applications has culminated in more recent uses with their off springs being in television set-top boxes, in telephone equipments, in medical equipments, in laboratory equipments, and in networking.
Easy68k
The architecture of the Easy68k is characterized by Edit68K editor/assembler and the Sim68K simulator/debugger executables. These tools are supported on the Win32 platform and Microsoft Windows products (including XP) platform that incorporates an integrated editor / assembler and simulator. The 68000 simulation is done using the simulation tool with optimal use of minimal infrastructure resources. These resources include the 68000 processor consisting of all records with a complete 16 MBs of RAM of available memory space.
The architecture hosts peripheral devices including the keyboard and a computer screen that provide input/output functionalities. More advanced features integrated into the architecture provide sound, graphical, and file functionalities. Error handling and correction are built-in features. Automatic update features and memory content displays are other features integrated into the whole architectures.
In the EASy68K (2009), it is discussed that Assembly language instructions can be created using the EASy68K suites Edit68K Editor/Assembler (Edit68K.exe) program that are built together with the 68000 which offers architectural support for the assembler and acts as the source of the source code that is translated into object code. Symbols are not used to provide a link with since assembly processes and the assembler are already supported above. The EASy68K assembler generates files that are important including the S-record file and the list file at run time as discussed below.
S-record file (. S68)
The S-record file (. S68) typically provides services equivalent to the 68000 binary machine code with executable restrictions to the ASCI format. Motorola provides the files encoding scheme embedded with characters that are printed and organized linearly according to ASCI standards. The encoding makes the machine code to be compatible with RS-32 communication protocol which is a critical component in the development of boards for accepting the native machine code. It is important to note that the simulator belonging to the EASY68K family has a built-in capability to read the S-record file and conduct simulations of the executable code. An additional feature of the ASy68K assembler is its capability to produce additional binary file tagged as.BIN constituting the original 68000 binary or machine code. (Kelly, 2010).
List file (.L68)
The distinguishing feature on this file is that every line of code is defined by machine code and the absolute address is defined and represented the hexadecimal form. The constituent contents of this file are a copy of the contents of the original source file. The following figure illustrates the assembly procedure and debugging process for the array of EASY68K family or suite.
Laboratory Exercises
A laboratory exercise consisted of writing code to accept two numbers from the user and output the result to the screen. Typically, the exercise consisted of three functions for performing sum, multiplication and division operations.
Addition
The output from running the code is shown below. The interface clearly sshow clearly how the user is prompted to enter two values then performs the add operation and outputs the result to the console unit. Two values that were used included 5 and 5 as the first and second values respectively. The output from the operations, as is evident, is 10.
Screen shot from the output by running the code below for the add operation.
Multiplication Operation
The screen shot below shows the output for a multiplication operation performed when the preceding code was run in the exercise. An observation from the screen shot shows that the user is prompted to enter two numbers, and typically, the two numbers were 4 respectively. Then the syntax and semantics for the multiplication operation are shown on the screen. Then the output is displayed on the screen.
Below is an illustration of the code that was executed to produce the output shown here. As commented on the program code, different sections of code perform different functions.
Division operation
The division operation is performed as illustrated below on the screen shot. The system prompts the user to enter two values in this case 4 and 2 were the values used to demonstrate the division operation.
One part of the code was intended to display a message from the system when an action is performed or for prompting the user for an action. Subsequent code performed the division operation and the last code took the results from the division operation and displayed the results to the screen as illustrated below.
Exercise 2
In order to simulate the operation of a coffee dispensing machine with a menu system with options to select from, the following simulation exercise was conducted. The simulation was characterized by a set of numbers which if pressed could provide the user with the selected option.
Each option provided the user with a specific type of drink. The user could be prompted to enter a number into the system through the keyboard, and once the system receives a number, designate code is executed and instructions specific to the option are executed and performed by the machine. Foe example, if the user presses 2 on being prompted, the machine will display the option for tea, 1 presents the option for coffee, and 3 provides the option for chocolates and when one wants to quit from the system, a prompt to enter or press 4 provides the quit option as illustrated below by the screen shot.
Below is a representation of the cod that was run to provide the above outputs and command the machine to perform the selected options.
The above code could be run for a given user selection or option to be effected. The user is prompted to enter an appropriate choice and an output to the console unit indicates the option from the user and provides guidance for the user of the system as indicated below on the screen shot.
The code that runs the following instructions is shown below.
Exercise 3
In this exercise, the user is prompted to enter a series of digits in a sequence. When the program is executed, the numbers are reversed in the order they were entered from the user though the keyboard. Different sections of code perform different actions which aggregate to provide the final result. Typically, if the user enters numbers such as 1, 2, 3, in that order, the numbers are reversed after program execution and the output could be 3, 2, 1 orders. The driver program for the instructions is shown below.
Conclusion
A typical scenario covered in the above report for writing program code in assembly language using Easy68K software and appropriate tests were conducted with successful outputs. Each of the four exercises involved writing and running assembly code with the results successfully displayed in the screen. Each of the exercises consists of the respective code that was executed for the results. One of the critical benefits of the exercise was to inform about procedures for writing assembly program code using Easy68k software interface and associated editors for debugging.
That forms a prerequisite to understanding how to code in assembly languages specific to specific hardware component architectures since assembly languages are not compatible across different hardware platforms. Besides that, the need to understand typical applications of the microprocessors in everyday life and the kind of programs and the syntax and semantics of such language statements to achieve program objectives in real life has been covered and demonstrated appropriately. However, the need to be more innovative when conducting future similar exercises is critical as innovation is the driving force in any field of study to inform new and more findings.
References
Clements, A., 2000. The Principles of Computer Hardware, 3rd ed. New York: University Press.
Doty, Keith L., 1979. Fundamental principles of microcomputer architecture. New York: Matrix Publishers.
EASy68K, 2009. Editor/Assembler/Simulator for the 68000 S-Record and Binary file Utility. Web.
Kelly, C., 2010. EASy68k 68000 Editor, Structured Assembler, and Simulator. Web.
Order from us for quality, customized work in due time of your choice.