-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLab3.s
71 lines (54 loc) · 2.12 KB
/
Lab3.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* DO NOT MODIFY THIS --------------------------------------------*/
.text
.global AssemblyProgram
AssemblyProgram:
lea -40(%a7),%a7
movem.l %d2-%d7/%a2-%a5,(%a7)
/*----------------------------------------------------------------*/
/******************************************************************/
/* General Information ********************************************/
/* File Name: Lab3.s *********************************************/
/* Wing Hoy ******************************************************/
/* Date: April 1, 2009 ******* **/
/* General Description: **/
/* This file is not to be modified by the students. **************/
/* The three subroutines written by the students are called by this*/
/* File **********************************************************/
/******************************************************************/
/* Do Not Modify and of this *****************************.ualberta.ca
********/
/*Applies to the first Subroutine */
move.l #0xEEEEEEEE, -(%sp) /*replace this memory with the number of entries*/
move.l #0xDDDDDDDD, -(%sp) /*replace this memory with the divisibility number*/
jsr WelcomePrompt
move.l (%sp)+, %d2
move.l (%sp)+, %d3
/*End first subroutine*/
/*Applies to the second Subroutine */
move.l #0xFFFFFFFF, -(%sp) /*replace this memory with the number of divisible times*/
move.l %d3, -(%a7)
move.l %d2, -(%a7)
move.l #0x2300000,%a2
move.l #0x2310000,%a3
jsr Stats
move.l (%sp)+, %d2
move.l (%sp)+, %d3
move.l (%sp)+, %d4
/*End second subroutine*/
/*Applies to the third Subroutine */
move.l %d4, -(%a7)
move.l %d3, -(%a7)
move.l %d2, -(%a7)
move.l #0x2300000,%a2
move.l #0x2310000,%a3
jsr Display
move.l (%sp)+, %d2
move.l (%sp)+, %d3
move.l (%sp)+, %d4
/*End third subroutine*/
/*End of program **************************************************/
/* DO NOT MODIFY THIS --------------------------------------------*/
movem.l (%a7),%d2-%d7/%a2-%a5
lea 40(%a7),%a7
rts
/*----------------------------------------------------------------*/