HackerTrans
TopNewTrendsCommentsPastAskShowJobs

krustowski

no profile record

Submissions

Show HN: A DOS-like hobby OS written in Rust and x86 assembly

github.com
207 points·by krustowski·năm ngoái·60 comments

comments

krustowski
·9 tháng trước·discuss
let's resurrect these days with open.mp!
krustowski
·năm ngoái·discuss
How about the event loop in its completeness?
krustowski
·năm ngoái·discuss
Sort of, but IMO that module(s) is just a wrapper for video buffer.
krustowski
·năm ngoái·discuss
You are right, it goes way ahead the first iteration. I call it DOS-like because of its resemblance to the Text mode-only operating systems (and to MS-DOS especially). On the other hand, it shares very little as the architecture, command set, or hardware utilization approach are concerned when compared to MS-DOS.
krustowski
·năm ngoái·discuss
I am not at the moment. The goal is to keep this iteration in English for now. The first iteration was in Czech in the beginning though.
krustowski
·năm ngoái·discuss
Well, the point is to experiment with Rust no_std+no_main environment while trying to educate myself on how the things work under the hood. The project itself is part "just" a rewritten system (from C to Rust), and part an enhancement of such system furthermore. It lacks the external program execution though yet.
krustowski
·năm ngoái·discuss
NGL, the codebase of the first iteration is pretty much a mess. It had been written in my mid-teenage years, so the C code is not very consistent across the project. There is a filesystem prototype written in Go as well... Also, it is quite complex to even compile RoureXOS: it needs Borland TCC and TASM (ca 1989 btw) to properly build a 16bit executable(s). It is feasible to compile it using DOSBox though. Maybe some day I could open source that one repository too.
krustowski
·năm ngoái·discuss
The x86 arch is used because this system iteration derives from the first one, which relies on BIOS interrupts and inline assembly in Turbo C. I am not trying to mimic (MS-)DOS exclusively, but both systems are highly inspired by it.

IMO multiple archs could be supported as Rust compiler allows the target arch specification, so one would build a specific target before the build itself.
krustowski
·năm ngoái·discuss
For FAT12, it reads the first sector (0 or bootsector) of the floppy provided to gather information like bytes per sector, reserved sectors count, LBA of the root directory, etc.
krustowski
·năm ngoái·discuss
Booting from an EFI system partition has not been tested yet. FAT12 is the only filesystem (ok, there is a memdisk implementation, but it won't work now) supported, so GPT is not supported at the moment too (yet). Kinda aiming for FAT32 implementation to be the very next implemented (flash disks are usually FAT32 iirc). Not sure about the last question: the OS utilizes/directly writes to the VGA buffer in memory, the provided resolution is 80x25 by GRUB.
krustowski
·năm ngoái·discuss
Afaik there is a 'DIR' command in MS-DOS. Anyway, what would be a better command to list a directory? I could think of 'ls' maybe
krustowski
·năm ngoái·discuss
What a challenge! Need to implement some interrupts it seems then, to provide an API for filesystem and so... Thank you for such idea
krustowski
·năm ngoái·discuss
You are right. The first iteration however is 16bit and is very close to MS-DOS in terms of compatibility. Moreover, any OS that can handle simple disk I/O ops could be considered a DOS system too, innit?