601.229 (S24): Assembly language mini exercises

Assembly language mini exercises

This page has some suggested assembly language mini exercises.

Starter project containing Makefile and hello world example program: asmMini.zip

Solutions: asmMini-soln.zip

Count to 10

Write an assembly language program that prints the integers from 1 to 10.

Expected output:

1
2
3
4
5
6
7
8
9
10

Count to N

Write an assembly language program that prompts the user to enter an integer value, and then prints the integers from 1 to the input value.

Example session (user input in bold):

Enter an integer: 7
1
2
3
4
5
6
7

Count to N by increment

Write an assembly language program which prompts the user to enter two integer values, a maximum and an increment. The program should then print out the integers from 1 to the maximum (inclusive), incrementing by the increment value.

Example session (user input in bold):

Enter maximum: 11
Enter increment: 3
1
4
7
10