Home > database >  how to compile assembly language in Android?
how to compile assembly language in Android?

Time:12-03

Iam incipient to assembly language, can anyone tell how to compile assembly language in Android
I have a Hello world code

.text            
.global _start
_start:
    mov r0, #1
    ldr r1, =message
    ldr r2, =len
    mov r7, #4
    swi 0

    mov r7, #1
    swi 0

.data
message:
    .asciz "hello world\n"
len = .-message                  

but i don't know to compile it on Android, can anyone tell

CodePudding user response:

i think it can be done using termux. please visit here
the answer for this question
i saved my assembly code file as test.s

instructions

install binutils
pkg install binutils

as test.s -o test.o

ld test.o -o test

run your file

./test

hello world in other languages and ARM, visit here

  • Related