wok-next diff syslinux/stuff/iso2exe/bootlinux.c @ rev 16041
syslinux/iso2exe: fix 'a la umsdos' install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Mar 09 14:09:57 2014 +0000 (2014-03-09) |
parents | d814ca840c3c |
children | 3865e09ec026 |
line diff
1.1 --- a/syslinux/stuff/iso2exe/bootlinux.c Fri Mar 07 10:50:10 2014 +0000 1.2 +++ b/syslinux/stuff/iso2exe/bootlinux.c Sun Mar 09 14:09:57 2014 +0000 1.3 @@ -91,8 +91,7 @@ 1.4 #define ZIMAGE_SUPPORT 1.5 1.6 #ifdef ZIMAGE_SUPPORT 1.7 -static int zimage = 0; 1.8 -static unsigned zimage_base; 1.9 +static unsigned zimage = 0; 1.10 static unsigned getss(void) 1.11 { 1.12 #asm 1.13 @@ -230,9 +229,8 @@ 1.14 } 1.15 if (!setup_version || !(buffer[LOADFLAGS] & 1)) { 1.16 #ifdef ZIMAGE_SUPPORT 1.17 - zimage = 1; 1.18 - zimage_base = getss() + 0x1000L; 1.19 - mem.base = zimage_base * 16L; 1.20 + zimage = getss() + 0x1000; 1.21 + mem.base = zimage * 16L; 1.22 if (mem.base + syssize > SETUP_SEGMENT*16L - 32) 1.23 die("Out of memory"); 1.24 #else 1.25 @@ -332,11 +330,12 @@ 1.26 mov sp, #CMDLINE_OFFSET 1.27 #endasm 1.28 #ifdef ZIMAGE_SUPPORT 1.29 - if (zimage) { 1.30 #asm 1.31 + mov bx, _zimage 1.32 + or bx, bx 1.33 + jz notzimage 1.34 mov eax, _mem 1.35 shr eax, #4 // top 1.36 - mov bx, _zimage_base 1.37 mov dx, #0x1000 1.38 push cs 1.39 pop ds 1.40 @@ -361,8 +360,8 @@ 1.41 inc dx 1.42 cmp ax,bx 1.43 jne sysmove 1.44 +notzimage: 1.45 #endasm 1.46 - } 1.47 #endif 1.48 #asm 1.49 push ss