RARawley Amankwahinbaremetal-bytes.hashnode.dev·May 21 · 6 min readA Faster Way to Think About FactorialsHow splitting odd and even numbers — and a simple bit shift — can make factorial computation more elegant 1. The Usual Way Most of us first learn to compute the factorial of a number \(n\) — written 10
RARawley Amankwahinbaremetal-bytes.hashnode.dev·Dec 10, 2025 · 3 min readEven or Odd? in Nasm x86_64This mini project determines whether a given input (a command line argument) is even or odd. We begin once again by including our macro file, mymacros.inc, initialized variables and conversion of command line argument to integer (Read more on Working...00
RARawley Amankwahinbaremetal-bytes.hashnode.dev·Dec 9, 2025 · 4 min readThe Sum of the first n positive integers in Nasm x86_64In this mini project, we code the sum of the first n integers using Gauss’ formula. Short Preview of Gauss’ formula Say, we need to sum the first 20 positive integers. The sum, S is given as; \(S = 1+2+3+…+20\) —————- (1) Note also that the sum can b...00
RARawley Amankwahinbaremetal-bytes.hashnode.dev·Oct 31, 2025 · 2 min readConverting String to Integer in Nasm x86_64In our previous lesson, we learned about how to get command line arguments. Sometimes, we may want the command line arguments passed to be of type integer instead of string for further computation or processing. Therefore, there is the inherent need ...00
RARawley Amankwahinbaremetal-bytes.hashnode.dev·Oct 31, 2025 · 2 min readWorking with Command Line Arguments in Nasm x86_64Working with command line arguments in NASM x86_64 is relatively easy. One only needs to know the value contained in the rsp register to extract command line arguments. That is mov r8, [rsp] ; Get the number of command line arguments and move it to r...00