wok diff syslinux/stuff/iso2exe/bootiso.S @ rev 13729
Add gputils
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Dec 22 16:41:33 2012 +0100 (2012-12-22) |
parents | 9d2380009b81 |
children | b5ea41033c21 |
line diff
1.1 --- a/syslinux/stuff/iso2exe/bootiso.S Tue Dec 18 16:09:07 2012 +0100 1.2 +++ b/syslinux/stuff/iso2exe/bootiso.S Sat Dec 22 16:41:33 2012 +0100 1.3 @@ -19,7 +19,7 @@ 1.4 .word 0xFFF0 // Initial (relative) SS value 1.5 .word 0xFFFE // Initial SP value 1.6 .word 0 // Checksum 1.7 - .word EXEADRS(fixseg) // Initial IP value 1.8 + .word EXEADRS(exestart) // Initial IP value 1.9 .word 0xFFF0 // Initial (relative) CS value 1.10 .word 0x001C // File address of relocation table 1.11 .word 0 // Overlay number 1.12 @@ -104,8 +104,8 @@ 1.13 ////////////////////////////// DOS EXE code /////////////////////////////////// 1.14 1.15 help: 1.16 - .ascii "SliTaz GNU/Linux" 1.17 - .byte EXESTR(loader) 1.18 + .ascii "SliTaz GNU/L" // SliTaz GNU/Linux boot loader 1.19 + .byte EXESTR(iloader) 1.20 no386: 1.21 .ascii "No 386" // No 386+ 1.22 .byte EXESTR(plus) 1.23 @@ -122,16 +122,16 @@ 1.24 .ascii "Invalid: paging + " // Invalid: paging + real mode. 1.25 realmodemsg: 1.26 .ascii "real" // real mode. 1.27 -// ------------------------------------------------------------------- 1.28 +// --------------- Must be in 00A0 011F range ------------------------ 1.29 mode: 1.30 .ascii " mod" 1.31 eeol: 1.32 .ascii "e" 1.33 .byte EXESTR(eol) 1.34 noloader: 1.35 - .ascii "No" 1.36 -loader: 1.37 - .ascii " boot loader" 1.38 + .ascii "No isol" // No isolinux boot loader 1.39 +iloader: 1.40 + .ascii "inux boot loader" 1.41 eol: 1.42 .ascii "." 1.43 eol2: 1.44 @@ -143,52 +143,41 @@ 1.45 plus: 1.46 .ascii "+" 1.47 .byte EXESTR(eol2) 1.48 +// ------------------------------------------------------------------- 1.49 1.50 -fixseg: 1.51 +exestart: 1.52 cld 1.53 movw $0x100, %si 1.54 movw -127(%si), %ax 1.55 - cwd 1.56 + cwd // clear dx 1.57 pushw %dx // dos exit 1.58 cmpw $0x2F20, %ax 1.59 - movb $EXESTR(help), %al 1.60 + movw $0x1000+EXESTR(help), %ax 1.61 je abort 1.62 + pushfw // save flags 1.63 + // bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1.64 + // flags 0 NT IOPL OF DF IF TF SF ZF 0 AF 0 PF 1 CF 1.65 + // movb $0x10, %ah 1.66 + pushw %ax 1.67 + popfw // < 286 : flags[12..15] are forced 1 1.68 + pushfw // = 286 : flags[12..15] are forced 0 1.69 + popw %cx // > 286 : only flags[15] is forced 0 1.70 + popfw // restore flags 1.71 + addb %ah, %ch // test F0 and 00 cases 1.72 + cmpb %ah, %ch 1.73 + movb $EXESTR(no386), %al 1.74 + jbe abort // C=8086/80186, Z=80286 1.75 +#if 1 1.76 movw (%si), %cx 1.77 - jcxz skip 1.78 + jcxz is386 1.79 +#endif 1.80 movw $0x7FE0/2, %cx 1.81 chklp: 1.82 lodsw 1.83 addw %ax, %dx 1.84 loop chklp 1.85 - orw %dx, %dx 1.86 movb $EXESTR(chkerr), %al 1.87 - jne abort 1.88 -skip: 1.89 - pushfw // save flags 1.90 - // bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1.91 - // flags 0 NT IOPL OF DF IF TF SF ZF 0 AF 0 PF 1 CF 1.92 - movb $0x70, %ah 1.93 - pushw %ax 1.94 - popfw // < 286 : flags[12..15] are forced 1 1.95 - pushfw // = 286 : flags[12..15] are forced 0 1.96 - popw %ax // > 286 : only flags[15] is forced 0 1.97 - popfw // restore flags 1.98 - addb $0x10, %ah // test F0 and 00 cases 1.99 - cmpb $0x10, %ah 1.100 - ja is386 // C=8086/80186, Z=80286 1.101 -#if 0 1.102 - jz is286 1.103 - xorw %bx, %bx 1.104 - movb (%bx), %dh 1.105 - decw %bx 1.106 - xorw %bx, (%bx) // 80186 write bytes at FFFF and 10000 1.107 - movw (%bx), %ax 1.108 - xorw %bx, (%bx) // 8086 write bytes at FFFF and 0000 1.109 - cmpw %ah, %dh 1.110 - jnz is186 1.111 -#endif 1.112 -NotSupported: 1.113 - movb $EXESTR(no386), %al 1.114 + je is386 // dx == 0 ? 1.115 abort: 1.116 puts: 1.117 movb $1, %ah