Assembly Sample Programs

By WANG Lin

Programs

Description

calculate1

 

calculate2

 

DtoO

Convert a decimal number(0~63) to Octal representation

reverse

Output a reversed word of an input string

testchar

To test the Ascii value of any character.

library

Some useful I/O subroutines.

libraryM

Some useful I/O subroutines which simulates the same situation as on M68k. For an example, when user calls "jsr strout", the user need to store the starting address and length at A0 and D0 instead of A1 and d1.

MaxMinAv.x68

Read an array of integers then output the min., the max., and the average of these numbers.

readarr

Read an array of numbers from keyboard, then print them on screen.

grade

 

hanoi

A Hanoi game simulation

 

 

... ... ...

 

 

 

Assignment1 & Solutions

 

Assignment 2

 Answer: Question1, Question 2, Question 3, Question 4

Assignment 3

 

Assignment 4