This commit is contained in:
husky 2022-04-02 16:55:03 -07:00
parent b7c247e6cc
commit 4870d85d5e
Signed by: MlCROSOFT
GPG key ID: E00F7FA3381F0647
9 changed files with 103 additions and 2 deletions

20
.gitignore vendored
View file

@ -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

8
.idea/modules.xml Normal file
View file

@ -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>

6
.idea/vcs.xml Normal file
View file

@ -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>

11
.idea/windows.iml Normal file
View file

@ -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>

View file

@ -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

2
assembly/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
# output file
boot

32
assembly/boot.asm Normal file
View file

@ -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

BIN
presskit/real windows.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

22
src/main.rs Normal file
View file

@ -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");
}