fix: chargement des fonctions et des sections

This commit is contained in:
Nicolas H 2019-07-17 22:41:03 +02:00
parent 8e35ea4794
commit 06caf6f907
4 changed files with 17 additions and 7 deletions

View File

@ -157,7 +157,7 @@ macro use lib*,fonction*
db `lib,"::",`fonction,0 db `lib,"::",`fonction,0
fonction: fonction:
dd 0 dd 0
dd 0 dw 0
} }
macro declare fonction* macro declare fonction*

View File

@ -20,6 +20,8 @@ copy:
test: all copy qemu test: all copy qemu
retest: clean test
view: final/cos2000.img view: final/cos2000.img
(hexdump -C ./final/cos2000.img|head -c10000) (hexdump -C ./final/cos2000.img|head -c10000)

View File

@ -149,6 +149,7 @@ proc mbloadsection uses ax bx cx si di ds es, blocks:word
add ax,4 add ax,4
pushad pushad
stdcall biosprint,ax stdcall biosprint,ax
stdcall biosprint,return
popad popad
stdcall mbcreate,ax,word [bx+2] stdcall mbcreate,ax,word [bx+2]
jc .error jc .error
@ -191,6 +192,7 @@ popad
ret ret
endp endp
return db 0dh,0ah,0
;Initialise les blocs de mémoire en prenant memorystart pour segment de base ;Initialise les blocs de mémoire en prenant memorystart pour segment de base
proc mbinit uses ax cx si di ds es proc mbinit uses ax cx si di ds es
@ -618,11 +620,16 @@ proc mbloadfuncs uses ax bx cx dx si ds, blocks:word
cmp word [si],0 cmp word [si],0
je .endofloading je .endofloading
stdcall mbsearchfunc,si stdcall mbsearchfunc,si
pushad
stdcall biosprint,si
push ds
push cs
pop ds
stdcall biosprint,return
pop ds
popad
jnc .toendoftext jnc .toendoftext
mov bx,si mov bx,si
;pushad
;stdcall biosprint,si
;popad
.findend: .findend:
inc bx inc bx
cmp byte [bx], ':' cmp byte [bx], ':'
@ -646,7 +653,7 @@ proc mbloadfuncs uses ax bx cx dx si ds, blocks:word
inc si inc si
mov [si],ax mov [si],ax
mov [si+2],dx mov [si+2],dx
add si,4 add si,6
jmp .loadfuncs jmp .loadfuncs
.endofloading: .endofloading:
clc clc

View File

@ -173,14 +173,15 @@ error:
stdcall bioswaitkey stdcall bioswaitkey
jmp far 0FFFFh:0000h jmp far 0FFFFh:0000h
shell find "COMMANDE.CE\0" shell find "COMMANDE.CE"
db 0
thepci pciinf thepci pciinf
thecpu cpu thecpu cpu
temporary db 256 dup (0) temporary db 256 dup (0)
makereturn db 0dh,0ah,0 makereturn db 0dh,0ah,0
msg_memory db "Initialisation de la memoire",0 msg_memory db "Initialisation de la memoire",0
msg_memory_init db " -Creation du bloc primordial",0 msg_memory_init db " -Creation du bloc primordial",0
msg_memory_section db " -Developpement des sections",0 msg_memory_section db " -Developpement des sections",0dh,0ah,0
msg_memory_jumps db "Redirection du systeme",0 msg_memory_jumps db "Redirection du systeme",0
msg_video_init db "Initialisation du pilote VIDEO",0 msg_video_init db "Initialisation du pilote VIDEO",0
msg_handler db "Initialisation du gestionnaire d'interruption",0 msg_handler db "Initialisation du gestionnaire d'interruption",0