You are on page 1of 4

KE26604

COMPUTER ARCHITECTURE AND MICROPROCESSORS

MICROPROCESSOR LAB 5

Microprocessor Lab 5
Objectives The objectives of this lab are: 1. Learn how to implement selections and iterations Pre-Lab 1. Draw a flowchart for the program ASCII.asm shown in Figure 1. 2. In the program ASCII.asm, the jump command was used to perform program control. You are required to modify the program ASCII.asm by using the loop command instead of the jump command while maintaining the same function of the program. Call this program ASCII2.asm 3. You are required to design and code an assembly language program odd9.asm that displays the odd numbers between 1 and 9 on the screen 4. Draw a flowchart for the program VOTE.asm shown in Figure 2. 5. You are required to design and code an assembly language program vote2.asm that performs the followings: a) Request the user to enter his name and age. The name can be up to 40 characters long while the age is only two decimal integer b) If the user age is 21 years or above then message1 should be displayed. However, if the user age is below 21 years then message2 should be displayed Message 1. Congratulation <name> you are eligible to vote. Message 2. Sorry <name> you are under age. The <name> should be replaced with name of the user

KE26604

COMPUTER ARCHITECTURE AND MICROPROCESSORS

MICROPROCESSOR LAB 5

Experiment #1 Iteration 1. Create the source code ASCII.asm as shown in Figure 1 2. 3. 4. Assemble the source code ASCII.asm to ASCII.obj Link the object file ASCII.obj to produce the executable file ASCII.exe

Run the ASCII.exe program

KE26604

COMPUTER ARCHITECTURE AND MICROPROCESSORS

MICROPROCESSOR LAB 5

Experiment #2 Iteration Assemble, link and run the ASCII2.asm program

Experiment #3 Iteration Assemble, link and run the odd9.asm program

Experiment #4 Selection 1. Create the source code VOTE.asm as shown in Figure 2 2. 3. 4. Assemble the source code VOTE.asm to VOTE.obj Link the object file VOTE.obj to produce the executable file VOTE.exe Run the VOTE.exe program

Experiment #5 Selection Assemble, link and run the vote2.asm program

Submissions Before the Lab The flowchart for the program ASCII.asm, ASCII2.asm, vote.asm, and vote2.asm The source code for the program ASCII2.asm, and vote2.asm After the Lab The source code for the program ASCII2.asm, and vote2.asm

KE26604

COMPUTER ARCHITECTURE AND MICROPROCESSORS

MICROPROCESSOR LAB 5

You might also like