This commit is contained in:
root
2026-09-20 14:16:41 +02:00
parent 0798933b05
commit b6d1909d7f
56 changed files with 3752 additions and 1989 deletions
+2 -2
View File
@@ -5,9 +5,9 @@
.equ TX 1024 ; downlink buffer
.equ RAMTOP 8192 ; initial stack pointer
.equ P_TICK 0x00
.equ P_TURN 0x00
.equ P_DAY 0x01
.equ P_TICKS 0x02
.equ P_TURNS 0x02
.equ P_POSX 0x10
.equ P_POSY 0x11
.equ P_POSZ 0x12
+5 -5
View File
@@ -1,20 +1,20 @@
; TELEMETRY -- every tick, write tick number, fuel and position to the
; TELEMETRY -- every turn, write turn number, fuel and position to the
; downlink buffer as five 32-bit words.
;
.equ P_TICK 0x00
.equ P_TURN 0x00
.equ P_POSX 0x10
.equ P_POSY 0x11
.equ P_POSZ 0x12
.equ P_FUEL 0x23
.equ T_TICK 1024 ; TX + 0
.equ T_TURN 1024 ; TX + 0
.equ T_FUEL 1028 ; TX + 4
.equ T_X 1032 ; TX + 8
.equ T_Y 1036 ; TX + 12
.equ T_Z 1040 ; TX + 16
ldi r0, 0 ; r0 = 0, the base register
loop: in r1, P_TICK
stw r1, [r0+T_TICK]
loop: in r1, P_TURN
stw r1, [r0+T_TURN]
in r1, P_FUEL
stw r1, [r0+T_FUEL]
in r1, P_POSX