summaryrefslogtreecommitdiff
path: root/tests/fixtures/life-print.s
blob: a1de41f9649150c4cacc7dadd7e8d0f7f5ba5660 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
; Minimal LIFE-stage action example.
;
; Assemble/link:
;   ../utils/mcpu-as -o life-print.o life-print.s
;   ../utils/mcpu-ld -o life-print --stack-size=1K life-print.o
;
; Run three LIFE cycles and print two registers on one line after each END:
;   ../utils/mcpu-run \
;     --steps=3 \
;     --on-step=print-int-regs:r64@0x00000,r64@0x00008 \
;     -- \
;     life-print
;
; Expected output:
;   1 10
;   2 20
;   3 30

.text
_start_life:
        LDI     r64@0x00000, 1
        LDI     r64@0x00008, 10
        LDI     r64@0x00010, 1
        LDI     r64@0x00018, 10

loop:
        END
        IADD    r64@0x00000, r64@0x00000, r64@0x00010
        IADD    r64@0x00008, r64@0x00008, r64@0x00018
        JMP     loop