Creating a Fibonacci Generator in Assembly
August 30, 2018
Contents Intro Following along at home A beginning Some starting knowledge Overview of the implementation Beginning the implementation Building binary files from assembly files The structure of a GAS assembly file Sections Comments Instructions and opcodes The application entry-point and labels Compiling our code Reading from the process arguments and converting to a numeric value Debugging with GDB Getting the length of our argument on the command line Making things easier to understand using function calls Converting a string to a number Some new functions Zeroing registers Register sizes and layout Processing the string The actual Fibonacci algorithm Creating the stack space for our array The Fibonacci logic in assembly Setting up our variables Array memory allocation Variable initialisation Indexed memory Running the loop to completion Calculating the sequence Printing our result Doing things the hard way Conclusion From here to there Intro Stemming from my interest in Assembly Language, I was in search of a practical example to start exploring this subterranean wilderland.
Read More