Avr8bit-emulator
An emulator for the Atmel AVR 8-bit microcontroller
Loading...
Searching...
No Matches
core.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <stdint.h>
4
#include <stdbool.h>
5
10
union
SREG
{
11
uint8_t
sreg
;
12
struct
{
13
bool
C
: 1;
14
bool
Z
: 1;
15
bool
N
: 1;
16
bool
V
: 1;
17
bool
S
: 1;
18
bool
H
: 1;
19
bool
T
: 1;
20
bool
I
: 1;
21
};
22
};
23
28
union
GP
{
29
uint8_t
R
[32];
30
struct
{
31
uint8_t
R0
;
32
uint8_t
R1
;
33
uint8_t
R2
;
34
uint8_t
R3
;
35
uint8_t
R4
;
36
uint8_t
R5
;
37
uint8_t
R6
;
38
uint8_t
R7
;
39
uint8_t
R8
;
40
uint8_t
R9
;
41
uint8_t
R10
;
42
uint8_t
R11
;
43
uint8_t
R12
;
44
uint8_t
R13
;
45
uint8_t
R14
;
46
uint8_t
R15
;
47
uint8_t
R16
;
48
uint8_t
R17
;
49
uint8_t
R18
;
50
uint8_t
R19
;
51
uint8_t
R20
;
52
uint8_t
R21
;
53
uint8_t
R22
;
54
uint8_t
R23
;
55
uint8_t
R24
;
56
uint8_t
R25
;
57
uint16_t
X
;
58
uint16_t
Y
;
59
uint16_t
Z
;
60
};
61
};
62
67
struct
CORE
{
68
union
GP
gp
;
69
uint32_t
PC
;
70
uint16_t
SP
;
71
union
SREG
sreg
;
72
};
73
74
void
inc_pc
(
struct
CORE
*core);
inc_pc
void inc_pc(struct CORE *core)
Definition
core.c:3
CORE
Core structure containing general purpose registers, program counter, stack pointer,...
Definition
core.h:67
CORE::gp
union GP gp
Definition
core.h:68
CORE::SP
uint16_t SP
Definition
core.h:70
CORE::PC
uint32_t PC
Definition
core.h:69
CORE::sreg
union SREG sreg
Definition
core.h:71
GP
General Purpose Registers.
Definition
core.h:28
GP::R11
uint8_t R11
Definition
core.h:42
GP::R16
uint8_t R16
Definition
core.h:47
GP::R13
uint8_t R13
Definition
core.h:44
GP::R6
uint8_t R6
Definition
core.h:37
GP::R5
uint8_t R5
Definition
core.h:36
GP::R9
uint8_t R9
Definition
core.h:40
GP::R4
uint8_t R4
Definition
core.h:35
GP::R21
uint8_t R21
Definition
core.h:52
GP::R14
uint8_t R14
Definition
core.h:45
GP::R19
uint8_t R19
Definition
core.h:50
GP::R8
uint8_t R8
Definition
core.h:39
GP::R20
uint8_t R20
Definition
core.h:51
GP::R7
uint8_t R7
Definition
core.h:38
GP::R25
uint8_t R25
Definition
core.h:56
GP::R22
uint8_t R22
Definition
core.h:53
GP::R17
uint8_t R17
Definition
core.h:48
GP::R23
uint8_t R23
Definition
core.h:54
GP::R2
uint8_t R2
Definition
core.h:33
GP::Y
uint16_t Y
Definition
core.h:58
GP::R10
uint8_t R10
Definition
core.h:41
GP::R12
uint8_t R12
Definition
core.h:43
GP::R15
uint8_t R15
Definition
core.h:46
GP::R18
uint8_t R18
Definition
core.h:49
GP::R24
uint8_t R24
Definition
core.h:55
GP::R0
uint8_t R0
Definition
core.h:31
GP::R
uint8_t R[32]
Definition
core.h:29
GP::R3
uint8_t R3
Definition
core.h:34
GP::Z
uint16_t Z
Definition
core.h:59
GP::R1
uint8_t R1
Definition
core.h:32
GP::X
uint16_t X
Definition
core.h:57
SREG
Status Register.
Definition
core.h:10
SREG::N
bool N
Definition
core.h:15
SREG::C
bool C
Definition
core.h:13
SREG::V
bool V
Definition
core.h:16
SREG::Z
bool Z
Definition
core.h:14
SREG::I
bool I
Definition
core.h:20
SREG::H
bool H
Definition
core.h:18
SREG::S
bool S
Definition
core.h:17
SREG::sreg
uint8_t sreg
Definition
core.h:11
SREG::T
bool T
Definition
core.h:19
include
core.h
Generated by
1.9.8