3void mov(uint8_t d, uint8_t r,
struct CORE *core) {
9 core->
gp.
R[d] = core->
gp.
R[r];
17void movw(uint8_t d, uint8_t r,
struct CORE *core) {
24 core->
gp.
R[d] = core->
gp.
R[r];
25 core->
gp.
R[d + 1] = core->
gp.
R[r + 1];
33void ldi(uint8_t d, uint8_t K,
struct CORE *core) {
53 core->
gp.
R[d] = data_space->
data[k];
159 core->
gp.
R[d] = data_space->
data[core->
gp.
Y + q];
219 core->
gp.
R[d] = data_space->
data[core->
gp.
Z + q];
233 data_space->
data[k] = core->
gp.
R[d];
339 data_space->
data[core->
gp.
Y + q] = core->
gp.
R[d];
399 data_space->
data[core->
gp.
Z + q] = core->
gp.
R[d];
427 core->
gp.
R[d] = progmem_space->
data[core->
gp.
Z];
442 core->
gp.
R[d] = progmem_space->
data[core->
gp.
Z];
486 data_space->
sram[core->
SP] = core->
gp.
R[d];
503 core->
gp.
R[d] = data_space->
sram[core->
SP];
517 uint8_t temp = core->
gp.
R[d];
519 data_space->
data[core->
gp.
Z] = temp;
536 uint8_t temp = data_space->
data[core->
gp.
Z];
537 data_space->
data[core->
gp.
Z] = core->
gp.
R[d] || temp;
538 core->
gp.
R[d] = temp;
555 uint8_t temp = data_space->
data[core->
gp.
Z];
556 data_space->
data[core->
gp.
Z] = (0xFF - core->
gp.
R[d]) & temp;
557 core->
gp.
R[d] = temp;
574 uint8_t temp = data_space->
data[core->
gp.
Z];
575 data_space->
data[core->
gp.
Z] = core->
gp.
R[d] ^ temp;
576 core->
gp.
R[d] = temp;
void inc_pc(struct CORE *core)
void ld_y_dec(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Load indirect from data space using Y register and pre-decrement.
void sts(int16_t k, uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Store direct from register to data space.
void st_z_dec(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Store register to data space using Z pointer and pre-decrement Z.
void ldd_y(uint8_t d, uint8_t q, struct CORE *core, union DATA_SPACE *data_space)
Load indirect from data space to register using Y pointer with displacement.
void std_z(uint8_t d, uint8_t q, struct CORE *core, union DATA_SPACE *data_space)
Store register to data space using Z pointer with displacement.
void lac(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Load and clear data space.
void st_x_inc(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Store indirect from register to data space using X pointer and post-increment.
void lpm_z(uint8_t d, struct CORE *core, union PROGMEM_SPACE *progmem_space)
Load program memory into register using Z pointer.
void ldd_z(uint8_t d, uint8_t q, struct CORE *core, union DATA_SPACE *data_space)
Load indirect from data space to register using Z pointer with displacement.
void las(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Load and set data space.
void ld_y_inc(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Load indirect from data space using Y register and post-increment.
void push(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Push register onto stack.
void ld_y(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Load indirect from data space using Y register.
void xch(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Exchange register with data space.
void ld_x(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Load indirect from data space using X register.
void st_y_dec(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Store register to data space using Y pointer and pre-decrement Y.
void lpm_0(struct CORE *core, union PROGMEM_SPACE *progmem_space)
Load program memory into register using Z pointer.
void ld_x_inc(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Load indirect from data space using X register and post-increment.
void st_z_inc(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Store register to data space using Z pointer and post-increment Z.
void std_y(uint8_t d, uint8_t q, struct CORE *core, union DATA_SPACE *data_space)
Store register to data space using Y pointer with displacement.
void movw(uint8_t d, uint8_t r, struct CORE *core)
Move word from register pair r to register pair d.
void lat(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Load and toggle data space.
void pop(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Pop register from stack.
void ldi(uint8_t d, uint8_t K, struct CORE *core)
Load immediate value K into register d.
void ld_z_inc(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Load indirect from data space to register using Z pointer and post-increment.
void st_x_dec(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Store indirect from register to data space using X pointer and pre-decrement.
void st_x(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Store indirect from register to data space using X pointer.
void mov(uint8_t d, uint8_t r, struct CORE *core)
Move data from register r to register d.
void in(uint8_t d, uint8_t A, struct CORE *core, union DATA_SPACE *data_space)
Read from I/O space into register.
void ld_z_dec(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Load indirect from data space to register using Z pointer and pre-decrement.
void st_z(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Store register to data space using Z pointer.
void st_y(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Store indirect from register to data space using Y pointer.
void st_y_inc(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Store register to data space using Y pointer and post-increment Y.
void out(uint8_t A, uint8_t r, struct CORE *core, union DATA_SPACE *data_space)
Write from register to I/O space.
void lpm_z_inc(uint8_t d, struct CORE *core, union PROGMEM_SPACE *progmem_space)
Load program memory and post-increment Z register.
void lds(uint8_t d, int16_t k, struct CORE *core, union DATA_SPACE *data_space)
Load direct from data space using 16-bit address.
void ld_z(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Load indirect from data space to register using Z pointer.
void ld_x_dec(uint8_t d, struct CORE *core, union DATA_SPACE *data_space)
Load indirect from data space using X register and pre-decrement.
Data transfer instructions.
Core structure containing general purpose registers, program counter, stack pointer,...
Represents the data space in the AVR emulator.
uint8_t data[DATA_SPACE_SIZE]
Represents the program memory space in the AVR emulator.
uint8_t data[PROGMEM_SPACE_SIZE]