Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

On the 25th level and it has been amazing so far! Wanted to ask how the 24th and 25th should be done (3-3: Multiplication, 3-4: Division). I solved mult by just adding 1 a lot to 1 of the registers, this likely very incorrect approach doesn't work for division

My only thought is that I decrement reg 1, branching whenever it becomes 0 to do a separate counting up loop for a couple dividends, but this would be a lot of code, and calculating offsets will be a mess.

I also thought about self-modifying code, but it doesn't seem possible.

Is there maybe a separate mem region I can write to that will help?

hint : 3-3 and 3-4 don't require you to create general solutions that work for any values, although it is possible.

One solution to 3-4 is (rot13) gb guvax bhgfvqr gur obk naq uneqpbqr bar bs gur inyhrf (va guvf pnfr 4) naq erhfr ert1 nf n pbhagre.

Self-modifying code was one of the original ideas, but I didn't end up implementing it.

There is another memory region that is introduced in Chapter 4 which allows for general solutions for both multiplication and division, although anything before that is possible without using it.

Thank you. I had a feeling I was overthinking it. Can't wait to see the later chapters