This repository has been archived by the owner on Apr 7, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
217 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
; Load tout le programme en 0x7c00 = définit un offset | ||
; Bootloader, first bytecode loaded, 16 bits only | ||
|
||
; Load all the program to the offset 0x7c00 | ||
[org 0x7c00] | ||
|
||
; Numéro du disque | ||
; Disk number | ||
mov [BOOT_DISK], dl | ||
|
||
; Création du stack, début à 0x7c00 | ||
; Stack creation at 0x7c00 | ||
mov bp, 0x7c00 | ||
; Stack pointer, current mem address | ||
; Stack pointer == current memory address | ||
mov sp, bp | ||
|
||
call readDisk | ||
|
||
; Jump aux secteurs suivants | ||
; Jump to next sectors | ||
jmp PROGRAM_SPACE | ||
|
||
%include "printString.asm" | ||
%include "diskRead.asm" | ||
|
||
; Écriture du boot sector (512 premiers bytes du disque terminés par 0x55 0xaa) pour booter l'OS | ||
; Répète "db 0" (écrit 0) jusqu'à 2 bytes avant la fin du boot sector | ||
; $$ : début de la section courante, adresse de la 1ère ligne | ||
; Par déduction, ($ - $$) = taille du code précédent | ||
; Write the end of the boot sector (first 512 bytes of the disk, ended by 0x55 0xaa) to boot the OS | ||
; Writes 0 until 2 bytes before the end of the boot sector | ||
; $$ : current section section, 1st line address | ||
; Thus ($ - $$) == precedent code size | ||
times 510-($-$$) db 0 | ||
|
||
; Écriture des 2 derniers bytes du boot sector | ||
; 2 last boot sector bytes | ||
db 0x55, 0xaa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
; Fichier généré automatiquement. | ||
; La valeur est calculée selon l'espace occupé par le fichier binaire final. | ||
; AUTO-GENERATED FILE | ||
; This value is calculated using the final binary file size. | ||
mov al, 42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
; Inclure les binaires | ||
; Includes binaries | ||
%macro incBin 2 | ||
SECTION .rodata | ||
GLOBAL %1 | ||
|
Oops, something went wrong.