-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
304 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[build] | ||
target = "x86_64-atomix.json" | ||
|
||
[target.'cfg(target_os = "none")'] | ||
runner = "bootimage runner" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
*.swp | ||
|
||
|
||
#Added by cargo | ||
# | ||
#already existing elements are commented out | ||
|
||
/target | ||
**/*.rs.bk |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "atomix" | ||
version = "0.1.0" | ||
authors = ["AtsukiTak <[email protected]>"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
bootloader = "~0.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#![no_std] | ||
#![no_main] | ||
|
||
use core::panic::PanicInfo; | ||
|
||
static HELLO: &[u8] = b"Hello ATOMIX!!"; | ||
|
||
#[no_mangle] | ||
pub extern "C" fn _start() -> ! { | ||
let vga_buffer = 0xb8000 as *mut u8; | ||
|
||
for (i, &byte) in HELLO.iter().enumerate() { | ||
unsafe { | ||
*vga_buffer.offset(i as isize * 2) = byte; | ||
*vga_buffer.offset(i as isize * 2 + 1) = 0xb; | ||
} | ||
} | ||
|
||
loop {} | ||
} | ||
|
||
#[panic_handler] | ||
fn panic(_info: &PanicInfo) -> ! { | ||
loop {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"llvm-target": "x86_64-unknown-none", | ||
"data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128", | ||
"arch": "x86_64", | ||
"target-endian": "little", | ||
"target-pointer-width": "64", | ||
"target-c-int-width": "32", | ||
"os": "none", | ||
"executables": true, | ||
"linker-flavor": "ld.lld", | ||
"linker": "rust-lld", | ||
"panic-strategy": "abort", | ||
"disable-redzone": true, | ||
"features": "-mmx,-sse,+soft-float" | ||
} |