Import backup from 2003-08-05
This commit is contained in:
parent
e6805ee94c
commit
2ada7fd5df
33
bootsect.asm
33
bootsect.asm
@ -141,11 +141,12 @@ found_file: ;ds:si points to root dir entry of kernel file
|
|||||||
mov bx, FAT_SEG
|
mov bx, FAT_SEG
|
||||||
mov ds, bx ;ds points to beginning of FAT
|
mov ds, bx ;ds points to beginning of FAT
|
||||||
xor bx, bx
|
xor bx, bx
|
||||||
|
xor di, di
|
||||||
|
|
||||||
readkernel_loop:
|
readkernel_loop:
|
||||||
cmp ax, 0xff7
|
cmp ax, 0xff7
|
||||||
jg readkernel_done
|
jg readkernel_done
|
||||||
;inc word [k_count]
|
inc di
|
||||||
push ax
|
push ax
|
||||||
push bx
|
push bx
|
||||||
call getCHSfromCluster
|
call getCHSfromCluster
|
||||||
@ -183,20 +184,24 @@ got_cluster:
|
|||||||
jmp readkernel_loop
|
jmp readkernel_loop
|
||||||
|
|
||||||
readkernel_done: ;now copy kernel to final location in KERNEL_ADD!
|
readkernel_done: ;now copy kernel to final location in KERNEL_ADD!
|
||||||
|
xor ecx, ecx
|
||||||
|
mov cx, di ;cx=# of 512byte sectors loaded
|
||||||
|
shl ecx, 9 ;ecx=ecx*512
|
||||||
|
|
||||||
; mov ax, KERNEL_SEG
|
mov ax, KERNEL_SEG
|
||||||
; mov ds, ax
|
mov ds, ax
|
||||||
; xor esi, esi
|
xor esi, esi
|
||||||
; xor ax, ax
|
xor ax, ax
|
||||||
; mov es, ax
|
mov es, ax
|
||||||
; mov edi, KERNEL_ADD
|
mov edi, KERNEL_ADD
|
||||||
; xor ecx, ecx
|
movekernel_loop:
|
||||||
; mov cx, [k_count] ;cx=# of 512byte sectors loaded
|
mov al, [ds:esi]
|
||||||
; shl ecx, 9 ;ecx=ecx*512
|
inc esi
|
||||||
;movekernel_loop:
|
mov [es:edi], al
|
||||||
; o32 lodsb ;mov al, [ds:esi]
|
inc edi
|
||||||
; o32 stosb ;mov [es:edi], al
|
dec ecx
|
||||||
; o32 loop movekernel_loop
|
cmp ecx, 0
|
||||||
|
jne movekernel_loop
|
||||||
|
|
||||||
jmp $
|
jmp $
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user