summary refs log tree commit diff
path: root/01.s
blob: c5257f2aebb8446c29dd2b4b3a11e575eda28558 (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
    B main


green_bottles   DEFB " green bottles",0
hanging DEFB " hanging on the wall",0
comma   DEFB ",\n",0
line3   DEFB "And if one green bottle should accidentally fall,\n",0
line4   DEFB "There will be ",0
stop    DEFB ".\n",0

        ALIGN
main    MOV R0,#10
        SWI 4
        ADR R0,green_bottles
        SWI 3
        ADR R0,hanging
        SWI 3
        ADR R0,comma
        SWI 3
        
        MOV R0,#10
        SWI 4
        ADR R0,green_bottles
        SWI 3
        ADR R0,hanging
        SWI 3
        ADR R0,comma
        SWI 3

        ADR R0, line3
        SWI 3
        
        ADR R0, line4
        SWI 3
        MOV R0, #9
        SWI 4
        ADR R0,green_bottles
        SWI 3
        ADR R0,hanging
        SWI 3
        ADR R0,stop
        SWI 3

        SWI 2