mirror of
https://github.com/uffejakobsen/acme.git
synced 2024-11-22 03:30:46 +00:00
added test files for "--dialect", a bit of cleanup
git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@347 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
parent
09b4b16c10
commit
d70988c09d
@ -95,16 +95,20 @@ void notreallypo_setpc(void) // GotByte is '*'
|
||||
// before actually setting pc,
|
||||
// support stupidly bad, old, ancient, deprecated, obsolete behaviour:
|
||||
if (pseudopc_isactive()) {
|
||||
if (config.dialect < V0_93__SHORTER_SETPC_WARNING) {
|
||||
Throw_warning("Offset assembly still active at end of segment. Switched it off.");
|
||||
end_all_pseudopc();
|
||||
} else if (config.dialect < V0_94_8__DISABLED_OBSOLETE) {
|
||||
if (config.dialect >= V0_94_8__DISABLED_OBSOLETE) {
|
||||
// current behaviour:
|
||||
// setting pc does not disable pseudopc
|
||||
} else if (config.dialect >= V0_93__SHORTER_SETPC_WARNING) {
|
||||
Throw_warning("Offset assembly still active at end of segment.");
|
||||
end_all_pseudopc(); // warning no longer said it
|
||||
// would switch off, but still did. nevertheless, there
|
||||
end_all_pseudopc(); // warning did not say it would
|
||||
// disable pseudopc, 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.
|
||||
} else {
|
||||
// prior to 0.93, setting pc disabled pseudopc with a warning:
|
||||
Throw_warning("Offset assembly still active at end of segment. Switched it off.");
|
||||
end_all_pseudopc();
|
||||
}
|
||||
}
|
||||
|
||||
@ -676,18 +680,15 @@ static enum eos po_align(void)
|
||||
// not using a block is no longer allowed
|
||||
static void old_offset_assembly(void)
|
||||
{
|
||||
// really old versions allowed it
|
||||
if (config.dialect < V0_86__DEPRECATE_REALPC)
|
||||
return;
|
||||
|
||||
// then it was deprecated
|
||||
if (config.dialect < V0_94_8__DISABLED_OBSOLETE) {
|
||||
if (config.dialect >= V0_94_8__DISABLED_OBSOLETE) {
|
||||
// now it's obsolete
|
||||
Throw_error("\"!pseudopc/!realpc\" is obsolete; use \"!pseudopc {}\" instead."); // FIXME - amend msg, tell user how to use old behaviour!
|
||||
} else if (config.dialect >= V0_86__DEPRECATE_REALPC) {
|
||||
// earlier it was deprecated
|
||||
Throw_first_pass_warning("\"!pseudopc/!realpc\" is deprecated; use \"!pseudopc {}\" instead.");
|
||||
return;
|
||||
} else {
|
||||
// really old versions allowed it
|
||||
}
|
||||
|
||||
// now it's obsolete
|
||||
Throw_error("\"!pseudopc/!realpc\" is obsolete; use \"!pseudopc {}\" instead."); // FIXME - amend msg, tell user how to use old behaviour!
|
||||
}
|
||||
|
||||
// start offset assembly
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#define RELEASE "0.97" // update before release FIXME
|
||||
#define CODENAME "Zem" // update before release
|
||||
#define CHANGE_DATE "19 Feb" // update before release FIXME
|
||||
#define CHANGE_DATE "20 Feb" // update before release FIXME
|
||||
#define CHANGE_YEAR "2024" // update before release
|
||||
//#define HOME_PAGE "http://home.pages.de/~mac_bacon/smorbrod/acme/"
|
||||
#define HOME_PAGE "http://sourceforge.net/p/acme-crossass/" // FIXME
|
||||
|
@ -1,14 +1,22 @@
|
||||
#ACMEFLAGS = -v0
|
||||
|
||||
.PHONY: outformats
|
||||
.PHONY: dialects outformats
|
||||
|
||||
.SILENT:
|
||||
|
||||
all: outformats
|
||||
all: dialects outformats
|
||||
echo
|
||||
echo "Testing cliargs: PASSED"
|
||||
echo
|
||||
|
||||
dialects: dialect085.a dialect086.a dialect09406.a dialect09408.a dialect09412.a
|
||||
acme --strict --dialect 0.85 dialect085.a
|
||||
acme --strict --dialect 0.86 dialect086.a
|
||||
acme --strict --dialect 0.94.6 dialect09406.a
|
||||
acme --strict --dialect 0.94.8 dialect09408.a
|
||||
acme --strict --dialect 0.94.12 dialect09412.a
|
||||
$(RM) test.o
|
||||
|
||||
outformats: outformats.a outformats.sh outformat-*.exp
|
||||
echo "Testing output formats:"
|
||||
bash outformats.sh
|
||||
|
9
testing/cliargs/dialect085.a
Normal file
9
testing/cliargs/dialect085.a
Normal file
@ -0,0 +1,9 @@
|
||||
; 0.86 warns about using "!to" without file format indicator:
|
||||
!to "test.o"
|
||||
; "!pseudopc"/"!realpc" warn in 0.86, throw error in 0.94.8:
|
||||
*=$1000
|
||||
!pseudopc $2345
|
||||
!wo *
|
||||
!realpc
|
||||
|
||||
!src "dialect086.a"
|
6
testing/cliargs/dialect086.a
Normal file
6
testing/cliargs/dialect086.a
Normal file
@ -0,0 +1,6 @@
|
||||
; "power of" is left-associative, becomes right-associative in 0.94.6:
|
||||
!if 2^3^4 != (2^3)^4 {
|
||||
!error "power-of operator is not left-associative."
|
||||
}
|
||||
|
||||
!src "dialect09406.a"
|
24
testing/cliargs/dialect09406.a
Normal file
24
testing/cliargs/dialect09406.a
Normal file
@ -0,0 +1,24 @@
|
||||
; "!pseudopc"/"!realpc" throw error in 0.94.8:
|
||||
*=$2000
|
||||
!nowarn !pseudopc $2345
|
||||
!wo *
|
||||
!nowarn !realpc
|
||||
; "!cbm" throws error in 0.94.8:
|
||||
!nowarn !cbm
|
||||
; "!subzone" throws error in 0.94.8:
|
||||
!nowarn !subzone dummy
|
||||
; "*=" terminates "!pseudopc", works in 0.94.8:
|
||||
!pseudopc $1010 {
|
||||
!if * != $1010 {
|
||||
!error "pc is not $1010"
|
||||
}
|
||||
!nowarn *=$2020
|
||||
!if * != $2020 {
|
||||
!error "pc is not $2020"
|
||||
}
|
||||
}
|
||||
!if * != $2020 {
|
||||
!error "pc is not $2020"
|
||||
}
|
||||
|
||||
!src "dialect09408.a"
|
6
testing/cliargs/dialect09408.a
Normal file
6
testing/cliargs/dialect09408.a
Normal file
@ -0,0 +1,6 @@
|
||||
; "!for" syntax changes in 0.94.12:
|
||||
!for ii, 4 {
|
||||
!info ii
|
||||
}
|
||||
|
||||
!src "dialect09412.a"
|
5
testing/cliargs/dialect09412.a
Normal file
5
testing/cliargs/dialect09412.a
Normal file
@ -0,0 +1,5 @@
|
||||
; double-quotes indicate strings in 0.97:
|
||||
a = "a" + 10
|
||||
; backslash becomes escape char in 0.97:
|
||||
b = "\"
|
||||
c = '\'
|
2
testing/errors/targetoutofrange.a
Normal file
2
testing/errors/targetoutofrange.a
Normal file
@ -0,0 +1,2 @@
|
||||
*=$1000
|
||||
beq $1083 ; -> "Target out of range (129; 2 too far)."
|
Loading…
Reference in New Issue
Block a user