wok diff syslinux/stuff/iso2exe/bootloader.S @ rev 18145
Add defragfs
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jun 18 16:31:01 2015 +0200 (2015-06-18) |
parents | 490951fbd6fd |
children | 0a22c10d35b2 |
line diff
1.1 --- a/syslinux/stuff/iso2exe/bootloader.S Mon Jun 15 16:28:54 2015 +0200 1.2 +++ b/syslinux/stuff/iso2exe/bootloader.S Thu Jun 18 16:31:01 2015 +0200 1.3 @@ -65,7 +65,7 @@ 1.4 movw $zeroed+1, %cx # clear gdt + offset, %ds, limits, cmdline="" 1.5 rep # don't worry about cld 1.6 stosb # already done above 1.7 - decw %di 1.8 + //decw %di 1.9 #else 1.10 movw $zeroed/2, %cx # clear gdt + offset, %ds, limits 1.11 rep # don't worry about cld 1.12 @@ -96,6 +96,7 @@ 1.13 # 1.14 # High doesn't hurt. Low does. Let's use the max: 63 1.15 1.16 + cli 1.17 ldsw 0x78(%bx), %si # %ds:%bx+0x78 is parameter table address 1.18 popw %di 1.19 pushw %es 1.20 @@ -112,7 +113,6 @@ 1.21 popw %ds # now %ds = %es = %ss = INITSEG 1.22 popl %fs:0x78(%bx) # update parameter table address 1.23 movb $63, 0x4-12(%di) # patch sector count, %di = stacktop 1.24 - cli 1.25 1.26 xchg %ax, %di # sector count 1.27 popw %ax # limits = 0 1.28 @@ -138,9 +138,6 @@ 1.29 movw $0xA33F, cmd_line_ptr-2-7(%bx) 1.30 #endif 1.31 call puts 1.32 -#if defined(MOVE_CMDLINE) || (defined(EDIT_CMDLINE) && defined(KEYBOARDLESS_SUPPORT)) 1.33 - pushw %di 1.34 -#endif 1.35 #ifdef EDIT_CMDLINE 1.36 cmdlp: 1.37 movb $0x20, %al # clear end of line 1.38 @@ -179,9 +176,6 @@ 1.39 rep 1.40 movsb 1.41 #endif 1.42 -#if defined(EDIT_CMDLINE) || (defined(MOVE_CMDLINE) && defined(KEYBOARD_TIMEOUT)) 1.43 - popw %di 1.44 -#endif 1.45 nocmdline: 1.46 #endif 1.47 1.48 @@ -194,7 +188,7 @@ 1.49 movb $0x88, %ah 1.50 int $0x15 1.51 //jc NeedMoreRAM # error code 80 or 86 1.52 - cmpw $0xC000, %ax # more than 49M ? 1.53 + cmpw $0xB000, %ax # more than 45M ? 1.54 jb NeedMoreRAM 1.55 movb %ch, bootsect_dst_base_hi(%si) # initramfs @ 32M 1.56 movb %ch, ramdisk_image_ofs+3-\base 1.57 @@ -306,6 +300,7 @@ 1.58 pushw %bx 1.59 movl -4(%bx), %ebx 1.60 addl %ebx, ramdisk_size_ofs-cur_initrd_size_ofs(%di) 1.61 + movb $swap_floppy2-0x100, %cs:dpy_swap_floppy-2+0x7C00 1.62 popw %bx 1.63 cmpb 2(%di), %bl 1.64 jb initrdlp 1.65 @@ -409,6 +404,7 @@ 1.66 movb $0,%ch # first cylinder 1.67 pushaw 1.68 movw $swap_floppy,%si 1.69 +dpy_swap_floppy: 1.70 #ifdef KEYBOARDLESS_SUPPORT 1.71 pushw %bx 1.72 call puts 1.73 @@ -419,7 +415,10 @@ 1.74 jne waitfloppydone 1.75 #ifdef MULTI_INITRD 1.76 decb (%si) # max_timeouts 1.77 - jz gobootit 1.78 +gobootit: 1.79 + //movw ramdisk_size+2-max_timeouts(%si), %cx 1.80 + .byte 0x8B, 0x4C, ramdisk_size+2-max_timeouts 1.81 + jz bootit 1.82 #endif 1.83 pushw %dx # some bios break dx... 1.84 cbw 1.85 @@ -442,14 +441,9 @@ 1.86 #ifdef MULTI_INITRD 1.87 orb $0x20, %al 1.88 cmp $'b', %al 1.89 - jnz read_sectorslp 1.90 -gobootit: 1.91 - //movw ramdisk_size+2-max_timeouts(%si), %cx 1.92 - .byte 0x8B, 0x4C, ramdisk_size+2-max_timeouts 1.93 - jmp bootit 1.94 -#else 1.95 + jz gobootit 1.96 +#endif 1.97 jmp read_sectorslp 1.98 -#endif 1.99 1.100 putcdot: 1.101 movb $'.'+3, %al // . = success, - = failure 1.102 @@ -496,10 +490,11 @@ 1.103 jg putcs 1.104 ret 1.105 1.106 -swap_floppy: 1.107 #ifdef MULTI_INITRD 1.108 +swap_floppy2: 1.109 .ascii "B or " 1.110 #endif 1.111 +swap_floppy: 1.112 .ascii "Next!" 1.113 .byte 7,13,0 # swap detection needs 13, 0 1.114 #ifdef MULTI_INITRD