Changeset 6534 for branches/mini/src


Ignore:
Timestamp:
Aug 15, 2001, 5:12:41 AM (24 years ago)
Author:
bird
Message:

Mmm! 276 bytes.

Location:
branches/mini/src/win32k/test
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/mini/src/win32k/test/minihll.c

    r6533 r6534  
     1/* $Id: minihll.c,v 1.1.2.3 2001-08-15 03:12:24 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
     11/*
     12 * Tell the IBM C compiler where to put strings.
     13 */
    114#ifdef __IBMC__
    215#pragma strings(writeable)
    316#endif
    4 
    5 /*
    6  * Config
    7  */
    8 //#define LIBC
    9 
    1017
    1118
     
    1825                                    char *  pszMsg);
    1926#else
    20 extern int    _Optlink printf( char * pszMsg, ...);
     27extern int _printf_ansi(register char * pszMsg);
    2128#endif
    2229
     
    2431*   Global Variables                                                           *
    2532*******************************************************************************/
    26 #ifdef __WATCOMC__
    27 #pragma data_seg("STACK32", "CODE")
    28 #endif
    29 char szMsg[19] = {"I'm really small!\n"};
    30 
    31 #ifdef __WATCOMC__
    32 #pragma data_seg("MYSTACK", "STACK")
    33 int dummy;
    34 #endif
     33/*
     34 * This is now (due to object ordering) placed in minihll2.c.
     35 */
     36extern char szMsg[19];
    3537
    3638
     39/*
     40 * The IBM compiler wanna know where to start.
     41 */
    3742#ifdef __IBMC__
    3843#pragma entry(minihll)
     
    4348 * Main entry potin etc.
    4449 */
    45 void _Optlink minihll(void)
     50#ifndef LIBC
     51void  _Optlink minihll(void)
     52#else
     53void  minihll(register char *psz)
     54#endif
    4655{
    4756    #ifndef LIBC
    4857    DosPutMessage(0, 18, szMsg);
    4958    #else
    50     printf(szMsg);
     59    _printf_ansi(szMsg);
    5160    #endif
    5261}
    5362
    54 
  • branches/mini/src/win32k/test/minihll.mak

    r6533 r6534  
    1 # $Id: minihll.mak,v 1.1.2.2 2001-08-15 01:50:14 bird Exp $
     1# $Id: minihll.mak,v 1.1.2.3 2001-08-15 03:12:25 bird Exp $
    22
    33#
     
    2727LD2FLAGS = $(LD2FLAGS) /BASE:0x10000 /Stack:0x1000
    2828!endif
     29
    2930!ifdef WAT
    30 CFLAGS += /Os -s /NTSTACK32
     31CFLAGS  = -bt=os2v2 -e60 -5r -omlinears -s -w4 -ze -zl -zq -nt=CODEANDDATA
     32!if "$(%LIBC)" != ""
     33LIBC=1
     34!endif
     35!ifdef LIBC
     36CFLAGS += -dLIBC=1
     37!endif
    3138!endif
    3239
     
    3643#
    3744OBJS = \
    38 $(OBJDIR)\minihll.obj
     45!ifndef LIBC
     46$(OBJDIR)\minihll2.obj \
     47$(OBJDIR)\minihll.obj \
     48!else
     49$(OBJDIR)\minihll2.obj \
     50$(OBJDIR)\minihll.obj \
     51!endif
    3952
    4053
     
    6174!else
    6275    wlink system os2v2 file {$(OBJS)} name $(OBJDIR)\.exe \
    63     import printf LIBCN.1082 \
    64     import DosPutMessage MSG.5   \
    65 #        segment{'STACK32' READWRITE} \
    66 #        segment{'MYSTACK' CLASS 'STACK' READWRITE} \
    67         option offset=0x10000 option alignment=1 option stack=4060 option start=minihll \
    68         option map=$(OBJDIR)\$(TARGET).map
     76        option offset=0x10000 option alignment=1 option stack=4060 \
     77        option map=$(OBJDIR)\$(TARGET).map \
     78!ifndef LIBC
     79        import DosPutMessage MSG.5 \
     80        option start=minihll
     81!else
     82        import _printf_ansi_ LIBCN.83 \
     83        option start=minihll_
     84!endif
    6985    mv $(OBJDIR)\.exe $@
    7086!endif
    71     $(LXLITE) /AN:1 /ZS:1024 /ZX:1024 /MF3 /YXD /YND $@
     87    $(LXLITE) /AN:1 /ZS:1024 /ZX:1024 /MF3 /YXD /YND /ML1  $@
    7288
    7389#    -8 ilink /NOFREE /FORCE /ALIGNMENT:1 /Map /BASE:0x10000 /PACKCODE /PACKDATA /EXEPACK:1 \
Note: See TracChangeset for help on using the changeset viewer.