Tag Archives: assembly

Lost in translation (C vs. Assembly Language)

In my classes on microcontroller programming I often draw comparisons between C and assembly language. This is to show my students that either programming language has both advantages and disadvantages. While the efficiency of C code predominantly depends on how … Continue reading

Posted in Programming Essentials, Uncategorized | Tagged , , , | Comments Off on Lost in translation (C vs. Assembly Language)

Masking

In this posting I’m going to explain a bit-twiddling technique called masking. It is used to extract (and alter) specific bits in a word of bits, for example a byte. You might be familiar with IP subnet masks in network … Continue reading

Posted in Bit-Twiddling, Uncategorized | Tagged , , , , | Comments Off on Masking

Loops

A loop allows to repeatedly execute a sequence of instructions. From the CPU’s view a loop simply means resetting the program counter (PC) which always points to the currently executed instruction. ; Example in some pseudo assembly language ; showing … Continue reading

Posted in Programming Essentials, Uncategorized | Tagged , , , | Comments Off on Loops