w1.2: finish assignment1.2

This commit is contained in:
2024-09-15 11:05:17 +02:00
parent c16015123a
commit acd0b8861c
5 changed files with 92 additions and 8 deletions

View 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;
}