Skip to content

Commit

Permalink
Fix #312 - implement more opcodes for z80-zxn
Browse files Browse the repository at this point in the history
Impemented test N as ```tst N``` to use the same opcode as the Z180.
  • Loading branch information
pauloscustodio committed Aug 19, 2017
1 parent ee48b5d commit 6edf011
Show file tree
Hide file tree
Showing 9 changed files with 7,409 additions and 6,336 deletions.
9 changes: 9 additions & 0 deletions src/z80asm/opcodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ void add_opcode_idx_n(int opcode, struct Expr *idx_expr,
Pass2infoExpr(RANGE_BYTE_UNSIGNED, n_expr);
}

/* add opcode followed by two 8-bit expressions */
void add_opcode_n_n(int opcode, struct Expr *n1_expr,
struct Expr *n2_expr )
{
add_opcode(opcode);
Pass2infoExpr(RANGE_BYTE_UNSIGNED, n1_expr);
Pass2infoExpr(RANGE_BYTE_UNSIGNED, n2_expr);
}

/* add "call flag", or emulation on a Rabbit */
void add_call_flag(int flag, Expr *target)
{
Expand Down
4 changes: 4 additions & 0 deletions src/z80asm/opcodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ extern void add_opcode_idx(int opcode, struct Expr *expr);
extern void add_opcode_idx_n(int opcode, struct Expr *idx_expr,
struct Expr *n_expr );

/* add opcode followed by two 8-bit expressions */
extern void add_opcode_n_n(int opcode, struct Expr *n1_expr,
struct Expr *n2_expr );

/* add "call flag", or emulation on a Rabbit */
extern void add_call_flag(int flag, struct Expr *target);

Expand Down
Loading

0 comments on commit 6edf011

Please sign in to comment.