Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@
*.exe
*.out
*.app
*.bin


build/
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.27)

set(PROJECT_NAME "AnetteOS")


project($PROJECT_NAME)
1 change: 1 addition & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file removed boot.bin
Binary file not shown.
89 changes: 0 additions & 89 deletions boot.s
Original file line number Diff line number Diff line change
@@ -1,89 +0,0 @@
ORG 0
BITS 16

_start:
jmp short start
nop

times 33 db 0

start:
jmp 0x7c0:step2
step2:
cli
mov ax, 0x7c0
mov ds, ax
mov es, ax
mov ax, 0x00
mov ss, ax
mov sp, 0x7c00
sti

; Print disclaimer message only.
mov si, message_1
call print




;
; Global descriptor table definitions
;
gdt_start:
gdt_null:
dd 0x0
dd 0x0
; offset 0x8
gdt_code: ; Code Segment
dw 0xffff ; Segment Limits
dw 0 ; Base first 0-15 bits
dw 0 ; Base 16-23 bits
db 0x9a ; Access Byte
db 11001111b ; High 4 bits and the low 4 bits flags.
db 0 ; base 24-31

; offset 0x10
gdt_data: ; DS, SS, ES, FS, GS
dw 0xffff ; Segment Limits
dw 0 ; Base first 0-15 bits
dw 0 ; Base 16-23 bits
db 0x92 ; Access Byte
db 11001111b ; High 4 bits and the low 4 bits flags.
db 0 ; base 24-31
gdt_end:
gdt_descriptor:
dw gdt_end - gdt_start-1
dd gdt_start



; Utils only for real mode.
print:
mov bx, 0
.loop:
lodsb
cmp al,0
je .done
call print_char
jmp .loop
.done:
ret

print_char:
mov ah, 0eh
int 0x10
ret




; required for OS entry in BIOS start point.

message_1: db 'Annette Kernel', 0

times 510- ($ - $$) db 0
dw 0xAA55