# Hello World in rust on ARM64 includes a lot of code

I had not taken the time to try and work with Rust on ARM64 in the past. Since I was doing disassembly of simple C programs on an one of our servers, I figured it couldn’t hurt to try the same thing with rust.

Continue reading

# Vector Multiplication Using the Neon Coprocessor instructions on ARM64

Last post I showed how to do multiplication for a vector of integers using ARM64 instructions. Lots of use cases require these kinds of operations to be performed in bulk. The Neon coprocessor has instructions that allow for the parallel loading and multiplication of numbers. Here’s my simplistic test of these instructions.

Continue reading

# Vector Multiplication in ARM64 assembly

Lets start with the basics: we can multiply the cells two vectors in C code and disassemble the resulting binary. This is a trivial operation of multiplying each cell in the first vector by the corresponding cell in the second vector. It is not a cross product. This will be a naive implementation, but it should get us started.

Continue reading

# Multiplication by Halving and Doubling in AARCH64 Assembly

While multiplication is defined in the context of repeated addition, implementing it that way algorithmically is not nearly as efficient as some other approaches. One algorithm for multiplication that is an order of magnitude faster is to halve one number while doubling the other. I gave myself the challenge of implementing this algorithm in AARCH64 Assembly, and it was not too hard.

Continue reading

# Understanding the MIXAL insertion sort.

A debugger is a wonderful tool for understanding what actually happens in a piece of code. Donald Knuth’s coding in TAOCP is archaic enough that I do not understand it just by reading through. This is due to a combination of my unfamiliarity with MIXAL, as well as some of the coding conventions he’s chosen. So, I’m going to step through the MIXAL code in mixvm, and annotate what I find.

Continue reading

# MIXAL on Fedora

The examples in The Art of Computer Programming (TAOCP) are in the MIXAL programming language. In order to see these examples run, I want to install the tools on my Fedora box. They are packaged as RPMS, so this is trivial. Here are the steps to run and debug a sample program in MIXAL.

Continue reading

# Printing an Integer Array in (ARM64) Assembly

For the next couple tasks I want to do in assembly, I need to be able to inspect an array of numbers. This is useful for debugging searching and sorting algorithms. Since my last attempt to convert binary to ASCII was so ugly, I figured I would clean that up at the same time.

It turns out I can use the reverse code as well.

Continue reading