-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPA-RISC Assembly Hello World.O
42 lines (39 loc) · 1.31 KB
/
PA-RISC Assembly Hello World.O
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
.LEVEL 2.0N
.SPACE $TEXT$,SORT=8
.SUBSPA $CODE$,QUAD=0,ALIGN=4,ACCESS=0x2c,CODE_ONLY,SORT=24
main
.PROC
.CALLINFO CALLER,FRAME=16,SAVE_RP,ORDERING_AWARE
.ENTRY
STW %r2,-20(%r30) ;offset 0x0
LDO 64(%r30),%r30 ;offset 0x4
ADDIL LR'M$3-$global$,%r27,%r1 ;offset 0x8
LDO RR'M$3-$global$(%r1),%r1 ;offset 0xc
STW %r1,-56(%r30) ;offset 0x10
ADDIL LR'M$3-$global$+16,%r27,%r1 ;offset 0x14
LDO RR'M$3-$global$+16(%r1),%r26 ;offset 0x18
LDW -56(%r30),%r25 ;offset 0x1c
LDIL L'printf,%r31 ;offset 0x20
.CALL ARGW0=GR,ARGW1=GR,RTNVAL=GR ;in=25,26;out=28;
BE,L R'printf(%sr4,%r31),%r31 ;offset 0x24
COPY %r31,%r2 ;offset 0x28
LDW -84(%r30),%r2 ;offset 0x2c
BVE (%r2) ;offset 0x30
.EXIT
LDO -64(%r30),%r30 ;offset 0x34
.PROCEND ;
.SPACE $TEXT$
.SUBSPA $CODE$
.SPACE $PRIVATE$,SORT=16
.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=16
M$3
.ALIGN 8
.STRINGZ "Hello World"
.BLOCK 4
.STRINGZ "%s\n"
.IMPORT $global$,DATA
.SPACE $TEXT$
.SUBSPA $CODE$
.EXPORT main,ENTRY,PRIV_LEV=3,LONG_RETURN
.IMPORT printf,CODE
.END