An ARM Assembly program that simplifies square roots. Input number can be up to 8 digits long.
Clone the repository then cd
to the directory:
$ git clone https://github.com/s7a19t4r/asm-sqrtsimplify
$ cd asm-sqrtsimplify
-
Verify system architecture to match syntax and ability to run ARM binaries. Run the following commands to run the Bash script:
$ ./check-arch.sh
If the result is successful, proceed. If not, use alternative options below (QEMU Emulator or Virtual Machine)
If permission to run Bash script is denied, run
$ chmod +x check-arch.sh
then run script again
-
Assembler and linker should be automatically installed, use makefile with
native
to compile (defaults tonative
):$ make native
-
Run ELF
$ ./main.elf
macOS not supported due to absence of qemu-user
package, which includes necessary commands
-
Install QEMU:
$ sudo apt install qemu-user
-
Install GNU cross-compiler for ARM architecture
$ sudo apt install gcc-arm-linux-gnueabi
-
Use makefile with
virtual
to compile:$ make virtual
-
Run ELF with QEMU emulator
$ qemu-arm ./main.elf
To setup Raspberry-Pi virtual machine using QEMU, visit the GitHub repository for my VM setup configurations.