/* ------------------------------------------------------------------------- */
/* "asm" : The Inform assembler */
/* */
-/* Copyright (c) Graham Nelson 1993 - 2018 */
-/* */
-/* This file is part of Inform. */
+/* Part of Inform 6.35 */
+/* copyright (c) Graham Nelson 1993 - 2021 */
/* */
/* Inform is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
if (operand_rules==TEXT)
{ int32 i;
- uchar *tmp = translate_text(zcode_holding_area + zcode_ha_size, zcode_holding_area+MAX_ZCODE_SIZE, AI->text);
+ uchar *tmp = translate_text(zcode_holding_area + zcode_ha_size, zcode_holding_area+MAX_ZCODE_SIZE, AI->text, STRCTX_GAMEOPC);
if (!tmp)
memoryerror("MAX_ZCODE_SIZE", MAX_ZCODE_SIZE);
j = subtract_pointers(tmp, (zcode_holding_area + zcode_ha_size));
sprintf(fnt, "[ %s(", name);
AO.marker = STRING_MV;
AO.type = CONSTANT_OT;
- AO.value = compile_string(fnt, FALSE, FALSE);
+ AO.value = compile_string(fnt, STRCTX_INFIX);
assembleg_1(streamstr_gc, AO);
if (!stackargs) {
sprintf(fnt, "%s%s = ", (ix==1)?"":", ", variable_name(ix));
AO.marker = STRING_MV;
AO.type = CONSTANT_OT;
- AO.value = compile_string(fnt, FALSE, FALSE);
+ AO.value = compile_string(fnt, STRCTX_INFIX);
assembleg_1(streamstr_gc, AO);
AO.marker = 0;
AO.type = LOCALVAR_OT;
sprintf(fnt, "%s = ", variable_name(1));
AO.marker = STRING_MV;
AO.type = CONSTANT_OT;
- AO.value = compile_string(fnt, FALSE, FALSE);
+ AO.value = compile_string(fnt, STRCTX_INFIX);
assembleg_1(streamstr_gc, AO);
AO.marker = 0;
AO.type = LOCALVAR_OT;
AO.marker = STRING_MV;
AO.type = CONSTANT_OT;
- AO.value = compile_string(") ]^", FALSE, FALSE);
+ AO.value = compile_string(") ]^", STRCTX_INFIX);
assembleg_1(streamstr_gc, AO);
}
}
((form_len == 2) ? "short" : "long")));
}
if (form_len == 1) {
- if (addr < -0x80 && addr >= 0x80) {
+ if (addr < -0x80 || addr >= 0x80) {
error("*** Label out of range for byte branch ***");
}
- zcode_holding_area[i] = (addr) & 0xFF;
+ zcode_holding_area[i] = (addr) & 0xFF;
}
else if (form_len == 2) {
- if (addr < -0x8000 && addr >= 0x8000) {
+ if (addr < -0x8000 || addr >= 0x8000) {
error("*** Label out of range for short branch ***");
}
zcode_holding_area[i] = (addr >> 8) & 0xFF;