Some file restructuring

This commit is contained in:
2023-12-25 16:57:09 +01:00
parent d170d66512
commit cb2d8b2790
10 changed files with 22 additions and 22 deletions
+7 -3
View File
@@ -13,10 +13,14 @@ cat build/boot.bin build/filetable.bin > build/bootloader.bin
# Kernel # Kernel
nasm -fbin src/kernel.asm -o build/kernel.bin nasm -fbin src/kernel.asm -o build/kernel.bin
# Programs
nasm -fbin src/fs/calc.asm -o build/calc.bin
nasm -fbin src/fs/edit.asm -o build/edit.bin
cat build/calc.bin build/edit.bin > build/files.bin
# Final binary # Final binary
nasm -fbin src/calc.asm -o build/calc.bin cat build/bootloader.bin build/kernel.bin build/files.bin > build/os.bin
nasm -fbin src/message.asm -o build/message.bin
cat build/bootloader.bin build/kernel.bin build/calc.bin build/message.bin > build/os.bin
# Run QEMU # Run QEMU
qemu-system-x86_64 -drive format=raw,file="./build/os.bin",index=0,media=disk -m 256M qemu-system-x86_64 -drive format=raw,file="./build/os.bin",index=0,media=disk -m 256M
+1 -1
View File
@@ -72,7 +72,7 @@ readFail:
cli cli
hlt hlt
%include "./src/print.asm" %include "./src/lib/print.asm"
driveNumber: db 0 driveNumber: db 0
+2 -1
View File
@@ -12,10 +12,11 @@
; ------------------ ; ------------------
filetable: filetable:
; db 'all',0,0,0,0,0,0,0,'txt',0,1,7 ; all - start: 1, size: 7
db 'boot',0,0,0,0,0,0, 'bin',0,1,1 ; boot.bin - start: 1, size: 1 db 'boot',0,0,0,0,0,0, 'bin',0,1,1 ; boot.bin - start: 1, size: 1
db 'filetable',0, 'txt',0,2,1 ; filetable.txt - start: 2, size: 1 db 'filetable',0, 'txt',0,2,1 ; filetable.txt - start: 2, size: 1
db 'kernel',0,0,0,0, 'bin',0,3,3 ; kernel.bin - start: 3, size: 3 db 'kernel',0,0,0,0, 'bin',0,3,3 ; kernel.bin - start: 3, size: 3
db 'calc',0,0,0,0,0,0, 'bin',0,6,1 ; calc.bin - start: 6, size: 1 db 'calc',0,0,0,0,0,0, 'bin',0,6,1 ; calc.bin - start: 6, size: 1
db 'message',0,0,0, 'txt',0,7,1 ; message.txt - start: 7, size: 1 db 'edit',0,0,0,0,0,0, 'bin',0,7,1 ; edit.bin - start: 6, size: 1
times 512-($-$$) db 0 times 512-($-$$) db 0
+1 -1
View File
@@ -17,7 +17,7 @@ start:
jmp 0x2000:0x0000 jmp 0x2000:0x0000
%include "./src/print.asm" %include "./src/lib/print.asm"
msg: db "Hello!", ENDL, 0 msg: db "Hello!", ENDL, 0
View File
+7 -6
View File
@@ -374,8 +374,8 @@ reboot: jmp 0xffff:0x0000
; ---------- ; ----------
; Includes ; Includes
; ---------- ; ----------
%include "./src/print.asm" %include "./src/lib/print.asm"
%include "./src/screen.asm" %include "./src/lib/screen.asm"
; -------- ; --------
; Data ; Data
@@ -402,11 +402,12 @@ helpMsg: db "Available Commands:", ENDL, \
; Commands ; Commands
; TODO: Put these into a file or something ; TODO: Put these into a file or something
lsCmd: db "ls", 0
helpCmd: db "help", 0
gfxCmd: db "gfx", 0
rebootCmd: db "reboot", 0
clearCmd: db "clear", 0 clearCmd: db "clear", 0
editCmd: db "edit", 0
gfxCmd: db "gfx", 0
helpCmd: db "help", 0
lsCmd: db "ls", 0
rebootCmd: db "reboot", 0
; Files ; Files
fileExt: db " ", 0 fileExt: db " ", 0
View File
-6
View File
@@ -1,6 +0,0 @@
%define ENDL 0x0A, 0x0D
db "This is a very cool message!", ENDL, ENDL, \
"Kern is a 32-bit (16-bit for now) OS based on the x86 cpu architecture."
times 512-($-$$) db 0
View File