mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-24 01:08:06 +11:00
aa8df95f7d
Also, add a "real world" example in AVRA tests, a blink program on a ATtiny45. Some instructions are commented out because they aren't implemented yet, but not many. The output of the program has been verified against AVRA's own output.
18 lines
360 B
C
18 lines
360 B
C
; *** CPU registers aliases ***
|
|
|
|
.equ XH 27
|
|
.equ XL 26
|
|
.equ YH 29
|
|
.equ YL 28
|
|
.equ ZH 31
|
|
.equ ZL 30
|
|
|
|
.equ SREG_C 0 ; Carry Flag
|
|
.equ SREG_Z 1 ; Zero Flag
|
|
.equ SREG_N 2 ; Negative Flag
|
|
.equ SREG_V 3 ; Two's Complement Overflow Flag
|
|
.equ SREG_S 4 ; Sign Bit
|
|
.equ SREG_H 5 ; Half Carry Flag
|
|
.equ SREG_T 6 ; Bit Copy Storage
|
|
.equ SREG_I 7 ; Global Interrupt Enable
|