w1.2: finish assignment1.2
This commit is contained in:
22
assignment_assembly/assignment2/main.c
Normal file
22
assignment_assembly/assignment2/main.c
Normal file
@@ -0,0 +1,22 @@
|
||||
/* main.c simple program to test assembler program */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
extern int test(int a, int b);
|
||||
extern unsigned int multiply(unsigned int a, unsigned int b);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
extern void initialise_monitor_handles(void);
|
||||
initialise_monitor_handles();
|
||||
|
||||
int a = test(3, 5);
|
||||
printf("Result of test(3, 5) = %d\n", a);
|
||||
|
||||
unsigned int b = multiply(3, 5);
|
||||
printf("Result of multipy(3, 5) = %d\n", b);
|
||||
|
||||
b = multiply(3, 0);
|
||||
printf("Result of multipy(3, 0) = %d\n", b);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user