3 ms·
There are 3 assembly code exercise: day 12, 23, and 25. The solutions in the post just interprets the code as is, which all run quite a while. I tend to write m
by hzhou321 10y ago
There are 3 assembly code exercise: day 12, 23, and 25. The solutions in the post just interprets the code as is, which all run quite a while. I tend to write my code on a much slower computer and I being quite impatient, so I was forced to abort the program and forced myself to actually read the assembly code (input). It is actually quite interesting:
Day 12 calculates the fibonacci sequence, day 23 involves a big multiplication, and day 25 outputs the a number in binary format. If we run all additions and multiplications with "inc" and "dec", of course it is going to take forever (on my computer at least). So for me, I was forced to read the code and recognize the multiplication and algorithm and put in a couple "shortcut". If my computer is any faster, I might miss the fun.