Linked by Thom Holwerda on Sun 26th May 2013 18:48 UTC
OSNews, Generic OSes "A tiny 32 bit kernel written in Rust. I was inspired to download Rust and try to do this after seeing zero.rs - a stub that lets Rust programs run almost freestanding. It paints the screen bright red and then hangs. That's it."
Thread beginning with comment 562911
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: I clicked it, I liked it
by moondevil on Mon 27th May 2013 06:09 UTC in reply to "RE: I clicked it, I liked it"
moondevil
Member since:
2005-07-08

I'm not sure what they're doing in Rust; but the boot loader and the code to paint the screen red is all written in assembly.


Only the boot loader is written in Assembly, like in any OS.

Have you read the code at all?!


unsafe fn clear_screen(background: Color) {
range(0, 80*25, |i| {
*((0xb8000 + i * 2) as *mut u16) = (background as u16) << 12;
});
}

Reply Parent Score: 3

Brendan Member since:
2005-11-16

Hi,

Only the boot loader is written in Assembly, like in any OS.


Except for https://github.com/charliesome/rustboot/blob/master/runtime.asm . Have you read the code at all?!


- Brendan

Reply Parent Score: 1

moondevil Member since:
2005-07-08

That can be considered as part of the boot loading process, just clearing the screen before calling the real OS, like any other boot loader.

Do you understand Assembly?!

Reply Parent Score: 2