1// Copyright (C) 2023 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14// 15 16.section .text 17.globl _start 18_start: 19 // SYS_write 20 mov x8, #0x40 21 // fd is stdout 22 mov x0, #0x1 23 // pc-relative address of the string 24 adrp x1, hello_string 25 add x1, x1, :lo12:hello_string 26 // string size 27 mov x2, #0x6 28 svc #0x0 29 30 // SYS_exit 31 mov x8, #93 32 // value to return from main 33 mov x0, #0x0 34 svc #0x0 35 36.section .rodata 37hello_string: 38 .asciz "Hello\n" 39