mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 19:49:23 +02:00
+ only allow the first operand to be a condition
git-svn-id: branches/z80@44886 -
This commit is contained in:
parent
a6e72713ad
commit
6e1dd417cf
@ -2219,6 +2219,16 @@ Unit raz80asm;
|
|||||||
{ Zero operand opcode ? }
|
{ Zero operand opcode ? }
|
||||||
if actasmtoken in [AS_SEPARATOR,AS_END] then
|
if actasmtoken in [AS_SEPARATOR,AS_END] then
|
||||||
exit;
|
exit;
|
||||||
|
{ Condition (e.g. 'NC' in 'JP NC, label') }
|
||||||
|
if actasmtoken=AS_CONDITION then
|
||||||
|
begin
|
||||||
|
instr.condition:=actasmcond;
|
||||||
|
Consume(AS_CONDITION);
|
||||||
|
if actasmtoken in [AS_SEPARATOR,AS_END] then
|
||||||
|
exit;
|
||||||
|
if actasmtoken=AS_COMMA then
|
||||||
|
Consume(AS_COMMA);
|
||||||
|
end;
|
||||||
{ Read Operands }
|
{ Read Operands }
|
||||||
repeat
|
repeat
|
||||||
case actasmtoken of
|
case actasmtoken of
|
||||||
@ -2227,18 +2237,6 @@ Unit raz80asm;
|
|||||||
AS_SEPARATOR :
|
AS_SEPARATOR :
|
||||||
break;
|
break;
|
||||||
|
|
||||||
{ Condition (e.g. 'NC' in 'JP NC, label') }
|
|
||||||
AS_CONDITION:
|
|
||||||
begin
|
|
||||||
instr.condition:=actasmcond;
|
|
||||||
Consume(AS_CONDITION);
|
|
||||||
if actasmtoken=AS_COMMA then
|
|
||||||
Consume(AS_COMMA);
|
|
||||||
{ Zero operand opcode ? }
|
|
||||||
if actasmtoken in [AS_SEPARATOR,AS_END] then
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ Operand delimiter }
|
{ Operand delimiter }
|
||||||
AS_COMMA :
|
AS_COMMA :
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user