merge the formfield patch from ooo-build
[ooovba.git] / basic / source / runtime / os2.asm
blob1dd5a296d6b741ec3a8ba928f53fb42a9da8182b
1 ;*************************************************************************
3 ; DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 ;
5 ; Copyright 2008 by Sun Microsystems, Inc.
7 ; OpenOffice.org - a multi-platform office productivity suite
9 ; $RCSfile: os2.asm,v $
11 ; $Revision: 1.4 $
13 ; This file is part of OpenOffice.org.
15 ; OpenOffice.org is free software: you can redistribute it and/or modify
16 ; it under the terms of the GNU Lesser General Public License version 3
17 ; only, as published by the Free Software Foundation.
19 ; OpenOffice.org is distributed in the hope that it will be useful,
20 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ; GNU Lesser General Public License version 3 for more details
23 ; (a copy is included in the LICENSE file that accompanied this code).
25 ; You should have received a copy of the GNU Lesser General Public License
26 ; version 3 along with OpenOffice.org. If not, see
27 ; <http://www.openoffice.org/license.html>
28 ; for a copy of the LGPLv3 License.
30 ;*************************************************************************
32 ; Anmerkungen
33 ; Direktaufruf von C- und PASCAL-Routinen, OS/2
35 ; Inhalt:
36 ; type = CallXXX (far *proc, char *stack, short nstack)
38 ; Kopie des Basic-Stacks (nstack Bytes) auf den C-Stack
39 ; und Aufruf der Prozedur.
41 .386
42 .MODEL FLAT
44 .CODE
46 PUBLIC CallINT
47 PUBLIC CallLNG
48 PUBLIC CallSNG
49 PUBLIC CallDBL
50 PUBLIC CallSTR
51 PUBLIC CallFIX
53 PUBLIC _CallINT
54 PUBLIC _CallLNG
55 PUBLIC _CallSNG
56 PUBLIC _CallDBL
57 PUBLIC _CallSTR
58 PUBLIC _CallFIX
60 _CallINT LABEL byte
61 _CallLNG LABEL byte
62 _CallSNG LABEL byte
63 _CallDBL LABEL byte
64 _CallSTR LABEL byte
65 _CallFIX LABEL byte
67 CallINT LABEL byte
68 CallLNG LABEL byte
69 CallSNG LABEL byte
70 CallDBL LABEL byte
71 CallSTR LABEL byte
72 CallFIX PROC
74 p EQU [EBP+8]
75 stk EQU [EBP+12]
76 n EQU [EBP+16]
78 PUSH EBP
79 MOV EBP,ESP
80 PUSH ESI
81 PUSH EDI
82 MOV DX,DS
83 MOVZX ECX,word ptr [n]
84 SUB ESP,ECX
85 MOV EDI,ESP
86 MOV AX,SS
87 MOV ES,AX
88 MOV ESI,[stk]
89 SHR ECX,1
90 CLD
91 JCXZ $1
92 REP MOVSW ; Stack uebernehmen
93 $1: MOV DS,DX
94 CALL LARGE [p] ; 32-bit
95 MOV ECX,EBP
96 SUB ECX,8 ; wegen gepushter Register
97 MOV ESP,ECX
98 POP EDI
99 POP ESI
100 POP EBP
101 ; Bei Borland C++ Calling Convention:
102 ; RET 12
103 ; CSet System-Calling Convention
105 CallFIX ENDP