Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Machine Code is for Kids (2011) (gamesindustry.biz)
9 points by marttt on Oct 29, 2023 | hide | past | favorite | 1 comment


Dylan Cuthbert probably means assembly not machine code, but ok. Assembly -> machine code manually is possible even with just pen & paper (been there, done that). But it's tedious.

After having this article proofread by a certain machine code madman who goes by the name of Jaymin Kessler, he initially said, "but will kids really understand register spilling, stack frames, register allocation?". He instantly brought in a ton of abstract terminology that was invented primarily for compilers of higher level abstract languages.

So true! Diving right onto the bare metal does away with a lot of 'detours' that just needn't be there. How higher languages work under the hood, can be learned later.

In the article's example of the ZX Spectrum: there's a direct mapping between a specific memory area, and what's on screen. POKE some values, screen changes (same for the equivalent LD (location),A or similar Z80 code).

Sound: a 1-bit output. Toggle it for 'clicks', toggle it faster for low-frequency, toggle faster yet for a high-pitch tone.

As far as assembly on lowly 8-bitter is concerned, doesn't get simpler than that. Hang the machine, and a 1..2s reboot brings you back to the BASIC prompt.

I continue to be annoyed that 100k...1M+ times faster computers lack that capability. Power on -> ready for action should be near-instant. Especially on modern hardware.

(yes I understand the reasons why it's not. Doesn't mean that's how it should be)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: