I was doing laundry again, today, and I thought of a neat way to go about making Langton's Ant in assembly. To give an idea of the speed it runs at, it gets through 10000 iterations in about a second, while updating the screen at each iteration (at 6MHz). This means that you can simulate over 1000000 iterations in under two minutes, on a TI-83+ !
I am sure there are optimisations that can be made, since I threw it together in about an hour and spent another hour tweaking things.
Specifics:
-It uses the whole screen, which is treated as a toroidal (not sure if that is the right word). Basically, if the ant goes of the left edge of the screen, it wraps around to the right.
-Press clear to exit
-It uses whatever contents are on the graph screen as the starting board.
-It only updates one byte at a time in the LCD, that is how it can update so fast.
I might be able to add a way to make it stop after a certain number of iterations, too, if that would be useful. I am just trying to think of a very efficient way of doing that using a 48-bit value for an input
Hmm, I might need to use daa for this one >.>
EDIT: For comparison purposes, I downloaded another Langton's Ant program (which is 30 bytes smaller). The screenie is attached. I downloaded another version, but since that used 3 ants, I didn't think it was an accurate comparison. Plus, it used MirageOS and was 62 bytes larger.