4 ms·
Golang in DOS! "...and it was updated in March 2012 to include the Go programming language in addition to C, C++, and Fortran. " I wouldn't mind having Rust on
by myth_drannon 5y ago
Golang in DOS!
"...and it was updated in March 2012 to include the Go programming language in addition to C, C++, and Fortran. "
I wouldn't mind having Rust on 486 but it doesn't look like it will ever be possible from what I read about its architecture.
- deleted 5y ago[deleted]
- Teknoman117 5y agoI managed to compile for a 386 as a target for a no_std rust, but as far as running the compiler goes, might be SOL on that one. https://github.com/teknoman117/ts-3100-images/tree/master/rustimage https://github.com/teknoman117/ts-3100-images/tree/master/ru... (for this SBC: https://docs.embeddedarm.com/TS-3100 https://docs.embeddedarm.com/TS-3100) My goal was to follow blog_os on this board for fun. Main sticky point is the 386 not having any hardware atomic operations (which didn't show up until 486). I recently got a current Gentoo base environment booting on a 133 MHz AM5x86 based industrial SBC and it takes 3 minutes to compile hello world in C++ (70 seconds for C) so I'm not super confident you'd even want to use rust compiler on a 486, even for "a day in a programmer's life from 30 years ago" experiment.
- mmastrac 5y agoTechnically, as a single-core CPU, all operations are atomic. /s
- Teknoman117 5y agoI suppose I should say instructions which let you do critical sections without disabling preemption or interrupts =P
- mmastrac 5y agoHah yes. I got used to the CLI/STI pattern around perf-sensitive or concurrent code on <=386 back in the day. EDIT: though I wonder now if you could use the fact that flags are returned from basic memory ALU operations to implement some basic atomics.
- mmastrac 5y agoRust can link 32-bit code that can run 16-bit segmented mode [0] and if you can figure out the right set of protected mode magick, you could almost certainly get it working in flat mode. I started working on a DOS-based project and played around with Rust before deciding that it was going to be tough and would not be as optimal as just dropping to C and using OpenWatcom which is pretty capable considering its age, IMO. [0] https://github.com/o8vm/rust_dos https://github.com/o8vm/rust_dos