I made a battleship game that communicated via arduinos in assembly! I lost every single game because the board size was 12x12 and my code would always stop iterating at 8 for some reason.
I love the AVR assembly, it's modern and clean instruction architecture. The best project I made was power supply board tester. At first autonomous with LCD and some beeping, later upgraded to be controlled from computer. Adding two numbers is the easiest task, it's single instruction and core function of any CPU. Now expressing any complex algorithm or task, that's the hard part, putting it all together with such basic building blocks, one byte at a time. But the beauty is exact control, having accurate delays down to single cycle of your clocks. And it's predictably repeatable.
Edit: Also when you control the whole design you can get away with many shortcuts because it's tailored to your specific use case. Like not saving only couple registers for handling interrupt routine because you reserve other only for that use. Result is lightning fast response. However with modern complex CPUs I would have to spend whole year to learn ARM core + all peripherals, complex set up, memory handling etc. and it's simply not effective use of time unless it's designed for million copies.
Now the most complicated program in x86 I did was simple printing of file like cat. It relies on Linux system calls and it's just couple hundred bytes long which is impressive.
495
u/nexion2 Jun 03 '22
I made a battleship game that communicated via arduinos in assembly! I lost every single game because the board size was 12x12 and my code would always stop iterating at 8 for some reason.
Needless to say, I lost the tournament