source: trunk/kLdr/kLdrA-os2.asm@ 3003

Last change on this file since 3003 was 2886, checked in by bird, 19 years ago

Bugfixing.

  • Property svn:keywords set to Id
File size: 1.6 KB
RevLine 
[2834]1; $Id: kLdrA-os2.asm 2886 2006-11-18 15:01:05Z bird $
[2821]2;; @file
3;
4; kLdr - The Dynamic Loader, asm helpers.
5;
6; Copyright (c) 2006 knut st. osmundsen <bird@anduin.net>
7;
8;
9; This file is part of kLdr.
10;
11; kLdr is free software; you can redistribute it and/or modify
12; it under the terms of the GNU General Public License as published by
13; the Free Software Foundation; either version 2 of the License, or
14; (at your option) any later version.
15;
16; kLdr is distributed in the hope that it will be useful,
17; but WITHOUT ANY WARRANTY; without even the implied warranty of
18; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19; GNU General Public License for more details.
20;
21; You should have received a copy of the GNU General Public License
22; along with kLdr; if not, write to the Free Software
23; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24;
25;
26
27
28segment TEXT32 public align=16 CLASS=CODE use32
29
30;
31; _DLL_InitTerm
32;
33..start:
[2886]34extern _DLL_InitTerm
35 jmp _DLL_InitTerm
[2821]36
37
38;
39; kLdrLoadExe wrapper which loads the bootstrap stack.
40;
[2884]41global _kLdrDyldLoadExe
42_kLdrDyldLoadExe:
[2821]43 push ebp
44 mov ebp, esp
45
46 ; switch stack.
[2884]47; extern _abStack
48; lea esp, [_abStack + 8192 - 4]
[2821]49 push dword [ebp + 8 + 20]
50 push dword [ebp + 8 + 16]
51 push dword [ebp + 8 + 12]
52 push dword [ebp + 8 + 8]
53
54 ; call worker on the new stack.
[2884]55 extern _kldrDyldLoadExe
56 call _kldrDyldLoadExe
[2821]57
58 ; we shouldn't return!
59we_re_not_supposed_to_get_here:
60 int3
61 int3
62 jmp short we_re_not_supposed_to_get_here
63
Note: See TracBrowser for help on using the repository browser.