source: branches/mini/src/win32k/test/minihll.c

Last change on this file was 6568, checked in by bird, 24 years ago

Documented it.

File size: 2.1 KB
Line 
1/* $Id: minihll.c,v 1.1.2.5 2001-08-20 18:47:54 bird Exp $
2 *
3 * Minimal 'High Level Language' executable.
4 *
5 * Copyright (c) 2001 knut st. osmundsen (kosmunds@csc.com)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 *
10 * Build this in a WATCOM Odin32 environment using wmake.
11 * wcc386, and wlink is required.
12 * SET DEBUG=
13 * mkdir bin
14 * mkdir bin\release.wac36
15 *
16 * For 276 bytes result which uses LIBCN:
17 * wmake -f minihll.mak -u -a LIBC=1
18
19 * For 286 bytes result which uses MSG.DosPutMessage:
20 * wmake -f minihll.mak -u -a
21 *
22 * Any attempt to compile in a VACxx environment will produce a exefile with a
23 * bad stack. Causing SYS0189.
24 */
25
26/*
27 * Tell the IBM C compiler where to put strings.
28 */
29#ifdef __IBMC__
30#pragma strings(writeable)
31#endif
32
33
34/*******************************************************************************
35* External Functions *
36*******************************************************************************/
37#ifndef LIBC
38unsigned long _System DosPutMessage(unsigned long hFile,
39 unsigned long cchMsg,
40 char * pszMsg);
41#else
42#ifdef __IBMC__
43extern int _Optlink _printf_ansi(register char * pszMsg);
44#else
45//Watcom
46extern int _printf_ansi(register char * pszMsg);
47#endif
48#endif
49
50/*******************************************************************************
51* Global Variables *
52*******************************************************************************/
53/*
54 * This is now (due to object ordering) placed in minihll2.c.
55 */
56extern char szMsg[19];
57
58
59/*
60 * The IBM compiler wanna know where to start.
61 */
62#ifdef __IBMC__
63#pragma entry(minihll)
64#endif
65
66
67/*
68 * Main entry potin etc.
69 */
70#ifndef LIBC
71void _Optlink minihll(void)
72#else
73void minihll(register char *psz)
74#endif
75{
76 #ifndef LIBC
77 DosPutMessage(0, 18, szMsg);
78 #else
79 #ifdef __IBMC__
80 _printf_ansi(psz = szMsg);
81 #else
82 _printf_ansi(szMsg);
83 #endif
84 #endif
85}
86
Note: See TracBrowser for help on using the repository browser.