Skip to main content

Posts

Showing posts from August, 2024

My journey with ATtiny4313 (part 2)

Part 2: Programming in assembler Why? I need to get rid of that library and gain control of the entire CPU. So my idea is to rewrite the all code ... in assembly (or assembler). A quick note here: I did program in assembly over 30 years ago, at University (8085, 68000) as well as for personnal projects (6502, 6809, 8086, a little bit of Z80). But since then, I turned to other languages, mostly to C/C++. So my assembly is a little bit rusty. Pros and cons Assembly is simple : programming in assembly is like playing with Lego (which I did a lot!). It consists of assembling small block (operational codes, or opcodes) together. This is why it's called ... assembly! Each opcode does a very limited operation, well described in the datasheet. Nothing is hidden : no library, no help, you'll have to write everything from scratch. Not totally true, since we can find some headers files online, which I used. The datasheet is the reference : it contains everything, ...