kolibrios/kernel/tags/kolibri0.5.2.1/blkdev/rdsave.inc
Andrey Halyavin (halyavin) 66f834f6e5 *Improved boot code
*Tag for kolibri 0.5.2.1 created

git-svn-id: svn://kolibrios.org@29 a494cfbc-eb01-0410-851d-a64ba20cac60
2005-12-14 08:09:29 +00:00

27 lines
723 B
PHP

cmp eax,6 ; SAVE FLOPPY IMAGE (HD version only)
jnz nosaveimage
cmp ebx,1
jnz img_save_hd_1
mov edx,bootpath ; path = '/KOLIBRI '
jmp img_save_hd_3
img_save_hd_1:
cmp ebx,2
jnz img_save_hd_2
mov edx,bootpath2 ; path = 0 (root dir)
jmp img_save_hd_3
img_save_hd_2:
cmp ebx,3
jnz exit_for_anyone
mov edx,[3010h]
mov edx,[edx+10h]
add edx,ecx
img_save_hd_3:
call restorefatchain ; restore FAT !!!
mov eax,image_save
mov ebx,1440*1024 ; size 1440 Kb
mov ecx,0x100000 ; address of image
call file_write
ret
nosaveimage: