#include "spice.h"
#include "mfb.h"
Go to the source code of this file.
void MFBGenCode |
( |
char * |
PM | ) |
|
Definition at line 99 of file mfbgnc.c.
103 struct timeb time1, time2;
104 float reftime, elapsedtime;
106 static char result[512];
113 register int which = 0;
114 register int reg=0, Reg=0;
118 int hiy,hix,loy,lox,extra,ohiy,ohix,oloy,oextra;
142 mfbarg(cp, Reg, reg, tmp);
147 reftime = (float)(time1.time * 1000 + time1.millitm);
150 elapsedtime = (float)(time2.time * 1000 + time2.millitm)
152 if(elapsedtime > (
float)tmp)
156 sleep((tmp + 999) / 1000);
206 (void) sprintf(dp,
"%d",which);
207 while(*dp != 0) ++dp;
212 *dp++ = (which / 100) +
'0';
217 *dp++ = (which / 10) +
'0';
218 *dp++ = (which % 10) +
'0';
223 if (*cp >=
'1' && *cp <=
'4') {
224 for (i = *cp++ -
'1'; i >= 0; i--){
232 if (*cp >=
'1' && *cp <=
'6') {
233 for (i = *cp++ -
'1'; i >= 0; i--){
234 *dp++ =
octal(which>>(i*3));
241 if(*cp ==
'i' || *cp ==
'r'){
243 if (tmp < 0) tmp = -tmp;
253 lo1 = tmp - hi1 * 16 + 32;
255 lo1 = tmp - hi1 * 16 + 48;
259 hi2 = tmp - hi1 * 64 + 64;
269 lo1 = exponent - hi1 * 16 + 48;
273 hi2 = exponent - hi1 * 64 + 64;
278 *dp++ = exponent + 64;
305 hiy = (y1 >> 7) & 037;
306 extra = x1 & 03 | ((y1 & 03) << 2);
307 loy = (y1 >> 2) & 037;
308 hix = (x1 >> 7) & 037;
309 lox = (x1 >> 2) & 037;
320 *dp++ = extra | 0140;
327 *dp++ = extra | 0140;
330 else if(loy != oloy){
423 which = (which/10 << 4) + which%10;
427 which = which - 2 * (which%16);
#define mfbarg(cp, Reg, reg, val)