Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I prefer RISCV as an starting assembly language because: it has good design, it's more intuitive, it has modern language and tool support (GCC, LLVM, Rust, etc.), and it runs on QEMU and real available hardware.


ARMv7 also meets these criteria, and is very nice to use. Available inline in BBC Basic on the Acorn Archimedes.


> Available inline in BBC Basic on the Acorn Archimedes.

The 32-bit ARM ISA, yes, but ARMv7 came much later. You're basically limited to ARM2 on the Archimedes, according to https://en.wikipedia.org/wiki/Acorn_Archimedes


Last time I checked there was yet to exist a macro assembler worth its name for RISC-V.


> real available hardware

Last I checked the 65C02 was still being manufactured and sold.

It can also at a blazing 14 MHz.


It's $8 and can't run without external ROM and RAM and a clock circuit and some glue logic.

A RISC-V CH32V003 32 bit processor with 2k RAM and 16k of flash running at 48 MHz costs $0.10 for an 8 pin package (6 available I/O pins) or $0.20 for the 20 pin package. Once programmed, it needs only electricity between 2.8V and 5.5V to be applied to start running.

https://www.aliexpress.com/item/1005005036714708.html

You can get it on a ready-made board or kit for as little as $1.

https://www.youtube.com/watch?v=dfXWs4CJuY0

https://www.olimex.com/Products/Retro-Computers/RVPC/open-so...

The recommended dev board, with a USB programmer/debugger interface for your PC, plus 5 of the 20 pin chips, costs $8.35 about the same as a bare 65C02 chip.

https://www.aliexpress.com/item/1005004895791296.html

You can make your own cool shit like this, which uses the $0.10 8 pin chip.

https://www.youtube.com/watch?v=1W7Z0BodhWk

It's as easy to learn the instructions of as a 6502 -- there are fewer of them! -- and far easier to write useful code for.

MUCH easier to learn than a 68000, and no more difficult to use. TBH the A and D register split always annoyed the hell out of me in early Mac days.


For a "first dive" into a programming paradigm, I could see the appeal of something more "PC" shaped than "MCU shaped", just because it offers recognizable, easy ways to deal with primitive debugging.

If you have a memory-mapped frame buffer, you can write a single byte to it if you need a status checkpoint or tracking a variable. If you have a keyboard, you can probably read its buffer or use it for triggers.

Maybe modern debugging environments and tools make it easier, but I tend to think of my university assembly language class which featured original Intel SDK-86 boards with LEDs and hex keypads to interact with.


Sounds nice, but the 6502 is certainly real, available hardware that you can buy and set up on a breadboard.

There are tutorials on youtube for it as well, such as Ben Eater's tutorial.


Yes I'm well aware. I have a 65C02 on a breadboard. I have a 6809 on a breadboard. I've seen all Ben's videos.

The *only* advantage the 6502 has is the exposed and non-multiplexed address and data busses, which you can single-step and examine with an Arduino or something.

The whole setup is going to cost you the thick end of $100.

But you can do that just as easily in an emulator.

And meanwhile with RISC-V you can get an ESP32-C3 board with 400k RAM for a dollar or two, or the 1 GHz 64 MB RAM 64 bit Linux Milk-V Duo for $5. And if you wish, run exactly the same programs on a $2500 64 core 128 GB RAM Pioneer. And bunches of $10, $30, $70, $100, $200 boards (and now $400 laptops) in between.

Only ARM gives you similar breadth, but the instruction sets of a Cortex-M0 and M4 Mac are so different they might as well be from different companies.


Having a large body of old software and games, written for various random platforms across 20+ years is also a killer feature.


And you'd have to spend a ton of time porting to each target system.

OTOH, the Z80 is better for this, because you can at least get CP/M up and running with a minimum of trouble.


With an 8088 you could port DOS (which resembles CP/M-86) though games would require more memory and a video chip. But we've kind of left true 8-bit territory at this point.


> It's $8 and can't run without external ROM and RAM and a clock circuit and some glue logic.

True but I've always found that there was a special 'charm' to these old CPUs because you have to build the circuit you described as a bare minimum, which is not difficult and makes you learn a range of skills.


All my old assembly games would be 14x too fast. I'd have to adjust the between loop sleep constant?


*run




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

Search: