4 ms·
> Part of the tedium is only having a few registers so programming in assembly begins to resemble solving the towers of Hanoi puzzle. Solving the towers of Han
by wolfgke 9y ago
> Part of the tedium is only having a few registers so programming in assembly begins to resemble solving the towers of Hanoi puzzle.
Solving the towers of Hanoi puzzle can be done completely mechanically (exercise: derive the really simple algorithm). Programming in such a constrained environment is something where you have to think for yourself, since I am not aware of any mechanical solution.
- jontro 9y agoA mechanical solution would be using other languages like C
- wolfgke 9y agoUsing C you cannot get the advantages that 6502 assembly provides. On the other hand, to stay with towers of Hanoi, one can show that the simple mechanical algorithm that one can derive for it, will solve the problem with a minimum possible number of moves.
- mywittyname 9y agoSo, what the c compiler does.