ARM v8 Assembly Programs which is tested on Raspberry Pi 3 B+ running Ubuntu 18 aarch64
For Compiling and running you would require to have the following steps done and installed in your rpi or your system
libc6:armhflibstdc++6:armhfgcc-arm-linux-gnueabihfbinutils-arm-linux-gnu/binutils-arm-linux-gnueabihf
Steps to Install
sudo dpkg --add-architecture armhfsudo apt updatesudo apt install libc6:armhfsudo apt install libstdc++6:armhfsudo apt install binutils-arm-linux-gnueabihfsudo apt install gcc-arm-linux-gnueabihf
For testing if everything is done correctly easiest way is using the makefile in this repo Steps
make file_name=first
$ make file_name=first
$ arm-linux-gnueabihf-as -o first.o first.s
$ arm-linux-gnueabihf-gcc -o ile_name first.o
./first ; echo $?
$ ./first ; echo $?
$ 2
It should print Register value ie. 2 in this case
You can use this Makefile to compile any assembly program, you do not require to specify the extension(.s) when using the make command
make file_name=$name_of_the_file then run the executable
make clean will remove the compiled compiled files