| int i=0, j, k, steps=(size/sizeof(Cell))/RELINFOBITS; |
int i=0, j, k, steps=(size/sizeof(Cell))/RELINFOBITS; |
| Cell token; |
Cell token; |
| char bits; |
char bits; |
| |
Cell max_symbols; |
| |
|
| /* printf("relocating %x[%x]\n", image, size); */ |
/* printf("relocating %x[%x]\n", image, size); */ |
| |
|
| |
for (max_symbols=DOESJUMP+1; symbols[max_symbols]!=0; max_symbols++) |
| |
; |
| size/=sizeof(Cell); |
size/=sizeof(Cell); |
| |
|
| for(k=0; k<=steps; k++) { |
for(k=0; k<=steps; k++) { |
| default : |
default : |
| /* printf("Code field generation image[%x]:=CA(%x)\n", |
/* printf("Code field generation image[%x]:=CA(%x)\n", |
| i, CF(image[i])); */ |
i, CF(image[i])); */ |
| |
if (CF(token)<max_symbols) |
| image[i]=(Cell)CA(CF(token)); |
image[i]=(Cell)CA(CF(token)); |
| |
else |
| |
fprintf(stderr,"Primitive %d used in this image at $%lx is not implemented by this\n engine (%s); executing this code will crash.\n",CF(token),(long)&image[i],VERSION); |
| } |
} |
| else |
else |
| image[i]+=(Cell)image; |
image[i]+=(Cell)image; |