removed 0.93 dialect, as it was buggy and not really useful

git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@208 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
marcobaye 2020-06-01 17:49:46 +00:00
parent 8a3bdb265f
commit 8c751f3552
6 changed files with 29 additions and 13 deletions

View File

@ -449,10 +449,10 @@ struct dialect {
struct dialect dialects[] = {
{VER_OLDEST_SUPPORTED, "0.85", "(the oldest version supported)"},
{VER_DEPRECATE_REALPC, "0.86", "\"!realpc\" gives a warning, \"!to\" wants a file format"},
{VER_ALLOW_SETPC_IN_PSEUDOPC, "0.93", "\"*=\" no longer ends offset assembly"},
// {VER_SHORTER_SETPC_WARNING, "0.93", "\"*=\" in offset assembly gives shorter warning but still switches off"},
{VER_RIGHTASSOCIATIVEPOWEROF, "0.94.6", "\"power of\" is now right-associative"},
// {VER_, "0.94.7", "empty code segments are no longer included in output file"},
{VER_DISABLED_OBSOLETE_STUFF, "0.94.8", "disabled \"!cbm\", \"!realpc\" and \"!subzone\""},
{VER_DISABLED_OBSOLETE_STUFF, "0.94.8", "\"*=\" works inside \"!pseudopc\", disabled \"!cbm/!realpc/!subzone\""},
{VER_NEWFORSYNTAX, "0.94.12", "new \"!for\" syntax"},
// {VER_, "0.95.2", "changed ANC#8 from 0x2b to 0x0b"},
// {VER_CURRENT, "default", "default"},

View File

@ -61,10 +61,10 @@ extern char GotByte; // Last byte read (processed)
enum version {
VER_OLDEST_SUPPORTED, // v0.85 looks like the oldest version it makes sense to actually support
VER_DEPRECATE_REALPC, // v0.86 made !pseudopc/!realpc give a warning to use !pseudopc{} instead, and !to wants a file format
VER_ALLOW_SETPC_IN_PSEUDOPC, // v0.93 allowed *= inside !pseudopc blocks
VER_SHORTER_SETPC_WARNING, // v0.93 claimed to allow *= inside !pseudopc blocks, but didn't! It only shortened the warning!
VER_RIGHTASSOCIATIVEPOWEROF, // v0.94.6 made "power of" operator right-associative
// v0.94.7 fixed a bug: empty code segments no longer included in output file
VER_DISABLED_OBSOLETE_STUFF, // v0.94.8 disabled !cbm, !pseudopc/!realpc, !subzone
VER_DISABLED_OBSOLETE_STUFF, // v0.94.8 made *= work inside !pseudopc, disabled !cbm/!realpc/!subzone
VER_NEWFORSYNTAX, // v0.94.12 introduced the new "!for" syntax
// v0.95.2 changed ANC#8 from 0x2b to 0x0b
VER_CURRENT, // "RELEASE"

View File

@ -578,10 +578,18 @@ void vcpu_set_pc(intval_t new_pc, int segment_flags)
intval_t new_offset;
// support stupidly bad, old, ancient, deprecated, obsolete behaviour:
if ((config.wanted_version < VER_ALLOW_SETPC_IN_PSEUDOPC)
&& (pseudopc_current_context != NULL)) {
Throw_warning("Offset assembly still active at end of segment. Switched it off.");
pseudopc_end();
if (pseudopc_current_context != NULL) {
if (config.wanted_version < VER_SHORTER_SETPC_WARNING) {
Throw_warning("Offset assembly still active at end of segment. Switched it off.");
pseudopc_end_all();
} else if (config.wanted_version < VER_DISABLED_OBSOLETE_STUFF) {
Throw_warning("Offset assembly still active at end of segment.");
pseudopc_end_all(); // warning no longer said it
// would switch off, but still did. nevertheless, there
// is something different to older versions: when the
// closing '}' or !realpc is encountered, _really_ weird
// stuff happens! i see no reason to try to mimic that.
}
}
new_offset = (new_pc - CPU_state.pc.val.intval) & 0xffff;
CPU_state.pc.val.intval = new_pc;
@ -670,9 +678,9 @@ void pseudopc_end(void)
// trying to end offset assembly though it isn't active:
// in current versions this cannot happen and so must be a bug.
// but in versions older than 0.94.8 this was possible using
// !realpc, and before v0.93 offset assembly got automatically
// disabled when encountering "*=".
// so only choke if wanted version is new enough:
// !realpc, and offset assembly got automatically disabled when
// encountering "*=".
// so if wanted version is new enough, choke on bug!
if (config.wanted_version >= VER_DISABLED_OBSOLETE_STUFF)
Bug_found("ClosingUnopenedPseudopcBlock", 0);
} else {
@ -681,6 +689,12 @@ void pseudopc_end(void)
pseudopc_current_context = pseudopc_current_context->outer; // go back to outer block
}
}
// this is only for old, deprecated, obsolete, stupid "realpc":
void pseudopc_end_all(void)
{
while (pseudopc_current_context)
pseudopc_end();
}
// un-pseudopc a label value by given number of levels
// returns nonzero on error (if level too high)
int pseudopc_unpseudo(struct number *target, struct pseudopc *context, unsigned int levels)

View File

@ -104,6 +104,8 @@ struct pseudopc;
extern void pseudopc_start(struct number *new_pc);
// end offset assembly
extern void pseudopc_end(void);
// this is only for old, deprecated, obsolete, stupid "realpc":
extern void pseudopc_end_all(void);
// un-pseudopc a label value by given number of levels
// returns nonzero on error (if level too high)
extern int pseudopc_unpseudo(struct number *target, struct pseudopc *context, unsigned int levels);

View File

@ -646,7 +646,7 @@ static enum eos po_pseudopc(void)
static enum eos po_realpc(void)
{
old_offset_assembly();
pseudopc_end(); // restore old state
pseudopc_end_all(); // restore outermost state
return ENSURE_EOS;
}

View File

@ -9,7 +9,7 @@
#define RELEASE "0.96.5" // update before release FIXME
#define CODENAME "Fenchurch" // update before release
#define CHANGE_DATE "31 May" // update before release FIXME
#define CHANGE_DATE "1 June" // update before release FIXME
#define CHANGE_YEAR "2020" // update before release
//#define HOME_PAGE "http://home.pages.de/~mac_bacon/smorbrod/acme/"
#define HOME_PAGE "http://sourceforge.net/p/acme-crossass/" // FIXME