OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / user / arj / sfxstub.asm
1 ;*
2 ;* $Id: sfxstub.asm,v 1.1.1.2 2002/03/28 00:03:24 andrew_belov Exp $
3 ;* ---------------------------------------------------------------------------
4 ;* This is a compact SFX startup stub file.
5 ;*
6
7 INCLUDE         ASM_INCL.INC
8
9 ; OS/2 definitions
10
11 IFDEF _OS2
12
13  IFDEF FLATMODE
14   EXTERN        DOSWRITE:proc
15   EXTERN        DOSEXIT:proc
16   INCLUDELIB OS2386.LIB
17  ELSE
18   extrn         DOSWRITE:far
19   extrn         DOSEXIT:far
20  ENDIF
21
22 WRITE_STR MACRO LENPARM, STRPARM
23  IFDEF          FLATMODE
24                 push    offset junk
25                 push    LENPARM
26                 push    offset STRPARM
27                 push    1
28                 call    DosWrite
29                 add     esp, 16
30  ELSE
31                 push    1
32                 push    ds
33                 push    offset STRPARM
34                 push    LENPARM
35                 push    ds
36                 push    offset junk
37                 call    DosWrite
38  ENDIF
39 ENDM
40
41 ENDIF
42
43 ; DGROUP
44
45                 DOSSEG
46 DGROUP          GROUP _DATA, STACK
47
48 ; Stack segment
49
50 STACK           SEGMENT AL_PARA STACK 'STACK'
51  IFDEF          FLATMODE
52                 DB 16384 DUP (?)
53  ELSE
54                 DB 2560 DUP (?)
55  ENDIF
56 STACK           ENDS
57
58 ; Data segment
59
60 _DATA           SEGMENT AL_WORD PUBLIC 'DATA'
61
62 INCLUDE         STUBINCL.INC
63
64 IFDEF           _OS2
65                 junk    V_DW 0
66 ENDIF
67
68 _DATA           ENDS
69
70 ; Code segment
71
72 _TEXT           SEGMENT AL_WORD PUBLIC 'CODE'
73                 ASSUME cs:_TEXT, ds:DGROUP, ss:DGROUP
74
75 start:
76 IFDEF           _OS2
77                 WRITE_STR L_M_SFXSTUB_BANNER, M_SFXSTUB_BANNER
78                 WRITE_STR L_M_SFXSTUB_BLURB_1, M_SFXSTUB_BLURB_1
79                 WRITE_STR L_M_SFXSTUB_BLURB_2, M_SFXSTUB_BLURB_2
80                 push    1
81                 push    1
82                 call    DosExit
83 ELSE
84                 mov     ax, seg M_SFXSTUB_BANNER
85                 mov     ds, ax
86                 mov     ah, 9
87                 mov     dx, offset M_SFXSTUB_BANNER
88                 int     21h
89                 mov     ax, seg M_SFXSTUB_BLURB_1
90                 mov     ds, ax
91                 mov     ah, 9
92                 mov     dx, offset M_SFXSTUB_BLURB_1
93                 int     21h
94                 mov     ax, seg M_SFXSTUB_BLURB_2
95                 mov     ds, ax
96                 mov     ah, 9
97                 mov     dx, offset M_SFXSTUB_BLURB_2
98                 int     21h
99                 mov     ah, 4Ch
100                 int     21h
101 ENDIF
102 db              "zyxwbaaRJsfX"
103
104 _TEXT           ENDS
105
106                 end start