# HG changeset patch # User Pascal Bellard # Date 1345933705 -7200 # Node ID 1d5a6d3ed1f5167f02e1da88a065d705cb562f69 # Parent 3fd2f1836a8c78b7d58d056645924f1f7467998d memtest: lzma compression (again) diff -r 3fd2f1836a8c -r 1d5a6d3ed1f5 memtest/stuff/unpack.S --- a/memtest/stuff/unpack.S Sun Aug 26 00:21:22 2012 +0200 +++ b/memtest/stuff/unpack.S Sun Aug 26 00:28:25 2012 +0200 @@ -1,6 +1,8 @@ -#define TOP 0x8FF00 -#define SYSTEM 0x10000 -#define SETUP 4 +#define TOP 0x8FD00 +#define SYSTEM 0x10000 +#define SETUP 4 + +#define CHANGE_STACK 1 .text .code16 @@ -67,17 +69,31 @@ moved: popw %es // restore setup seg movw START_IP, %di +#if CHANGE_STACK + movw $0xFFFE, %ax + movw %ss, %bx + pushw $0 + popw %ss + xchgw %ax, %sp + pushw %bx // %ss + pushw %ax // %sp +#endif call unpack // unpack setup pushw $SYSTEM/16 popw %es xorw %di,%di call unpack // unpack system +#if CHANGE_STACK + popw %ax // %sp + popw %ss + xchgw %ax, %sp +#endif popw %es popw %ds popal iret unpack: -#include "unlz4.S" +#include "unlzma.S" end: