diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/assembler.c | 40 | ||||
| -rw-r--r-- | lib/memoire.c | 2 | 
2 files changed, 35 insertions, 7 deletions
| diff --git a/lib/assembler.c b/lib/assembler.c index 4abdb62..3fda135 100644 --- a/lib/assembler.c +++ b/lib/assembler.c @@ -1812,6 +1812,40 @@ void asm_eof(FILE * f)  						break;  					}  				} +				if (ttext->Expr->op == OP_DECAL) { +					if ((ttext->Expr->child->e_subtype == E_LABEL) && (ttext->Expr->child->next->e_subtype == E_VALUE)) { +						a = ttext->Expr->child->next->avalue; +						nbsymbols++; +						writeword(1, f2, 1); +						writeword(ttext->offset, f2, 1); +						writeword(strlen(ttext->Expr->child->symbol), f2, 1); +						writestring(ttext->Expr->child->symbol, f2); +						nbe++; +						break; +					} +				} +				if (ttext->Expr->op == OP_PLUS) { +					if (((ttext->Expr->child->e_subtype == E_LABEL) && (ttext->Expr->child->next->e_subtype == E_VALUE)) || ((ttext->Expr->child->e_subtype == E_VALUE) && (ttext->Expr->child->next->e_subtype == E_LABEL))) { +						if (ttext->Expr->child->e_subtype == E_LABEL) { +							a = ttext->Expr->child->next->avalue; +							nbsymbols++; +							writeword(1, f2, 1); +							writeword(ttext->offset, f2, 1); +							writeword(strlen(ttext->Expr->child->symbol), f2, 1); +							writestring(ttext->Expr->child->symbol, f2); +							nbe++; +						} else { +							a = ttext->Expr->child->avalue; +							nbsymbols++; +							writeword(1, f2, 1); +							writeword(ttext->offset, f2, 1); +							writeword(strlen(ttext->Expr->child->next->symbol), f2, 1); +							writestring(ttext->Expr->child->next->symbol, f2); +							nbe++; +						} +						break; +					} +				}  				if (ttext->Expr->op != OP_FUNC_CALL) {  					exception(1, _("Can't evaluate expression for a direct value"));  				} @@ -1890,12 +1924,6 @@ void asm_eof(FILE * f)  				nbe++;  				break;  			case E_OPERATION: -				if (tdata->Expr->op == OP_DIRECT) { -					if (tdata->Expr->child->e_subtype == E_VALUE) { -						a = tdata->Expr->child->avalue; -						break; -					} -				}  				if (tdata->Expr->op != OP_FUNC_CALL) {  					exception(1, _("Can't evaluate expression for a direct value"));  				} diff --git a/lib/memoire.c b/lib/memoire.c index 869c708..ee99983 100644 --- a/lib/memoire.c +++ b/lib/memoire.c @@ -99,7 +99,7 @@ void ST(Uint32 offset, Uint32 valeur)  		break;  	case 0xffffff0a:  		litchaine(temp, &memoire_principale[valeur]); -		ChargeBinaire(char * temp); +		ChargeBinaire(temp);  	default:  		if (offset < 0 || offset >= TAILLE_MEMOIRE)  			exception(1, _("Invalid Memory Adress")); | 
