diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-06-15 10:43:14 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-06-15 10:43:14 -0700 |
commit | d8f1d5b4731228689b6badd0b34720c3dc9eeeed (patch) | |
tree | 725d922dd64df0a107c3c75e8b5b8c88d98bd1c5 | |
parent | 541778abf197aad50e92a42d57a2acf518472b99 (diff) | |
download | syslinux-d8f1d5b4731228689b6badd0b34720c3dc9eeeed.tar.gz |
writestr_early: save/restore registers
We have made it this far without it, but it seems like a disaster
waiting to happen. We can afford the extra four bytes in sector 1.
-rw-r--r-- | core/extlinux.asm | 4 | ||||
-rw-r--r-- | core/ldlinux.asm | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/core/extlinux.asm b/core/extlinux.asm index 087fc3c1..c4165415 100644 --- a/core/extlinux.asm +++ b/core/extlinux.asm @@ -692,6 +692,7 @@ verify_checksum: ; messages, so it should be OK. ; writestr_early: + pushad .loop: lodsb and al,al jz .return @@ -699,7 +700,8 @@ writestr_early: mov bx,0007h ; Attribute int 10h jmp short .loop -.return: ret +.return: popad + ret ; getlinsecsr: save registers, call getlinsec, restore registers diff --git a/core/ldlinux.asm b/core/ldlinux.asm index 193bb064..5a205c07 100644 --- a/core/ldlinux.asm +++ b/core/ldlinux.asm @@ -712,6 +712,7 @@ verify_checksum: ; messages, so it should be OK. ; writestr_early: + pushad .loop: lodsb and al,al jz .return @@ -719,7 +720,8 @@ writestr_early: mov bx,0007h ; Attribute int 10h jmp short .loop -.return: ret +.return: popad + ret ; getlinsecsr: save registers, call getlinsec, restore registers |