Alignment and Packing

Here’s a topic relevant to both the new books I’m writing. Consider the following small program: char foo[] = {1, 2, 3, 4, 5, 6, 7, 8}; void setup() { Serial.begin(9600); while (!Serial); Serial.println(*(uint32_t *)&foo[0], HEX); Serial.println(*(uint32_t *)&foo[1], HEX); Serial.println(*(uint32_t *)&foo[2], HEX); Serial.println(*(uint32_t *)&foo[3], HEX); } void loop() { } If you run this on …

Checking In!

Just so you know I’m still around. I spent last month (and maybe this month) goofing off, which I feel entitled to do at my age. But I have been thinking, at least, about writing, and have been adding to and rearranging by book outlines. Financial sense tells me that the book about the SAMD21 …

My Recent Education Adventure

I have been spending an hour a day for most of the past year learning Spanish for various reasons. While programming languages come easy to me, spoken languages do not. Anyway, I happened to come across an on-line course in Automata Theory offered by one of my Alma Maters, Stanford. I’ve always been curious about …

Backpedaling?

I came across this file: Embedded C Programming.scriv sitting forlorn in my folder of book folders, seeming not deserving of a folder of its own. Six years ago before I retired I had started to write a book on embedded programming. I was teaching a course on microcontrollers that used assembly language with C being …