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:
parent
a1bc34c6b8
commit
4464fee503
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user