COMPUTER ARCHITECTURE – SYST26671 | PROGRAMMING ASSIGNMENT - 1 Solution

COMPUTER ARCHITECTURE – SYST26671 | PROGRAMMING ASSIGNMENT - 1


1. This assignment is to be completed individually. Any violation of Academic Integrity will

result in the assignment being marked as zero (0).

2. This programming assignment is of 15%.

3. The filename should be Prog1-Firstname-Lastname.

4. You are required to submit a soft copy (so your instructor can test in EMU8086) via SLATE.

5. If the submitted program does not work, it will be marked as zero (0).

6. Write your names, student ids and page numbers on each page by using header/footer.

7. All the answers should be in proper format, well explained, neat and clean. Otherwise, I'll

deduct grades.

8. Provide the screenshots of the program outputs. Make sure your code compiles with no

warnings, no errors and no exceptions.

9. Don't forget to add the Emulator Program Files (.asm) to the ZIP file, along with the screenshots

of the output.

10. ZIP all the files together and upload it to Assignment in SLATE. E-mail submissions will not

be accepted.

11. Your ZIP file should contain:

a. This DOC file with Screenshots of programs and their outputs.

b. Emulator programs (.asm files)

Name: _____________________________________ Student Id: _________________


Programming Exercises

1. Write an 8086 assembler program (using the emulator) that will perform the following

calculations without using stack. (5)

7 * (4 + 10) + (15 / 5)

a) Your program must place the answer in the AX register.

b) Please attach .asm file and screenshot of output to this assignment.

Screenshot of Program:

Screenshot of Output:

2. Write a program to calculate the grades for a student, using if..else statement.

Grade:

Grade A: Marks>=75

Grade B: Marks>=60

Grade C: Marks>=50

Grade D: Marks>=40

Fail: Marks<40 (5)

Screenshot of Program:

Screenshot of Output:

Name: _____________________________________ Student Id: _________________


3. Using the Emu8086, write a program to add first 10 numbers using procedure. Your

program should store the answer in the AX register. Please attach .asm file and screenshot of

output to this assignment. (5)

Screenshot of Program:

Screenshot of Output: