tweaked docs and removed some comments, no change in functionality

git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@273 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
marcobaye 2020-06-30 09:24:30 +00:00
parent a7dd713d93
commit 70b9ee222d
7 changed files with 35 additions and 13 deletions

View File

@ -358,6 +358,11 @@ Target out of range (N; M too far).
difference to the limit - so if you succeed in optimizing M bytes difference to the limit - so if you succeed in optimizing M bytes
away, the code would assemble. away, the code would assemble.
The chosen CPU uses opcode 0xXY as a prefix code, do not use this mnemonic!
The mnemonic is valid, but should not be used on this CPU. If you
know better, you can get around this error like this:
!cpu ANY_OTHER_CPU { PROBLEMATIC_MNEMONIC }
There's more than one character. There's more than one character.
You used a text string containing more than one character in a You used a text string containing more than one character in a
situation where only a string with length one is allowed. situation where only a string with length one is allowed.
@ -404,6 +409,13 @@ Unknown pseudo opcode.
Unknown "*=" segment modifier. Unknown "*=" segment modifier.
You used a modifier keyword ACME does not know. You used a modifier keyword ACME does not know.
Unsupported backslash sequence.
The character following the backslash was not one of the allowed
ones. Backslash escaping was added in release 0.97 of ACME.
If you want to assemble an old source code without first updating
it, you can use the "--dialect" CLI switch to make ACME mimic an
older version.
Unterminated index spec. Unterminated index spec.
An index was started with '[' but did not end with ']'. An index was started with '[' but did not end with ']'.
@ -533,9 +545,15 @@ IllegalImmediateMode
The mnemonic tree contains invalid info about the size of immediate The mnemonic tree contains invalid info about the size of immediate
arguments. arguments.
IllegalInputSource
Input is taken neither from a file nor from a RAM block.
IllegalNumberTypeX IllegalNumberTypeX
A number was neither INT nor FLOAT nor UNDEFINED. A number was neither INT nor FLOAT nor UNDEFINED.
IllegalObjectType
A symbol is used that is neither number nor list nor string.
IllegalOperatorId IllegalOperatorId
IllegalOperatorGroup IllegalOperatorGroup
The expression parser found an operator that does not exist. The expression parser found an operator that does not exist.
@ -547,6 +565,7 @@ NotEnoughArgs
There was not enough data for a dyadic operator to work on. There was not enough data for a dyadic operator to work on.
NullTypeObject NullTypeObject
ObjectHasNullType
A symbol is used that does not have a type (number/list/string) A symbol is used that does not have a type (number/list/string)
associated with it. associated with it.
@ -558,6 +577,9 @@ OperatorStackNotEmpty
The expression parser has finished though there are still The expression parser has finished though there are still
operators left to process. operators left to process.
PartialEscapeSequence
Buffered data ended on a backslash, which shouldn't be possible.
SecondArgIsNotAnInt SecondArgIsNotAnInt
A sanity check failed: An argument should have been converted to A sanity check failed: An argument should have been converted to
integer but wasn't. integer but wasn't.

View File

@ -187,7 +187,7 @@ quad mode introduces several new mnemonics:
The new mnemonics support all the addressing modes of the original The new mnemonics support all the addressing modes of the original
mnemonics with two exceptions: mnemonics with two exceptions:
- there are no 32-bit immediate arguments - there are no 32-bit immediate arguments
- indirect-z addressing becomes indirect addressing - indirect-Z-indexed addressing becomes indirect addressing
CAUTION: The STQ instruction clobbers the N and Z flags! CAUTION: The STQ instruction clobbers the N and Z flags!
There is no "real" Q register, instead A/X/Y/Z are combined to form There is no "real" Q register, instead A/X/Y/Z are combined to form
the Q register (A holds lsb, Z holds msb), except for read-modify- the Q register (A holds lsb, Z holds msb), except for read-modify-

View File

@ -7,11 +7,11 @@ file), so this file only contains information about the extensions.
"quad mode" allows 32-bit data operations using a virtual register called 'Q'. "quad mode" allows 32-bit data operations using a virtual register called 'Q'.
The mnemonics aslq/lsrq/rolq/rorq/inq/deq have five addressing modes in quad The mnemonics aslq/lsrq/rolq/rorq/inq/deq have five addressing modes.
mode. The mnemonics ldq/stq have nine addressing modes in quad mode, and a tenth
The mnemonics ldq/stq have nine addressing modes in quad mode. when combined with long mode.
The mnemonics cpq/adcq/sbcq/andq/eorq/orq have eight addressing modes in quad The mnemonics cpq/adcq/sbcq/andq/eorq/orq have eight addressing modes in quad
mode. mode, and a ninth when combined with long mode.
This mode is entered after a NEG:NEG (42 42) prefix, the following opcode is This mode is entered after a NEG:NEG (42 42) prefix, the following opcode is
then taken from this table: then taken from this table:

View File

@ -46,7 +46,7 @@ boolean check_ifdef_condition(void)
symbol = (struct symbol *) node->body; symbol = (struct symbol *) node->body;
symbol->has_been_read = TRUE; // we did not really read the symbol's value, but checking for its existence still counts as "used it" symbol->has_been_read = TRUE; // we did not really read the symbol's value, but checking for its existence still counts as "used it"
if (symbol->object.type == NULL) if (symbol->object.type == NULL)
Bug_found("ObjectHasNullType", 0); // FIXME - add to docs! Bug_found("ObjectHasNullType", 0);
return symbol->object.type->is_defined(&symbol->object); return symbol->object.type->is_defined(&symbol->object);
} }

View File

@ -491,7 +491,7 @@ void output_object(struct object *object, struct iter_context *iter)
else if (object->u.number.ntype == NUMTYPE_FLOAT) else if (object->u.number.ntype == NUMTYPE_FLOAT)
iter->fn(object->u.number.val.fpval); iter->fn(object->u.number.val.fpval);
else else
Bug_found("IllegalNumberType7", object->u.number.ntype); // FIXME - add to docs! Bug_found("IllegalNumberType0", object->u.number.ntype);
} else if (object->type == &type_list) { } else if (object->type == &type_list) {
// iterate over list // iterate over list
item = object->u.listhead->next; item = object->u.listhead->next;
@ -512,7 +512,7 @@ void output_object(struct object *object, struct iter_context *iter)
Throw_error("There's more than one character."); // see alu.c for the original of this error Throw_error("There's more than one character."); // see alu.c for the original of this error
} }
} else { } else {
Bug_found("IllegalObjectType9", 0); // FIXME - add to docs! Bug_found("IllegalObjectType", 0);
} }
} }

View File

@ -278,7 +278,7 @@ char GetByte(void)
GotByte = get_processed_from_file(); GotByte = get_processed_from_file();
break; break;
default: default:
Bug_found("InvalidInputSrc", Input_now->source); // FIXME - add to docs Bug_found("IllegalInputSrc", Input_now->source);
} }
// // if start-of-line was read, increment line counter and repeat // // if start-of-line was read, increment line counter and repeat
// if (GotByte != CHAR_SOL) // if (GotByte != CHAR_SOL)
@ -329,7 +329,7 @@ static char GetQuotedByte(void)
} }
break; break;
default: default:
Bug_found("InvalidInputSrc", Input_now->source); // FIXME - add to docs! Bug_found("IllegalInputSrc", Input_now->source);
} }
// now check for end of statement // now check for end of statement
if (GotByte == CHAR_EOS) if (GotByte == CHAR_EOS)
@ -429,7 +429,7 @@ int Input_unescape_dynabuf(int read_index)
break; break;
// TODO - 'a' to BEL? others? // TODO - 'a' to BEL? others?
default: default:
Throw_error("Unsupported backslash sequence."); // TODO - add to docs (and add unexpected character to error message?) Throw_error("Unsupported backslash sequence."); // TODO - add unexpected character to error message?
} }
GLOBALDYNABUF_CURRENT[write_index++] = byte; GLOBALDYNABUF_CURRENT[write_index++] = byte;
escaped = FALSE; escaped = FALSE;
@ -442,7 +442,7 @@ int Input_unescape_dynabuf(int read_index)
} }
} }
if (escaped) if (escaped)
Bug_found("PartialEscapeSequence", 0); // FIXME - add to docs! Bug_found("PartialEscapeSequence", 0);
GlobalDynaBuf->size = write_index; GlobalDynaBuf->size = write_index;
return 0; // ok return 0; // ok
} }

View File

@ -1104,7 +1104,7 @@ static void group_prefix(int opcode)
{ {
char buffer[100]; // 640K should be enough for anybody char buffer[100]; // 640K should be enough for anybody
sprintf(buffer, "The chosen CPU uses opcode 0x%02x as a prefix code, do not use this mnemonic!", opcode); // FIXME - add to docs! sprintf(buffer, "The chosen CPU uses opcode 0x%02x as a prefix code, do not use this mnemonic!", opcode);
Throw_error(buffer); Throw_error(buffer);
} }