We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e85676b commit 61fc9caCopy full SHA for 61fc9ca
Chapter 4/printdword.s
@@ -18,8 +18,8 @@ _start: MOV X4, #0x6E3A
18
MOVK X4, #0xFEDC, LSL #32
19
MOVK X4, #0x1234, LSL #48
20
21
- adrp X1, hexstr@GOTPAGE // start of string
22
-// add X1, X1, hexstr@GOTPAGEOFF
+ ADRP X1, hexstr@PAGE // start of string
+ ADD X1, X1, hexstr@PAGEOFF
23
ADD X1, X1, #17 // start at least sig digit
24
// The loop is FOR W5 = 16 TO 1 STEP -1
25
MOV W5, #16 // 16 digits to print
@@ -44,7 +44,8 @@ cont: // end if
44
// Setup the parameters to print our hex number
45
// and then call Linux to do it.
46
MOV X0, #1 // 1 = StdOut
47
48
49
MOV X2, #19 // length of our string
50
MOV X16, #4 // linux write system call
51
SVC #0x80 // Call linux to output the string
0 commit comments