$ man tshabbic.projects.arm-ap
ARM-AP(8)Array Printing in ARM Assembly LanguageARM-AP(8)
Name

arm-ap -- array printing in ARM assembly language

Description

[See the Source Code!]

This project implements itoascii (converts an integer to ASCII), concat_array (takes an array of integers and its length and returns a pointer to a string of the numbers separated by spaces), and count_specs (counts the %a specifiers in a string). On top of these, pringle (the name the prototype came with) is a printf-style function with a custom %a specifier that prints a whole array with a single call. Each %a in the format string is replaced by the next array passed in, and pringle returns the length of the printed string. All of it is hand-written in ARMv8 (Arm64) assembly, with calling conventions strictly adhered to.

Usage

To compile:

aarch64-linux-gnu-gcc indietest.c itoascii.s count_specs.s concat_array.s pringle.s -g

To run the program:

qemu-aarch64 -L /usr/aarch64-linux-gnu/ a.out

To run the provided tester against all test cases:

qemu-aarch64 -L /usr/aarch64-linux-gnu/ tester -t all

Bugs

None according to the tester!

History

This project was performed during Fall of 2023 for CS 382 - Computer Architecture and Organization @ Stevens' Institute of Technology.