Aide Boot Kernel Asm Compilation Erreur

x-no Messages postés 7 Date d'inscription samedi 18 janvier 2014 Statut Membre Dernière intervention 14 avril 2014 - 23 mars 2014 à 14:52
Technomael Messages postés 8 Date d'inscription samedi 1 août 2015 Statut Membre Dernière intervention 11 août 2015 - 1 août 2015 à 02:44
Bonjour je viens a vous car j'ai un bug dans mon code source que je n'arrive pas a regler n'ayant pas toute les connaissance en ASM je suis un peut perdu j'essaie de crée un petit bootloader et un petit noyau pour le plaisir j'ai réussie a trouver quelque source et de l'aide sur se forum et d'autre en général j'essaie de me débrouiller seul mais la je suis perdu donc en résumer mon bootloader charge mon noyau et l'éxecute mais a l'éxecution du noyau il affiche des truc bizard et plante total voila si une personne peut m'aider merci

Le bootloader et tous simplement du site de pepin ou bosokernel

 
%define BASE 0x100 ; 0x0100:0x0 = 0x1000
%define KSIZE 1 ; nombre de secteurs de 512 octets a charger

[BITS 16]
[ORG 0x0]

jmp start
%include "UTIL.INC"
start:

; initialisation des segments en 0x07C0
mov ax, 0x07C0
mov ds, ax
mov es, ax
mov ax, 0x8000 ; stack en 0xFFFF
mov ss, ax
mov sp, 0xf000

; recuparation de l'unite de boot
mov [bootdrv], dl

; affiche un msg
mov si, msgDebut
call afficher

; charger le noyau
xor ax, ax
int 0x13

push es
mov ax, BASE
mov es, ax
mov bx, 0

mov ah, 2
mov al, KSIZE
mov ch, 0
mov cl, 2
mov dh, 0
mov dl, [bootdrv]
int 0x13
pop es

; saut vers le kernel
jmp dword BASE:0


msgDebut: db "Chargement du kernel", 13, 10, 0

bootdrv: db 0

;; NOP jusqu'a 510
times 510-($-$$) db 144
dw 0xAA55


le noyau : et de youtube


[BITS 16]
[ORG 0x0]

%include "UTIL.INC"

Main:
cli
mov ax, 0x0000
mov ss, ax
mov sp, 0xFFFF
sti

mov ax, 0x8000
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax


mov [BootDrive] , dl

setup_bg:
mov dx, 0
call move_cursor

mov ah, 09h
mov al, ''
mov bh, 0
mov bl, 00000111b
mov cx, 2400
int 10h

mov si, version
call Print

call newline

mov si, copyright
call Print

cmd:
call newline

mov si, prompt
call Print

mov di, input_buffer

mov al, 0
mov cx, 256
rep stosb

mov ax, input_buffer
mov di, input_buffer

.loop:
call keyboard

cmp al, 13 ;ENTER
je .done

cmp al, 8 ;BACKSPACE
je .backspace

jmp .character

.backspace:
mov ah, 0Eh
mov al, 8
int 10h
mov al, 32
int 10h
mov al, 8
int 10h
dec di
jmp .loop

.character:
mov ah, 0Eh
int 10h
stosb
jmp .loop

.done:
mov ax, 0
stosb

call newline

mov si, input_buffer
cmp BYTE [si], 0

je cmd

;All built-in commands
mov di, help_string
call compare
jc help

mov di, help_uc
call compare
jc help

mov di, dir_string
call compare
jc dir

mov di, dir_uc
call compare
jc dir

mov di, exit_string
call compare
jc exit

mov di, exit_uc
call compare
jc exit

;what if it's not a built-in command?
mov si, input_buffer
call Print

mov si, no_command
call Print

jmp cmd

%INCLUDE "variables.asm"
%INCLUDE "functions.asm"
%INCLUDE "cli_commands.asm"

1 réponse

Technomael Messages postés 8 Date d'inscription samedi 1 août 2015 Statut Membre Dernière intervention 11 août 2015
1 août 2015 à 02:44
bon je n'est pas pris le temps de bien me concentré sur ton code source mais essaye d'abord ceci
mov ax, 0x1000
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax

au lieu de
mov ax, 0x8000
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax

car ton noyau est charger à l'adresse 1000h par le bootloader.
je vais prend un peu de temp pour réfléchir sur ton code mais dis mois d'abord ce que ça donne après avoir changer le 0x8000 en 0x1000.
0
Rejoignez-nous