4 ms·
The thing I adore about computer science is that it is quite tractable to understand absolutely everything from theories of data and computation, programming la
by gorgoiler 6y ago
The thing I adore about computer science is that it is quite tractable to understand absolutely everything from theories of data and computation, programming languages and operating systems, and hardware.
This article is a fantastic look at the lower parts of the stack, and it’s really made me look forward to the next time I’ll be teaching this topic in my own classes.
RISC looks much easier to learn than the code I’ve been using: clang generated asm in macOS.
I was actually thinking of moving to using assembler in DOSBox (1) for nostalgia reasons and (2) because it could be a lot simpler and less crufty.
What’s an equivalent platform / set of tools with which I could do some real world RISC? Is my macOS assembler RISC already, but just not as elegant as this author’s examples?
- tom_mellior 6y ago> RISC RISC (https://en.m.wikipedia.org/wiki/Reduced_instruction_set_computer https://en.m.wikipedia.org/wiki/Reduced_instruction_set_comp...) is a class of computer architectures. RISC-V (https://en.m.wikipedia.org/wiki/RISC-V https://en.m.wikipedia.org/wiki/RISC-V) is an architecture in this family. > I was actually thinking of moving to using assembler in DOSBox That would mean using cumbersome tools in a cumbersome environment to target the same cumbersome x86 architecture. It's a horrible idea. Please don't inflict your nostalgia on students. Your past context means nothing to them, and it would not teach them anything useful. > What’s an equivalent platform / set of tools with which I could do some real world RISC? If your Clang/LLVM is compiled appropriately, it includes a RISC-V backend. You can pass something like --target=riscv64 to get code generated. You will need a cross-libc installed if you want to be able to call anything but syscalls. Then use an instruction set simulator to execute the binary. There is a simulator called Spike for RISC-V, or you could use Qemu. The answer here sketches these steps: https://stackoverflow.com/questions/54670887/how-can-i-compile-with-llvm-clang-to-risc-v-target https://stackoverflow.com/questions/54670887/how-can-i-compi... Alternatively, set up a whole RISC-V Linux system inside Qemu.