Файл описания dmenu.def

NAME         TEST

DESCRIPTION  'Demo menu'

EXETYPE      WINDOWS

EXPORTS      WndProc                    @1

Файл ресурсов dmenu.rc

#include "resource.h

"MyMenu MENU DISCARDABLE

BEGIN    POPUP "Files"

    BEGIN

        MENUITEM "Open",                        ID_OPEN

        MENUITEM "Save",                        ID_SAVE

        MENUITEM SEPARATOR

        MENUITEM "Exit",                        ID_EXIT

    END

    MENUITEM "Other",                           65535

END

Файл заголовков resource.h

#define MyMenu                          101

#define ID_OPEN                         40001

#define ID_SAVE                         40002

#define ID_EXIT                         40003

Файл компиляции makefile

#   Make file for Turbo Assembler Demo menu

#       make –B

#       make -B -DDEBUG -DVERN    for debug information and version

NAME   = dmenu

OBJS   = $(NAME).obj

DEF    = $(NAME).def

RES    = $(NAME).res

!if $d(DEBUG)

TASMDEBUG=/zi

LINKDEBUG=/v

!else

TASMDEBUG=/l

LINKDEBUG=

!endif

!if $d(VER2)

TASMVER=/dVER2

!elseif $d(VER3)

TASMVER=/dVER3

!else

TASMVER=/dVER1

!endif

!if $d(MAKEDIR)

IMPORT=$(MAKEDIR)\..\lib\import32

!else

IMPORT=import32

!endif

$(NAME).EXE: $(OBJS) $(DEF) $(RES)

       tlink32 /Tpe /aa /c $(LINKDEBUG) $(OBJS),$(NAME),, $(IMPORT), $(DEF), $(RES)

.asm.obj:

       tasm32 $(TASMDEBUG) $(TASMVER) /m /mx /z /zd $&.asm

$(RES): $(NAME).RC

       BRCC32 -32 $(NAME).RC