65816 now generate EXPR_NEARADDR instead of EXPR_WORD0 for default assumed address mode, which will be validated by the linker's range check rather than blindly truncated. Assuming the assembler correctly validated this, the linker is allowed to truncate.

This commit is contained in:
bbbradsmith
2019-05-01 02:12:03 -04:00
committed by Oliver Schmidt
parent a01c4231f2
commit ac2ecb0b2c
7 changed files with 61 additions and 3 deletions

View File

@@ -1217,7 +1217,7 @@ static void EmitCode (EffAddr* A)
** mode, force this address into 16 bit range to allow
** addressing inside a 64K segment.
*/
Emit2 (A->Opcode, GenWordExpr (A->Expr));
Emit2 (A->Opcode, GenNearAddrExpr (A->Expr));
} else {
Emit2 (A->Opcode, A->Expr);
}