wok-current diff syslinux/stuff/iso2exe/meminfo.S @ rev 21553
syslinux/iso2exe,taziso: add slitaz.pif
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri May 10 19:27:17 2019 +0200 (2019-05-10) |
parents | 45e76a6c05d7 |
children |
line diff
1.1 --- a/syslinux/stuff/iso2exe/meminfo.S Sat Mar 01 19:54:32 2014 +0000 1.2 +++ b/syslinux/stuff/iso2exe/meminfo.S Fri May 10 19:27:17 2019 +0200 1.3 @@ -53,6 +53,20 @@ 1.4 popw %ds 1.5 pushw %cs 1.6 popw %es 1.7 +#if 1 1.8 + pushfw // save flags 1.9 + // bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1.10 + // flags 0 NT IOPL OF DF IF TF SF ZF 0 AF 0 PF 1 CF 1.11 + movb $0x10, %ah 1.12 + pushw %ax 1.13 + popfw // < 286 : flags[12..15] are forced 1 1.14 + pushfw // = 286 : flags[12..15] are forced 0 1.15 + popw %bx // > 286 : only flags[15] is forced 0 1.16 + popfw // restore flags 1.17 + addb %ah, %bh // test F0 and 00 cases 1.18 + cmpb %ah, %bh 1.19 + jbe fail // C=8086/80186, Z=80286 1.20 +#endif 1.21 xorl %ebx, %ebx 1.22 e820lp: 1.23 movl $0xe820, %eax 1.24 @@ -104,13 +118,15 @@ 1.25 movw %bx, 24+2(%di) 1.26 incb %dh 1.27 movw %dx, 56+2(%di) 1.28 - shrw $6, %ax // 1K -> 64K 1.29 + movw %cx, %dx 1.30 + movb $6, %cl 1.31 + shrw %cl, %ax // 1K -> 64K 1.32 jz e801_configured 1.33 - shrw $6, %cx // 1K -> 64K 1.34 + shrw %cl, %dx // 1K -> 64K 1.35 addw $0x10, %ax 1.36 - addw $0x10, %cx 1.37 + addw $0x10, %dx 1.38 movw %ax, 8+2(%di) 1.39 - movw %cx, 40+2(%di) 1.40 + movw %dx, 40+2(%di) 1.41 movw $extended, %si 1.42 call pute801 1.43 call pute801 1.44 @@ -133,7 +149,8 @@ 1.45 popw %di 1.46 jc fail3 1.47 movb $0x10, 0+2(%di) // 1M 1.48 - shrw $6, %ax // 1K -> 64K 1.49 + movb $6, %cl 1.50 + shrw %cl, %ax // 1K -> 64K 1.51 jz fail3 1.52 addw $0x10, %ax 1.53 movw %ax, 8+2(%di)