wok diff syslinux/stuff/iso2exe/mvcom.S @ rev 14150
syslinux: add isohybrid.exe
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Mar 04 09:52:12 2013 +0100 (2013-03-04) |
parents | |
children | ada914860f33 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/syslinux/stuff/iso2exe/mvcom.S Mon Mar 04 09:52:12 2013 +0100 1.3 @@ -0,0 +1,43 @@ 1.4 + .text 1.5 + .code16 1.6 + 1.7 +ORGCOM = 0x100 1.8 + 1.9 + .org 0 1.10 + 1.11 + .globl _start 1.12 +_start: 1.13 + movw $0, %si // .com size 1.14 + movw $0, %bx // .com loc 1.15 +#if 1 1.16 + pushw %si 1.17 + leaw 1-64-256(%bx,%si), %cx 1.18 + leaw (%bx,%si), %si 1.19 + movw $0xF000, %di 1.20 + cmpw %si, %di 1.21 + jc skip 1.22 + std 1.23 + rep 1.24 + movsb 1.25 + subw %si, %di 1.26 + addw %di, %bx 1.27 +skip: 1.28 + popw %si 1.29 +#endif 1.30 + movw $done-install, %cx 1.31 + leaw (%bx,%si), %di 1.32 + pushw %si 1.33 + call move 1.34 +install: 1.35 + popw %cx 1.36 + movw $ORGCOM, %di 1.37 + pushw %bx 1.38 +move: 1.39 + popw %si 1.40 + pushw %di 1.41 + cld 1.42 + rep 1.43 + movsb 1.44 + ret 1.45 +done: 1.46 +// .org 64