Subversion Repositories Shiroi

Rev

Rev 11 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11 Rev 13
Line 1... Line 1...
1
/* $Id: math.c 11 2024-08-29 02:49:47Z nishi $ */
1
/* $Id: math.c 13 2024-08-29 04:36:14Z nishi $ */
2
 
2
 
3
#include "math.h"
3
#include "math.h"
4
 
4
 
5
#include "io.h"
5
#include "io.h"
6
 
6
 
Line 101... Line 101...
101
		fpu_stack = port - 2;
101
		fpu_stack = port - 2;
102
		fpu_command = port - 1;
102
		fpu_command = port - 1;
103
	}
103
	}
104
}
104
}
105
 
105
 
-
 
106
int muli(int a, int b){
-
 
107
	int n = 0;
-
 
108
	int i;
-
 
109
	if(b > 0){
-
 
110
		for(i = 0; i < b; i++) n += a;
-
 
111
	}else if(b < 0){
-
 
112
		for(i = 0; i > b; i--) n -= a;
-
 
113
	}
-
 
114
	return n;
-
 
115
}