Leanpub Header

Skip to main content

Assembly Arithmetic Algorithms 32 and 64 bit Windows Edition

Assembly Arithmetic Algorithms 32 and 64 bit Windows Edition
This book is 60% completeLast updated on 2026-09-24

Assembly programming is actually a lot like Minecraft or Terraria because you start the game with nothing and have to slowly build your tools to make something useful. I started Assembly in 2024 and have already built a series of tools I personally use on both DOS and Linux operating systems. Through the course of this book, I will be slowly showing you how I can port everything in the Linux version of Assembly Arithmetic Algorithms to Windows.

Minimum price

$4.00

$4.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
WEB
APP
Discussion Forum
About

About

About the Book

This book is the Windows edition of Assembly Arithmetic Algorithms. The first book was for 16-bit DOS programming using Assembly. The second book was for 32-bit Linux programming using the same assembly language for Intel machines. But this book is very different than those because it is for Windows users who don't know anything about DOS or Linux.

I suspect most people fall into this category because Windows comes preinstalled on almost any PC you would buy in a store. Although I am old enough to have experienced DOS, and autistic enough use Linux for everything since my teenage days, I am aware that most people will never both trying other operating systems.

Although I use Linux for most things, I had to buy a laptop with Windows on it to use specific software required by Full Sail University when I was an online student. Since I have it, I decided I might as well try out some assembly language on it and learn how it works so I can pass the knowledge on to other people who are not ready to leave Windows but ARE ready to try learning assembly language.

At the time of this writing, most Windows systems use the x86-64 Intel architecture which can run 32-bit or 64-bit code. Because of this, I have decided to include code samples for both modes and explain the differences between them.

Share this book

Author

About the Author

Chastity White Rose

Chastity White Rose is an author of over twelve books and two WordPress blogs. She writes humorous and educational content about philosophical and religious topics. She also uses her writing and graphic design skills to teach people about the game of Chess. She is a Creative Writing graduate from Full Sail University with self-taught computer programming and graphic design skills. As a transgender Christian woman, she writes books and blog posts to help others like her process the seeming disconnect between religious faith and an LGBTQIA+ identity. She measures the success of her writing by its emotional impact rather than its sales. For this reason, most of her writing is available free of charge.

Contents

Table of Contents

Assembly Arithmetic Algorithms

Preface

Introduction

Chapter 1: The First Program

  1. fasmpath.bat
  2. Hello World for 32-bit Windows
  3. Hello World for 64-bit Windows
  4. First 3 Windows API calls
  5. GetStdHandle Syntax
  6. GetStdHandle function table
  7. WriteFile Syntax
  8. WriteFile parameters
  9. ExitProcess Syntax

Chapter 2: Assembly Terminology

  1. Register
  2. Bit
  3. Stack
  4. It gets easier!

Chapter 3: Printing Integers

  1. putint for 32-bit Windows
  2. Output of 32-bit putint program
  3. putint for 64-bit Windows
  4. Output of 64-bit putint program
  5. Dependency Chain

Chapter 4: Chastity’s Intel Assembly Reference

  1. mov
  2. add
  3. sub
  4. mul
  5. div
  6. cmp
  7. jmp
  8. Conditional Jumps Table
  9. Signed Number Jumps Table
  10. push/pop
  11. Take it slow

Chapter 5: Integer Sequences and Their Application in Learning

  1. How to use these examples
  2. Fibonacci numbers
  3. Powers of 2
  4. Prime Numbers
  5. Factorials

Chapter 6: Asking the User for Input

  1. ReadFile API call
  2. main.asm for getstring example 32-bit
  3. chastdin-w32.asm
  4. main.asm for getstring example 64-bit
  5. chastdin-w64.asm
  6. More notes on the chastdin library

Chapter 7: Giving the User Choices

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub