Avr8bit-emulator
An emulator for the Atmel AVR 8-bit microcontroller
Loading...
Searching...
No Matches
data_transfer.h
Go to the documentation of this file.
1
11#pragma once
12#include <stdint.h>
13#include <stdbool.h>
14
15#include "core.h"
16#include "data_space.h"
17
25void mov(uint8_t d, uint8_t r, struct CORE *core);
26
34void movw(uint8_t d, uint8_t r, struct CORE *core);
35
43void ldi(uint8_t d, uint8_t K, struct CORE *core);
44
53void lds(uint8_t d, int16_t k, struct CORE *core, union DATA_SPACE *data_space);
54
62void ld_x(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
63
71void ld_x_inc(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
72
80void ld_x_dec(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
81
89void ld_y(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
90
98void ld_y_inc(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
99
107void ld_y_dec(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
108
117void ldd_y(uint8_t d, uint8_t q, struct CORE *core, union DATA_SPACE *data_space);
118
126void ld_z(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
127
135void ld_z_inc(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
136
144void ld_z_dec(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
145
154void ldd_z(uint8_t d, uint8_t q, struct CORE *core, union DATA_SPACE *data_space);
155
164void sts(int16_t k, uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
165
173void st_x(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
174
182void st_x_inc(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
183
191void st_x_dec(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
192
200void st_y(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
201
209void st_y_inc(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
210
218void st_y_dec(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
219
228void std_y(uint8_t d, uint8_t q, struct CORE *core, union DATA_SPACE *data_space);
229
237void st_z(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
238
246void st_z_inc(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
247
255void st_z_dec(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
256
265void std_z(uint8_t d, uint8_t q, struct CORE *core, union DATA_SPACE *data_space);
266
273void lpm_0(struct CORE *core, union PROGMEM_SPACE *progmem_space);
274
282void lpm_z(uint8_t d, struct CORE *core, union PROGMEM_SPACE *progmem_space);
283
291void lpm_z_inc(uint8_t d, struct CORE *core, union PROGMEM_SPACE *progmem_space);
292
301void in(uint8_t d, uint8_t A, struct CORE *core, union DATA_SPACE *data_space);
302
311void out(uint8_t A, uint8_t r, struct CORE *core, union DATA_SPACE *data_space);
312
320void push(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
321
329void pop(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
330
338void xch(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
339
347void las(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
348
356void lac(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
357
365void lat(uint8_t d, struct CORE *core, union DATA_SPACE *data_space);
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.
Core structure containing general purpose registers, program counter, stack pointer,...
Definition core.h:67
Represents the data space in the AVR emulator.
Definition data_space.h:13
Represents the program memory space in the AVR emulator.
Definition data_space.h:27