Hacking Some Assembly into C

Today I’ll be talking about hacking your C code by injecting some Assembly code into it. Alright, maybe this isn’t really “hacking” and isn’t as revolutionary as it might seem. Turns out the GCC compilers have had this functionality for a long time now. Perhaps it even has to do with how Chris Sawyer did […]

Exploring Audio Processing Algorithms

For my sixth lab in my SPO600 class, I’ll be exploring algorithms used to increase or decrease the volume of an audio signal. It helps to start with a solid understanding of what audio is. An audio file has a sample rate, usually denoted in KHz. This refers to the number of times per second […]

Enabling Vectorization

For my fifth lab in my SPO600 class, I’ll be creating a C program for an AArch64 system in a way that allows the GCC compiler to automatically vectorize it for me. The program must do the following: Fill two arrays each with 1000 random integers between -1000 and 1000 Map over the two arrays, […]

Learning How to Build Software

For my fourth lab in my SPO600 class, I’ll be building software (as opposed to just blindly executing a “sudo apt-get install” etc. command). I need to pick any GNU software and then also try building glibc. An important part of this lab is that I shouldn’t install the software, just build it. What’s the […]

Writing Assembly for x86_64 and AArch64

For the third lab in my SPO600 class, we create two programs in assembly, one for the x86_64 architecture, and one for the AArch64 architecture. Each program would loop from 0 to 30 and print a message with the number each time. If this were C, it would be 4 lines of code: #include <stdio.h> […]

Exploring Assembly When Compiling a C Program

For my SPO600 class’s second lab, I need to compile a C program for the x86-64 architecture with various compiler options and compare the output. Up until now, the only compiler flag I used was “-std=c++0x”. This should be interesting! Here’s the program: #include <stdio.h> int main() { printf(“Hello World!\n”); } Control Before I investigate […]