Skip to main content

Section C.5 M2: Simple Algorithms in Machine Code


  • Practice programming in machine code using simple examples.

  • Introduce other aspects on the fly: data segment, strings.

  • Live coding two simple examples from Chapter 3.

  • The print hex example is useful to recap “bit fiddling”, exercise number systems, and introduce OS calls, strings (ask user for input).

  • Horner, Eratosthenes, Tortoise and Hare are useful to practice memory instructions and simple loops.

  • The former are useful to discuss array processing.

Sections Covered.

Chapter 3