# HG changeset patch # User Pascal Bellard # Date 1465742228 -7200 # Node ID 58452392e8811b0cd277b5d38536f5a0d203f27b # Parent 60776d829b2a3771f040dd56f3a5240685260d0d linld/tobzimage: add elks support (again) diff -r 60776d829b2a -r 58452392e881 linld/stuff/tobzimage.S --- a/linld/stuff/tobzimage.S Sun Jun 12 15:30:59 2016 +0100 +++ b/linld/stuff/tobzimage.S Sun Jun 12 16:37:08 2016 +0200 @@ -114,14 +114,14 @@ int $0x15 incw 20(%si) incw 28(%si) - subb $0x10, %dh + subw $0x1000, %dx ja mvlp addw $48, %sp #ifdef ELKS_SUPPORT //cmpl $0x534B4C45, -26(%di) + movw $0x100, %cx elks_patch: jmp notelks - movw $0x100, %cx movb %ch, 23(%bx) movw %cx, %es pushw %di @@ -137,18 +137,20 @@ #endif movw $0x400, %si decb -15(%di) - movb -15(%di), %ch #ifdef LINUX001_SUPPORT //cmpw $0x3AE8, 0x3F(%si) linux001_patch: jmp notlnx001 movb $0x42, (%bx) xorw %di, %di +# ifndef ELKS_SUPPORT movw $0x100, %cx +# endif rep movsw notlnx001: #endif + movb -15(%di), %ch lret endcode: