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 562908
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 LaceySnr on Mon 27th May 2013 05:24 UTC in reply to "RE: I clicked it, I liked it"
LaceySnr
Member since:
2009-09-28

Ah I didn't dig through the source yet, but I have been reading up on Rust as a result of it.

The clearing to red seems to be written in Rust: https://github.com/charliesome/rustboot/blob/master/main.rs

Edited 2013-05-27 05:26 UTC

Reply Parent Score: 2

Brendan Member since:
2005-11-16

Hi,

The clearing to red seems to be written in Rust: https://github.com/charliesome/rustboot/blob/master/main.rs


You're right - the assembly I saw ( https://github.com/charliesome/rustboot/blob/master/runtime.asm ) fills the screen with blue smiley faces on a black background(character 0x01) before the Rust code fills the screen with black null characters (character 0x00) on either a light pink or flashing red background (depending on how the video card felt like handling the attribute, as this isn't setup properly).

Of course this assumes that the firmware left the direction flag clear - the assembly "fill the screen" code may clear nothing and simply trash the EBDA instead, as there's no "CLD" instruction anywhere. It also assumes that the video mode actually is 80*25 text mode (I've seen cases where it's not).

- Brendan

Reply Parent Score: 3