home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
libcvers.zip
/
article_appendix
/
wat16ff2.asm
< prev
next >
Wrap
Assembly Source File
|
2001-11-09
|
2KB
|
75 lines
; $Id: wat16ff2.asm,v 1.1 2001/11/08 21:30:08 root Exp $
.386
extrn DosFlatToSel:near
extrn DosSelToFlat:near
public __Far16Func2
cseg01 segment byte use32 public 'CODE'
assume cs:cseg01
assume es:nothing, ss:nothing, ds:nothing, fs:nothing, gs:nothing
__Far16Func2 proc near
var_14 = dword ptr -14h
push ebp
push edi
push ebx
push edx
push es
push ds
mov ebp, esp
push ss
push ebp
push eax
add ecx, 3
and cl, 0FCh
xor ebp, ebp
mov bp, cx
sub esp, ecx
mov edi, esp
shr ecx, 1
repe movsw
mov eax, esp
call DosFlatToSel
push eax
add bp, ax
lss sp, [esp+14h+var_14]
jmp far ptr loc_20000
__Far16Func2 endp
loc_10035:
lss esp, [ebp+4]
rol eax, 10h
mov ax, dx
rol eax, 10h
pop ds
pop es
pop edx
pop ebx
pop edi
pop ebp
retn
cseg01 ends
cseg03 segment byte use16 public 'CODE'
assume cs:cseg03
assume ds:nothing, es:nothing, ss:nothing, ds:nothing, fs:nothing, gs:nothing
loc_20000:
mov cx, ss
mov ds, cx
mov es, cx
call dword ptr [bp+0]
jmp far ptr FLAT:loc_10035
cseg03 ends
end