Skip to content

Commit

Permalink
chore: remove useless file and trying refactor bootloader
Browse files Browse the repository at this point in the history
  • Loading branch information
d0p1s4m4 committed Mar 31, 2024
1 parent fdd16ec commit 6d5cfb1
Show file tree
Hide file tree
Showing 13 changed files with 320 additions and 328 deletions.
66 changes: 33 additions & 33 deletions boot/README.org
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
#+TITLE: StupidOS Bootloader
#+begin_src
0x100000 +-----------------------+
| |
| Reserved |
| |
0x080000 +-----------------------+
| |
| Kernel preload |
| |
0x00F000 +-----------------------+
| |
| buffer |
| |
0x008000 +-----------------------+
| |
| Boot0 |
| |
0x007000 +-----------------------+
| |
| Real mode stack |
| |
0x006000 +-----------------------+
| |
| Boot1 |
| |
0x001000 +-----------------------+
| |
| Reserved (BIOS & IVT) |
| |
0x000000 +-----------------------+
#+end_src
#+TITLE: StupidOS Bootloader

#+begin_src
0x100000 +-----------------------+
| |
| Reserved |
| |
0x080000 +-----------------------+
| |
| Kernel preload |
| |
0x00F000 +-----------------------+
| |
| buffer |
| |
0x008000 +-----------------------+
| |
| bootsector |
| |
0x007000 +-----------------------+
| |
| Real mode stack |
| |
0x006000 +-----------------------+
| |
| stpdldr.sys |
| |
0x001000 +-----------------------+
| |
| Reserved (BIOS & IVT) |
| |
0x000000 +-----------------------+
#+end_src
27 changes: 18 additions & 9 deletions boot/common/bios.inc
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
bios_print:
lodsb
or al, al
jz @f
mov ah, 0x0E
int 0x10
jmp bios_print
@@:
ret
;; File: bios.inc


;; Function: bios_print
;;
;; Parameters:
;;
;; si - null-terminated string to print
;;
bios_print:
lodsb
or al, al
jz @f
mov ah, 0x0E
int 0x10
jmp bios_print
@@:
ret
Loading

0 comments on commit 6d5cfb1

Please sign in to comment.