wok diff syslinux/stuff/iso2exe/lzcom.S @ rev 13713

syslinux/iso2exe: add loram support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Dec 18 16:09:07 2012 +0100 (2012-12-18)
parents
children 5b84cc8c4002
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/syslinux/stuff/iso2exe/lzcom.S	Tue Dec 18 16:09:07 2012 +0100
     1.3 @@ -0,0 +1,36 @@
     1.4 +	.text
     1.5 +	.code16
     1.6 +	
     1.7 +ORGCOM	=	0x100
     1.8 +STKSZ	=	0x4000			// unlzma needs 16Kb
     1.9 +CODESZ	=	(0x10000-STKSZ)/2	//  max < 16 sectors = 32Kb
    1.10 +
    1.11 +	.org	0
    1.12 +
    1.13 +	.globl	_start
    1.14 +_start:
    1.15 +	cld
    1.16 +	movw	$packedcode-unpack, %ax
    1.17 +	movw	$packedcode+ORGCOM, %si
    1.18 +	movw	$-STKSZ-CODESZ, %di
    1.19 +	subw	%ax, %di
    1.20 +	pushw	%di
    1.21 +	movw	$CODESZ/2, %cx
    1.22 +	rep
    1.23 +	  movsw				// packed code
    1.24 +	movw	$unpack+ORGCOM, %si
    1.25 +	movw	%di, %bx
    1.26 +	xchgw	%ax, %cx
    1.27 +	rep
    1.28 +	  movsb				// decompressor
    1.29 +	movw	$ORGCOM, %di
    1.30 +	popw	%si
    1.31 +	pushw	%di
    1.32 +	pushw	%bx
    1.33 +	ret
    1.34 +
    1.35 +unpack:
    1.36 +#define FLAT16
    1.37 +#include "unlzma.S"
    1.38 +
    1.39 +packedcode: