| * addresses within the image are given relative to the start of the image. |
* addresses within the image are given relative to the start of the image. |
| * If the word is =-1, the address is NIL, |
* If the word is =-1, the address is NIL, |
| * If the word is between -2 and -5, it's a CFA (:, Create, Constant, User) |
* If the word is between -2 and -5, it's a CFA (:, Create, Constant, User) |
| * If the word is -6, it's a DOES> CFA |
* If the word is -7, it's a DOES> CFA |
| * If the word is -7, it's a DOES JUMP |
* If the word is -8, it's a DOES JUMP |
| * If the word is <-7, it's a primitive |
* If the word is <-9, it's a primitive |
| */ |
*/ |
| |
|
| void relocate(Cell *image, char *bitstring, int size, Label symbols[]) |
void relocate(Cell *image, char *bitstring, int size, Label symbols[]) |
| case CF(DOVAR) : |
case CF(DOVAR) : |
| case CF(DOCON) : |
case CF(DOCON) : |
| case CF(DOUSER) : |
case CF(DOUSER) : |
| case CF(DODEFER) : MAKE_CF(image+i,symbols[CF(image[i])]); break; |
case CF(DODEFER) : |
| |
case CF(DOSTRUC) : MAKE_CF(image+i,symbols[CF(image[i])]); break; |
| case CF(DODOES) : MAKE_DOES_CF(image+i,image[i+1]+((Cell)image)); |
case CF(DODOES) : MAKE_DOES_CF(image+i,image[i+1]+((Cell)image)); |
| break; |
break; |
| case CF(DOESJUMP): MAKE_DOES_HANDLER(image+i); break; |
case CF(DOESJUMP): MAKE_DOES_HANDLER(image+i); break; |