wok-current diff syslinux/stuff/iso2exe/mvcom.S @ rev 18909

Add gnubg
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 22 21:29:18 2016 +0100 (2016-02-22)
parents 353dc1b968e5
children bd7250c6c521
line diff
     1.1 --- a/syslinux/stuff/iso2exe/mvcom.S	Sun Apr 07 13:15:40 2013 +0200
     1.2 +++ b/syslinux/stuff/iso2exe/mvcom.S	Mon Feb 22 21:29:18 2016 +0100
     1.3 @@ -7,41 +7,35 @@
     1.4  
     1.5  	.globl	_start
     1.6  _start:
     1.7 -	movw	$0, %si		// .com size
     1.8 -	movw	$0, %bx		// .com loc
     1.9 -#if 1
    1.10 -// Move up EXE/PE and DOS/COM to ensure that bootiso[]
    1.11 -// in EXE/PE will not be affected by the DOS/COM move.
    1.12 -	pushw	%si
    1.13 -	leaw	1-64-256(%bx,%si), %cx
    1.14 -	leaw	(%bx,%si), %si
    1.15 -	movw	$0xF000, %di	// Keep 4K for stack
    1.16 -	cmpw	%si, %di
    1.17 -	jc	skip
    1.18 +	movw	$0, %cx		// .com size
    1.19 +	movw	$0, %si		// .com loc
    1.20 +	movw	$0x100, %bx
    1.21 +	leaw	15(%bx,%si), %di
    1.22 +	andw	$-16, %di
    1.23 +	addw	%cx, %si
    1.24 +	addw	%cx, %di
    1.25 +	incw	%cx
    1.26  	std
    1.27  	rep
    1.28  	  movsb
    1.29 -	subw	%si, %di
    1.30 -	addw	%di, %bx
    1.31 -skip:
    1.32 -	popw	%si
    1.33 -#endif
    1.34 -	movw	$done-install, %cx
    1.35 -	leaw	(%bx,%si), %di
    1.36 -	pushw	%si
    1.37 -	call	move
    1.38 -install:
    1.39 -	popw	%cx
    1.40 -	movw	$ORGCOM, %di
    1.41 -	pushw	%bx
    1.42 -move:
    1.43 -	popw	%si
    1.44 -	pushw	%di
    1.45 -	cld
    1.46 +	incb	%ch
    1.47 +	movw	%cx, %si	
    1.48 +	decw	%si
    1.49  	rep
    1.50  	  movsb
    1.51 -	ret
    1.52 -done:
    1.53 -	.ascii	"(www.slitaz.org)"
    1.54 +	cld
    1.55 +	incw	%di
    1.56 +	shrw	$4, %di		// 186
    1.57 +	movw	%cs, %ax
    1.58 +	addw	%di, %ax
    1.59 +	movw	%ax, %ds
    1.60 +	movw	%ax, %es
    1.61 +	movw	%ax, %ss
    1.62 +	popw	%dx
    1.63 +	pushw	%cx
    1.64 +	pushw	%ax
    1.65 +	pushw	%bx
    1.66 +	retf
    1.67 +	.ascii	"www.slitaz.org"
    1.68  	
    1.69  //	.org	64