window
This commit is contained in:
parent
b7c247e6cc
commit
4870d85d5e
|
@ -14,3 +14,23 @@ Cargo.lock
|
||||||
# MSVC Windows builds of rustc generate these, which store debugging information
|
# MSVC Windows builds of rustc generate these, which store debugging information
|
||||||
*.pdb
|
*.pdb
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Added by cargo
|
||||||
|
|
||||||
|
/target
|
||||||
|
|
||||||
|
|
||||||
|
# Added by cargo
|
||||||
|
#
|
||||||
|
# already existing elements were commented out
|
||||||
|
|
||||||
|
#/target
|
||||||
|
|
||||||
|
|
||||||
|
# Added by cargo
|
||||||
|
#
|
||||||
|
# already existing elements were commented out
|
||||||
|
|
||||||
|
#/target
|
||||||
|
#Cargo.lock
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/windows.iml" filepath="$PROJECT_DIR$/.idea/windows.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="CPP_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
|
@ -1,3 +1,3 @@
|
||||||
# windows
|
# windows
|
||||||
|
![windows boot screen](presskit/real%20windows.png)<br>
|
||||||
windows nt kernel source tree
|
this is the kernel for windows
|
|
@ -0,0 +1,2 @@
|
||||||
|
# output file
|
||||||
|
boot
|
|
@ -0,0 +1,32 @@
|
||||||
|
[bits 16]
|
||||||
|
[org 0x7c00]
|
||||||
|
|
||||||
|
|
||||||
|
xor ax, ax
|
||||||
|
mov ds, ax
|
||||||
|
|
||||||
|
; set graphics mode
|
||||||
|
mov ax, 00h
|
||||||
|
mov ah, 0x00
|
||||||
|
int 0x10
|
||||||
|
|
||||||
|
; write string to screen
|
||||||
|
mov bh, 0
|
||||||
|
mov bl, 0b00001111
|
||||||
|
mov al, 1
|
||||||
|
mov ah, 13h
|
||||||
|
mov cx, WINDOWS_STR_END - WINDOWS_STR
|
||||||
|
mov dl, 0
|
||||||
|
mov dh, 0
|
||||||
|
push cs
|
||||||
|
pop es
|
||||||
|
mov bp, WINDOWS_STR
|
||||||
|
int 0x10
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
WINDOWS_STR: db 'microsoft windows', 0
|
||||||
|
WINDOWS_STR_END:
|
||||||
|
|
||||||
|
times 510-($-$$) db 0
|
||||||
|
dw 0xAA55
|
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -0,0 +1,22 @@
|
||||||
|
#!no_std
|
||||||
|
|
||||||
|
fn print_vga_buffer(string : &str) {
|
||||||
|
// get address of VGA buffer
|
||||||
|
let mut vga_buffer = 0xb8000 as *mut u8;
|
||||||
|
|
||||||
|
// get length of string
|
||||||
|
let len = string.len();
|
||||||
|
|
||||||
|
// write string to VGA buffer
|
||||||
|
for i in 0..len {
|
||||||
|
unsafe {
|
||||||
|
*vga_buffer = string.as_bytes()[i];
|
||||||
|
vga_buffer = vga_buffer.offset(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
print_vga_buffer("microsoft");
|
||||||
|
}
|
Loading…
Reference in New Issue