14 _6502_ADDR_KIND_IMMEDIATE,
15 _6502_ADDR_KIND_ACCUMULATOR
32 static void _6502_il_accumulator(_6502ILAddr *
out) {
33 out->kind = _6502_ADDR_KIND_ACCUMULATOR;
40 static void _6502_il_immediate(_6502ILAddr *
out,
ut16 imm) {
41 out->kind = _6502_ADDR_KIND_IMMEDIATE;
49 static void _6502_il_addr_absolute(_6502ILAddr *
out,
ut16 imm) {
50 out->kind = _6502_ADDR_KIND_ADDR;
58 static void _6502_il_addr_zero_page_reg(_6502ILAddr *
out,
ut16 imm,
const char *
reg) {
59 out->kind = _6502_ADDR_KIND_ADDR;
67 static void _6502_il_addr_reg(_6502ILAddr *
out,
ut16 imm,
const char *
reg) {
68 out->kind = _6502_ADDR_KIND_ADDR;
75 static void _6502_il_addr_indirect_x(_6502ILAddr *
out,
ut16 imm) {
76 out->kind = _6502_ADDR_KIND_ADDR;
87 static void _6502_il_addr_indirect_y(_6502ILAddr *
out,
ut16 imm) {
88 out->kind = _6502_ADDR_KIND_ADDR;
147 switch (
addr->kind) {
148 case _6502_ADDR_KIND_ADDR:
150 case _6502_ADDR_KIND_IMMEDIATE:
152 case _6502_ADDR_KIND_ACCUMULATOR:
164 static _6502ILAddr *dup_addr(_6502ILAddr *
addr) {
172 switch (
addr->kind) {
173 case _6502_ADDR_KIND_ADDR:
175 case _6502_ADDR_KIND_ACCUMULATOR:
213 update_flags_nz(
VARG(
"a"))
224 update_flags_nz(
VARG(
"a"))
235 update_flags_nz(
VARG(
"a"))
249 update_flags_nz(
VARL(
"res")),
272 update_flags_nz(
VARL(
"res8")),
289 do_store(dup_addr(
addr),
VARL(
"tmp")),
290 update_flags_nz(
VARL(
"tmp"))
303 do_store(dup_addr(
addr),
VARL(
"tmp")),
310 _6502_BRANCH_ON_PLUS = 0x10,
311 _6502_BRANCH_ON_MINUS = 0x30,
312 _6502_BRANCH_ON_OVERFLOW_CLEAR = 0x50,
313 _6502_BRANCH_ON_OVERFLOW_SET = 0x70,
314 _6502_BRANCH_ON_CARRY_CLEAR = 0x90,
315 _6502_BRANCH_ON_CARRY_SET = 0xb0,
316 _6502_BRANCH_ON_NOT_EQUAL = 0xd0,
317 _6502_BRANCH_ON_EQUAL = 0xf0
334 case _6502_BRANCH_ON_PLUS:
337 case _6502_BRANCH_ON_MINUS:
340 case _6502_BRANCH_ON_OVERFLOW_CLEAR:
343 case _6502_BRANCH_ON_OVERFLOW_SET:
346 case _6502_BRANCH_ON_CARRY_CLEAR:
349 case _6502_BRANCH_ON_CARRY_SET:
352 case _6502_BRANCH_ON_NOT_EQUAL:
355 case _6502_BRANCH_ON_EQUAL:
381 stack_push(status_byte(
true)),
405 status_byte_apply(
VARL(
"sr")),
434 _6502_FLAG_OP_SET_I = 0x78,
435 _6502_FLAG_OP_CLEAR_I = 0x58,
436 _6502_FLAG_OP_SET_C = 0x38,
437 _6502_FLAG_OP_CLEAR_C = 0x18,
438 _6502_FLAG_OP_SET_D = 0xf8,
439 _6502_FLAG_OP_CLEAR_D = 0xd8,
440 _6502_FLAG_OP_CLEAR_V = 0xb8
454 case _6502_FLAG_OP_SET_I:
456 case _6502_FLAG_OP_CLEAR_I:
458 case _6502_FLAG_OP_SET_C:
460 case _6502_FLAG_OP_CLEAR_C:
462 case _6502_FLAG_OP_SET_D:
464 case _6502_FLAG_OP_CLEAR_D:
466 case _6502_FLAG_OP_CLEAR_V:
509 do_store(dup_addr(
addr),
VARL(
"tmp")),
510 update_flags_nz(
VARL(
"tmp"))
518 return stack_push(
VARG(
"a"));
525 return stack_push(status_byte(
true));
535 update_flags_nz(
VARL(
"tmp")));
544 status_byte_apply(
VARL(
"tmp")));
556 do_store(dup_addr(
addr),
VARL(
"res")),
557 update_flags_nz(
VARL(
"res")));
569 do_store(dup_addr(
addr),
VARL(
"res")),
570 update_flags_nz(
VARL(
"res")));
static void update_flags(RzAnalysisOp *op, int flags)
const lzma_allocator const uint8_t size_t uint8_t * out
void * load(const char *name, size_t *len)
#define rz_warn_if_reached()
Syntax Macros for RzIL Lifting.
#define APPEND(high, low)
#define SEQ5(e0, e1, e2, e3, e4)
#define SEQ4(e0, e1, e2, e3)
#define SEQ7(e0, e1, e2, e3, e4, e5, e6)
#define SEQ6(e0, e1, e2, e3, e4, e5)
#define cond(bop, top, mask, flags)
An IL op performing a pure computation, 'a pure.
ut64(WINAPI *w32_GetEnabledXStateFeatures)()