Don't allow immediate values of 0 for operations that can take either an

immediate value or the accumulator.  0 is the chip's internal
representation for the accumulator, and so 0 is an invalid immediate value
when the accumulator can also be specified as an argument.

Submitted by:	gibbs
This commit is contained in:
Kenneth D. Merry 2001-04-04 22:50:57 +00:00
parent a1bc34c6b8
commit 4464fee503

View File

@ -623,6 +623,11 @@ immediate_or_a:
expression
{
$$ = $1;
if ($$.value == 0) {
stop("Immediate value of 0 not valid for opcode",
EX_DATAERR);
/* NOTREACHED */
}
}
| T_A
{