diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-06-19 11:00:59 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-06-19 11:00:59 -0700 |
commit | bc12f7a629ad1f44a9be81ebbf6a0671cad02c2c (patch) | |
tree | 8c86154c93a123937508bc6299e088ec30a0faf4 | |
parent | 265f6b172bde2822d72403f7bf2bc259352304a2 (diff) | |
download | syslinux-bc12f7a629ad1f44a9be81ebbf6a0671cad02c2c.tar.gz |
chain.c32: check the stub sources into the tree
Check the stub sources into the tree, even though they aren't used by
the build; they are still useful when experimenting with changing this
stuff.
-rw-r--r-- | com32/modules/stubs/copydown.asm | 11 | ||||
-rw-r--r-- | com32/modules/stubs/swapstub.asm | 33 |
2 files changed, 44 insertions, 0 deletions
diff --git a/com32/modules/stubs/copydown.asm b/com32/modules/stubs/copydown.asm new file mode 100644 index 00000000..e9813486 --- /dev/null +++ b/com32/modules/stubs/copydown.asm @@ -0,0 +1,11 @@ + bits 16 + rep movsd + mov si,0 + mov di,0 + mov ds,si + mov es,di + mov ecx,0 + mov esi,0 + mov edi,0 + jmp 0:0 + align 16 diff --git a/com32/modules/stubs/swapstub.asm b/com32/modules/stubs/swapstub.asm new file mode 100644 index 00000000..b670ce4e --- /dev/null +++ b/com32/modules/stubs/swapstub.asm @@ -0,0 +1,33 @@ + bits 16 +swap: + push bx + movzx bx,dl + mov dl,[cs:bx+(table-$$)] + pop bx +.jmp: jmp 0:0 + nop + nop +install: + ;; DS = CS, ES = 0 + mov edi,[es:si+4*0x13] + mov [swap.jmp+1],edi + mov di,[es:0x413] + dec di + mov [es:0x413],di + shl edi,16+6 + mov [es:si+4*0x13],edi + shr edi,16 + mov es,di + xor di,di + rep movsd + mov si,0 + mov di,0 + mov ds,si + mov es,di + mov ecx,0 + mov esi,0 + mov edi,0 + jmp 0:0 + + align 16 +table: |