Sei sulla pagina 1di 3

UNIVERSITY OF DAR ES SALAAM

College Of Engineering and Technology

Department of Electrical and Computer Systems Engineering

TAKE HOME ASSIGNMENT


FRIDAY JANUARY 21ST 2011

CS452: Microcomputer Systems III

Instruction to Candidates:

1. The assignment has three Questions


2. In Groups of not more than 5 students attempt all three Questions
3. Do not use procedures from utility.lib
4. The comment field in all assembly statements is mandatory
5. All university rules for closed book examinations apply
6. Submit a typewritten report on Friday 28th January 2011
7. A soft copy for question 1 and 2 must be submitted on 31st January 2011

Examiner: CAM
QUESTION ONE

In mathematics, Pascal's triangle is a geometric arrangement of the binomial


coefficients in a triangle. It is a triangle of numbers in which a row represents the
coefficients of the binomial series. The apex of the triangle is 1 and each row starts and
ends with 1, other numbers being obtained by adding together the two numbers on either
side in the row above: Pascal triangle find intensive use in probabilities. The triangle
below shows six rows of a Pascal triangle.

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1

1a. Write assembly program that displays ten rows of a Pascal’s triangle

1b. Write assembly program that generate and displays ten rows of a Pascal’s triangle

QUESTION TWO

Using the XLAT instruction and int16 for direct keyboard input, write an assembly
language program that filters input from the console by screening out all ASCII codes
less than 32 or greater than 127.

QUESTION THREE

Suppose you have an eight bit I/O device connected to two I/O ports. Suppose bit zero of
port 310h contains a one if data is available and a zero otherwise. If data is available, the
CPU must read the eight bits at port 311h. Reading port 311h clears bit zero of port 310h
until the next byte arrives. Using a classical polling loop to wait for each available

©CAM 2011 2/2


character, write assembly code that will enable you to read 9000 bytes from this port.
Data read should be stored in an array called My Data.

©CAM 2011 3/2

Potrebbero piacerti anche