source: trunk/kStuff/kLdr/kLdrA-os2.asm

Last change on this file was 3601, checked in by bird, 18 years ago

license update.

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