July 2017
Beginner to intermediate
352 pages
7h 30m
English
As mentioned in Chapter 2, Espruino’s Web IDE has a built-in assembler.
Assembly language is a textual representation of the actual instructions that the computer executes. The ARM microcontroller in the Espruino boards executes what is called Thumb code. This is a special cut-down version of ARM assembly code that is more limited, but takes up half the code space per instruction (16 bits versus 32 bits).
A very simple Thumb function might look like this:
mov r0, #42 bx lr
This function consists of two 16-bit instructions (so it is just 4 bytes long). The first instruction loads register r0 with the number 42, and the second instruction returns from the function. If you didn’t have this, then the microcontroller ...
Read now
Unlock full access