Tuesday | 30 APR 2024
[ previous ]
[ next ]

Learning Assembly - Day 3

Title:
Date: 2023-09-07
Tags:  

Lesson 11 - Counting to 10 Properly

I tried to do this myself and this was a bit difficult. It definitely is a mindbend trying to thing through the algorithm and work out how to juggle all the registers properly. I enjoyed doing this even if it wasn't optimal. There seems to be 4 registers, eax, ebx, ecx and edx. eax is the main register everything works with. ecx is a register used for counting but that seems to be just convention. I think assembly probably has patterns that arise out of it and eventually I'll see the general structure be able to tell what it's trying to do. Hopefully!

I need to keep a list of the registers

Lesson 12 - Addition

Very straightforward.

Lesson 13 - Subtraction

Straightforward for positive numbers but I can alreayd see how problematic this will be when I need to flip the signs.

Lesson 14 - Multiplication

Multiplication is special in that it takes just one register and assumes eax is what will be multiplied.

Lesson 15 - Division

Divison is similar to multiplication in that it takes just one register and assumes eax is what will be divided. It also loads the remainder into edx.