Hacker News new | ask | show | jobs
by ivansavz 1870 days ago
First off I want to note TI calculators are not anything special when it comes to assembler. It was more of a limitation of the platform (in order to get games that are fast, you had to write them in assembler because TI-BASIC was too slow).

Note also that assembly code is different for each CPU architecture. The TI calculator I had contained a z80 chip, so it was z80 assembler (Motorola assembler?). The x86 assembly language is a more complicated, but probably more useful to learn (can look at any program on your computer). Or maybe you could learn ARM assembly (e.g. this would allow you to write simple programs that blink lights on a Raspberri PI).

> [...] can you recommend anything?

I looked through my bookmarks and found some links you might want to check out:

1. Example of Comparing C to x86 assembly: https://www.youtube.com/watch?v=yOyaJXpAYZQ

2. The assembler project part of nand2tetris computing-from-first-principles course: https://www.nand2tetris.org/project04 I haven't gone thought this course, but I've heard many things about it.

1 comments

> First off I want to note TI calculators are not anything special when it comes to assembler. It was more of a limitation of the platform (in order to get games that are fast, you had to write them in assembler because TI-BASIC was too slow).

> Note also that assembly code is different for each CPU architecture. The TI calculator I had contained a z80 chip, so it was z80 assembler (Motorola assembler?). The x86 assembly language is a more complicated, but probably more useful to learn (can look at any program on your computer). Or maybe you could learn ARM assembly (e.g. this would allow you to write simple programs that blink lights on a Raspberri PI).

Sure, I understand all this already. I suspect that x86 assembly might be most useful for me, but I also have access to an Arduino, so I might try writing assembly for that as well.

> 1. Example of Comparing C to x86 assembly: https://www.youtube.com/watch?v=yOyaJXpAYZQ

Thank you! Added to my reading list.

> 2. The assembler project part of nand2tetris computing-from-first-principles course: https://www.nand2tetris.org/project04 I haven't gone thought this course, but I've heard many things about it.

As it happens, I’ve already gone through nand2tetris. I can’t say it helped me that much: sure, it’s good for getting a conceptual understanding of how assembly works generally, but it doesn’t give me any idea about e.g. how to write a program for x86 or ARM.

Note that TI calculators do not run x86 assembly, if that is what you're trying to do.
Of course I understand TI calculators don’t run x86 assembly! That’s not what I want to do — I just want to get a better understanding of assembly, preferably x86 so I can run it on my own Windows computer. (I don’t even have a TI calculator.)
Ha, just making sure :P I do have one suggestion, though: try WSL, because it will give you access to Linux, where you can actually write programs entirely in assembly because the system call API is stable. The ABI matches with macOS's too, which is another plus.
I already have WSL installed, so maybe I will give this a try if I get time.

> Linux, where you can actually write programs entirely in assembly because the system call API is stable

I didn’t know this — is it not stable on Windows?