Start-up ad
Volume Number: | | 1
|
Issue Number: | | 3
|
Column Tag: | | ASSEMBLY
|
Start-up ad
By David E. Smith
Corvus called the other day and said they were sending 20 megabyte hard disks to various dealers and asked if I would like to put something about MacTutor on them. The problem was, they needed it the next day! So by 3 in the morning I had my double clickable start-up ad ready to express mail for the Corvus sampler. Thinking others might appreciate this little gem, Ive used it as the basis for my column this month. It combines our application shell program from the December issue with our icon converter program from last months issue, with some new material on menus and events.
WHAT THIS PROGRAM DOES
What we have here is a simple start-up program that can be set by the finder option as the program that gets executed when the disk first boots up. The program opens a window and draws an advertisment for MacTutor, as shown above in figure 1. When the close box is clicked, the finder is called. Such a program can be useful for the front end of your product development disk as a catchy way of introducing your product when the disk is booted up. You can modify the text to advertise your product, or make a clickable birthday card for your favorite Mac hacker. I gave a Mac Disk to a friend for Christmas and included this program with modified text to wish him a Merry Christmas everytime he started up his computer.
TOOLBOX FEATURES
Our program may seem simple in operation, but its already complex in toolbox features as listed below:
1. Drag window capability with window updating after drag.
2. Clickable close box exit.
3. Standard menu bar with apple, file and edit menus enabled.
4. Quit command in the file menu as an alternate return to the finder.
5. Text and box drawing using quickdraw.
Although the apple and edit pop-up menus are implemented, the support code for them is not here, so full support of the desk accesories will have to wait until next month. Everything required for a standard Macintosh program is here except text editing support, which is required for cut and paste. Only the quit option in the file menu actually does something. What we want to concentrate on here is the menu bar set-up.Then it is a minor problem to complete the stub routines to handle the individual apple and edit menu functions.
MENUS AS RESOURCES
As we noted last month, resources suffer from almost no documentation and this includes menus as resources. Another problem is that there are several ways to create and maintain menus. They can be created from the program itself, or read in from a resource file. The resource file option can be either created using the RMaker, resource editor if it ever shows up, or by using the assembler. When creating menus from program code, the combination _NewMenu, _AppendMenu, and _InsertMenu traps are used. The _AppendMenu trap reads in the menu information from the local data area at the end of your program code, and the format of the menu items is well documented in the IM docs in the Menu Manager section. In fact, you can easily build your own RMaker using the append menu trap.
APPEND MENU FORMAT
; This commmented code shows how you
; would do menus using in line code
; instead of resources. Place this code
; in your menu set-up routine.
PEA APPLEMENU ;menu set-up in code
_NewMenu;make new menu
MOVE.L (SP),D7 ;save menu handle
;keep on stack
PEA APPLEMENUITEMS ;apple menu items
_AppendMenu ;add to apple menu
MOVE.L D7,-(SP) ;menu handle
CLR.W -(SP) ;add to end
_InsertMenu ;insert menu items
; This commented code shows how you would
; set up resources in code for use with
; _AppendMenu instead of using a resource
; file with _GetRMenu. Place this section
; in your data block.
;
APPLEMENU:
DC.B 1
DC.B 20;apple symbol title
DC.B 0
APPLEMENUITEMS:
DC.B 21
DC.B ABOUT THIS PROGRAM...
DC.B 0
; The remaining menu items would be
; desk accesories, which are added to
; this menu with another trap call.
Menu items from Resources
The reason for going through the above formats for using the append trap is because we DID NOT use it in our program! Instead, we used resources to define the menu and menu items and the _GetRMenu trap to read in the menu resource and set-up the menu bar. The resources can be created either by the RMaker utility, which is well documented, at least for making menus, or by the assembler, which is not documented at all and is not the same format as the RMaker input syntax. After much trial and error I finally got the assembled resource file to work. It seems the assembler creates the binary format of each resource exactly as it is described in the IM docs. The trouble is, not all of the resources have their internal format documented. It is my guess that the RMaker program takes a high level description of the menu resources and translates that description into the same binary format. So in a sense, using the assembler meant we were our own RMaker!
Event Processing
The next major addition to this program is the event processing. Our event loop has been expanded from our simple application shell of the first issue. This time we use a jump table to process all the possible system events that could occour as a result of calling _SystemTask trap.This is done by using the event number returned from _GetNextEvent as an index into a table of offsets for handling each possible event. The big picture of how event processing works is shown in figure 2. In our program, the only event we do anything with is a mouse button down event. All the other entries in our event table return to the GetEvent loop.
Wheres the mouse?
When the mouse button is pressed, and we branch by way of the event table to the ButtonDown routine, we first have to find out where the mouse is. This requires a SECOND table of offsets to branch to different routines depending on where the mouse was when the button was pressed. Our second table is called the WindowTable and it is indexed by the region number returned from _FindWindow, which has located the mouse for us. In this table, we have placed three routines; one for if the mouse is in the menu bar, another if the mouse is in the go-away region of the window, and finally, a third if the mouse is in the drag region of the window.
The drag region routine is easy. We just call _DragWindow trap to move the window. But we also have to re-draw our ad or some of it will be erased when the window is moved. Fortunately all of our ad is drawn in a single subroutine called QDSTUFF, which can be called at any time, including after a drag window operation. And so as if by magic, the ad is restored.
The go-away region is also simple to handle. We just exit our program and return to the finder. The hard task is the menu bar region. Now we have to find out which menu we are in and go through another set of branches to handle each menu item.
Menu Bar Processing
We now come to our third and fourth levels of event processing. The third level is our routine Menubar, which we branch to when we find out the mouse is in the menu bar. Now we have to find out which menu the mouse is in. This is done by calling _MenuSelect trap. The returned menu Id and menu item id identify the menu and the associated menu item where the mouse was clicked. Since we have three menus, Apple, File and Edit, we have three more branches to a routine for each menu. At this point, only the File menu item is processed. We check if the quit option was selected and exit the program. If we were in the apple menu, we would need to make a fourth level branch to a routine for handling either the About option or the desk accesories. This code we have not added yet. Instead Inapplemenu and Ineditmenu just return to the first level of our event processing.
What about the Ad?
Weve spent so much time just checking out the mouse, we nearly forgot about our ad! The QDSTUFF subroutine draws our ad in our window in the quickest, most brute force way. We simply call _DrawString from quickdraw to draw strings in our window to describe our product. A few boxes liven it up. The nice thing about _DrawString is that it doesnt require character counting! Just specify the location and away it goes. A few different fonts also help.
Make a good Icon!
Any advertisement needs a good icon and ours is shown on the column masthead. We learned how to create this icon on the desktop in our last issue. To review, we create the icon using the icon editor supplied by Apple. Then we run the icon binary file through our Icon Converter program to create assembly source code. Our resource file has an Include statement that will then merge in this assembly source file for the icon into our resource file. When we assemble the resource file and link it with the program code, we get a nice icon on the desktop. Refer to last months issue for the Icon Converter program source code.
Next time we will complete our event processing with the About dialog box, desk accesory support and the remaining support code for our edit menu items. Have some good ideas on assembly programming? Send them to MacTutor and share them with others!
; EXAMPLE ASSEMBLY PROGRAM
; MENUBAR (MacTutor 1-3)
; VERSION 26 DEC 84
; (C) 1984 MacTec by David E. Smith
; Macro subset for Toolbox stuff
MACRO _InitGraf = DC.W $A86E|
MACRO _InitWind =DC.W $A912|
MACRO _NewWindow = DC.W $A913|
MACRO _setport = DC.W $A873|
MACRO _InitFont =DC.W $A8FE|
MACRO _InitMenu =DC.W $A930|
MACRO _InitDialog =DC.W $A97B|
MACRO _TEInit =DC.W $A9CC|
MACRO _Initpack = DC.W $A9E5|
MACRO _FlushEvents = DC.W $A032|
MACRO _InitCursor =DC.W $A850|
MACRO _GetNextEvent =DC.W $A970|
MACRO _FrameRect = DC.W $A8A1|
MACRO _TextFont = DC.W $A887|
MACRO _TextFace = DC.W $A888|
MACRO _TextSize = DC.W $A88A|
MACRO _MoveTo = DC.W $A893|
MACRO _DrawString = DC.W $A884|
MACRO _PenSize = DC.W $A89B|
MACRO _EraseRect = DC.W $A8A3|
MACRO _GetRMenu =DC.W $A9BF|
MACRO _InsertMenu =DC.W $A935|
MACRO _DrawMenuBar = DC.W $A937|
MACRO _Debugger = DC.W $A9FF|
MACRO _NewMenu = DC.W $A931|
MACRO _AppendMenu =DC.W $A933|
MACRO _AddResMenu =DC.W $A94D|
MACRO _FindWindow =DC.W $A92C|
MACRO _DragWindow =DC.W $A925|
MACRO _SystemTask =DC.W $A9B4|
MACRO _MenuSelect =DC.W $A93D|
MACRO _HiLiteMenu =DC.W $A938|
; DECLARE LABELS EXTERNAL
XDEF START ; required for linker
; LOCAL EQUATES
MouseDown equ 1
MaxEvents equ 12
AllEvents equ $0000FFFF
; MAIN PROGRAM SEGMENT
DC.W MINE;find start of program
; -- SAVE THE WORLD ------------
START: MOVEM.L D0-D7/A0-A6, -(SP)
LEA SAVEREGS,A0
MOVE.LA6,(A0) ; local var
MOVE.LA7,4(A0) ; stack ptr
; --INITIALIZE ALL MANAGERS--------
; SET UP QUICKDRAW GLOBALS
PEA -4(A5);push qd global ptr
_InitGraf ;init quickdraw global
;---- SET UP REMAINING MANAGERS --
_InitFont ; init font manager
_InitWind ; init window manager
_InitMenu ; init menu manager
CLR.L -(SP) ; kill the restart
_InitDialog ; init dialog manager
_TEInit ; init text edit (ROM)
MOVE.W #2,-(SP) ; set-up
_Initpack ; init package mgr
MOVE.L #AllEvents,D0 ;all events
_FlushEvents ;flushed
_InitCursor ; make cursor the arrow
; SET UP MENU BAR WITH POP-UP MENUS
CLR.L -(SP) ;returned menu handle
MOVE.W #1,-(SP) ;push menu ID 1 Apple
_GetRMenu ;get menu from resource
LEA APPLEMENU,A0 ; copy apple menu handle
MOVE.L (SP),(A0) ; to local data block
MOVE.L (SP), -(SP) ;menu handle desk acc.
;menu handle on stack
CLR.W -(SP) ;push 0 for append
_InsertMenu ;add menu item
MOVE.L #DRVR, -(SP);load all DRVR type
_AddResMenu ;add desk accessories
CLR.L -(SP) ;return menu handle
MOVE.W #2,-(SP) ;push menu ID 2 File
_GetRMenu ;get menu from resource
;leave handle on stack
CLR.W -(SP) ;append to menu
_InsertMenu ;the File stuff
CLR.L -(SP) ;return menu handle
MOVE.W #3,-(SP) ;push menu ID 3 Edit
_GetRMenu ;get menu from resource
;leave handle on stack
CLR.W -(SP) ;append to menu
_InsertMenu ;the File stuff
_DrawMenuBar;our menu bar!
;-- SET UP NEW HEAP WINDOW ----
CLR.L -(SP) ;return window ptr
CLR.L -(SP) ;window record ptr.
PEA WBOUNDS ;window rectangle
PEA WINDTITLE ; window title
MOVE.W #$100,-(SP) ; true = visible
MOVE.W #0,-(SP) ; doc type window
MOVE.L #-1,-(SP) ; window in front
MOVE.W #$100,-(SP) ; true=closebox
MOVE.L #0, -(SP) ; reference value
_NewWindow ; make new window
; -- ACTIVATE THIS NEW WINDOW ------
LEA WPOINTER,A0 ; copy window ptr
MOVE.L (SP),(A0) ; to stacksave
_setport ;current window
; -- SET UP WINDOW DISPLAY --------
BSRQDSTUFF;draw text with QD
; -------- EVENT LOOP ------------
GetEvent:
_SystemTask ;check out desk acc.
CLR-(SP);returned event
MOVE #AllEvents,-(SP) ;mask all events
PEAEventRecord ; event record block
_GetNextEvent ;go check the mouse
MOVE (SP)+,D0 ;get event result
CMP#0,D0;if 0 then no event
BEQGetEvent ;loop until it happens
; JUMP TABLE OF EVENT PROCESSING
CLR.L D0
MOVE What,D0 ;what to do! (event number)
CMP#MaxEvents,D0 ;event no. >11?
BGEGetEvent ;yes so ignore it
ADDD0,D0;multiply by 2
MOVE EventTable(D0),D0
JMPEventTable(D0);execute event
EventTable:
DC.W GetEvent-EventTable ;null event
DC.W ButtonDown-EventTable ;mouse down
DC.W GetEvent-EventTable ;mouse up
DC.W GetEvent-EventTable ;key down event
DC.W GetEvent-EventTable ;key up event
DC.W GetEvent-EventTable ;auto key
DC.W GetEvent-EventTable ;update event
DC.W GetEvent-EventTable ;Disk Event
DC.W GetEvent-EventTable ;activate event
DC.W GetEvent-EventTable ;Abort
DC.W GetEvent-EventTable ;Network
DC.W GetEvent-EventTable ;I/O Driver
;application events would follow
; note that linker error may result if
; the table entry is >128
; - EVENT PROCESSING ROUTINES --------
ButtonDown:
CLR-(SP);result of findwindow
MOVE.L Point, -(SP);push mouse coordinates
PEAWWindow;push holder for handle
_FindWindow ;where was mouse click?
CLR.L D0
MOVE (SP)+,D0 ;pop region number
ADDD0,D0;multiply by 2
MOVE WindowTable(D0),D0
JMPWindowTable(D0) ;do mouse down event
WindowTable:;table of mouse events
DC.W GetEvent-WindowTable;in desk (none of following)
DC.W Menubar-WindowTable ;in menu bar
DC.W GetEvent-WindowTable;in system window
DC.W GetEvent-WindowTable;in content region
DC.W Drag-WindowTable ;in drag region
DC.W GetEvent-WindowTable;in grow region
DC.W Exit-WindowTable ;in go-away region
Drag: ;mouse in drag window
MOVE.L WWindow,-(SP);push window pointer
MOVE.L Point, -(SP) ;push mouse coordinates
PEADRAGWINDOW ;window boundry to drag
_DragWindow ;move window
BSRQDSTUFF;update window text
JMPGetEvent ;return to event loop
Menubar:
CLR.L -(SP) ;returned menu choice
MOVE.L Point,-(SP);mouse position
_MenuSelect ;Find menu selected
MOVE (SP)+,D5 ;pop menu ID to D5
MOVE (SP)+,D6 ;pop menu item ID to D6
CLR-(SP);select all menus
_HiLiteMenu ;unhilite them all
CMP#1, D5 ;apple menu?
BEQInapplemenu
CMP#2, D5 ;file menu?
BEQInfilemenu
CMP#3,D5;edit menu?
BEQIneditmenu
BRAGetEvent ;no place else
Inapplemenu:
BRAGetEvent ;no place else
Infilemenu:
CMP#1,D6;quit?
BNEGetEvent ;no, try again
BRAExit ;yes, exit
Ineditmenu:
BRAGetEvent ;no place else
Exit:
JMPTofinder ;return to finder
; -- END OF MAIN --------------
; -- QDSTUFF SUBROUTINE ----------
QDSTUFF:
; This subroutine is a static
; window display of text for our
; ad. It would more properly be
; placed in a resource file as
; strings, but when in a hurry...
LEAtop,A0 ;set-up our globals
;window frame size.
MOVE.W #10, (A0) ;TOP
MOVE.W #30, 2(A0) ;LEFT
MOVE.W #250, 4(A0) ;BOTTOM
MOVE.W #400, 6(A0) ;RIGHT
PEA top ;window rectangle
_FrameRect;draw rectangle
MOVE.W #1, -(SP) ;FONT
_TextFont
MOVE.W #12, -(SP);style
_TextFace
MOVE.W #24, -(SP);SIZE
_TextSize
MOVE.W #40, -(SP) ; h
MOVE.W #50, -(SP);v
_MoveTo ;set pen location
PEA MacTutor
_DrawString
MOVE.W #0, -(SP) ;chicago
_TextFont
MOVE.W #0, -(SP) ;normal
_TextFace
MOVE.W #12, -(SP);12 point size
_TextSize
MOVE.W #40, -(SP);H
MOVE.W #80, -(SP);V
_MoveTo
PEA The Macintosh Programming Journal
_DrawString
MOVE.W #40, -(SP);H
MOVE.W #110, -(SP) ;V
_MoveTo
PEA AT LAST! A no-nonsense, no fluff Journal
_DrawString
MOVE.W #40, -(SP);H
MOVE.W #130, -(SP) ;V
_MoveTo
PEA devoted to programming ON the Mac, FOR the Mac!
_DrawString
MOVE.W #40, -(SP);H
MOVE.W #150, -(SP) ;V
_MoveTo
PEA Subscribe to MacTutor, and learn how to create
_DrawString
MOVE.W #40, -(SP);H
MOVE.W #170, -(SP) ;V
_MoveTo
PEA this assembly language program, including the icon!
_DrawString
MOVE.W #40, -(SP);H
MOVE.W #190, -(SP) ;V
_MoveTo
PEA So do not delay. Send for the ONLY Technical
_DrawString
MOVE.W #40, -(SP);H
MOVE.W #210, -(SP) ;V
_MoveTo
PEA publication that teaches the Mac technology!
_DrawString
MOVE.W #80, -(SP);H
MOVE.W #230, -(SP) ;V
_MoveTo
PEA Send $24 for 12 issues to:
_DrawString
LEAtop,A0
MOVE.W #215, (A0);TOP
MOVE.W #250, 2(A0);LEFT
MOVE.W #290, 4(A0) ;BOTTOM
MOVE.W #450, 6(A0) ;RIGHT
PEA top ;window rectangle
_EraseRect;clear rectange
PEA top
_FrameRect;draw rectangle
MOVE.W #2, -(SP) ;WIDTH
MOVE.W #2, -(SP) ;HEIGHT
_PenSize
LEAtop,A0
MOVE.W #218, (A0);TOP
MOVE.W #253, 2(A0);LEFT
MOVE.W #287, 4(A0) ;BOTTOM
MOVE.W #447, 6(A0) ;RIGHT
PEA top ;window rectangle
_FrameRect;draw rectangle
MOVE.W #280, -(SP) ;H
MOVE.W #230, -(SP) ;V
_MoveTo
PEA MacTutor
_DrawString
MOVE.W #280, -(SP) ;H
MOVE.W #245, -(SP) ;V
_MoveTo
PEA P.O. Box 400
_DrawString
MOVE.W #280, -(SP) ;H
MOVE.W #260, -(SP) ;V
_MoveTo
PEA Placentia, CA 92670
_DrawString
MOVE.W #280, -(SP) ;H
MOVE.W #275, -(SP) ;V
_MoveTo
PEA Or call (714) 630-3730
_DrawString
RTS
; -------- MOVBALL SUBROUTINE ----------
MOVBALL:
; place some animation in this routine
; while waiting for an event.
RTS
; -- RESTORE THE WORLD --------
Tofinder: LEA SAVEREGS,A0 ; get back
MOVE.L (A0),A6 ; local var
MOVE.L 4(A0),A7;restore stack
MOVEM.L (SP)+,D0-D7/A0-A6
; ---- RETURN TO FINDER --------
RTS ; return to finder
; ----LOCAL DATA AREA ----------
APPLEMENU:DC.L 0
SAVEREGS: DCB.L 2,0 ;set save area
WPOINTER: DC.L 0 ;store window pt
WBOUNDS:DC.W 40 ;rectangle TOP
DC.W 2;LEFT
DC.W 335;BOTTOM
DC.W 508;RIGHT
WINDTITLE: DC.B 42 ; title length
DC.B MacTutor: The Macintosh Programming Journal,0
DRAGWINDOW: DC.W 30;RECTANGLE
DC.W 1
DC.W 350
DC.W 510
EventRecord:
What: DC.W 0;what event number
Message: DC.L 0;ptr. to msg
When: DC.L 0;Time event posted
Point: DC.L 0;mouse coordinates
Modify: DC.W 0;state of keys
WWindow: DC.L 0 ;Find windows result
; -- APPLICATION GLOBALS ----------
top: DS.W1
left: DS.W1
bottom: DS.W1
right: DS.W1
; ---- END OF PROGRAM -------------
; MENUBAR_RSRC.ASM
; resource file for the MENUBAR
; created using the assembler
; signature is creator tag
;
RESOURCE DAVE 0 IDENTIFICATION
DC.B 18, AD FOR MACTECH 1-3
.ALIGN 2
RESOURCE BNDL 128 BUNDLE
DC.L DAVE;NAME OF SIGNATURE
DC.W 0,1 ;DATA (DOESNT CHANGE)
DC.L ICN#;ICON MAPPINGS
DC.W 0 ;NUMBER OF MAPPINGS-1
DC.W 0,128 ;MAP 0 TO ICON 128
DC.L FREF;FREF MAPPINGS
DC.W 0 ;NUMBER OF MAPPINGS-1
DC.W 0,128 ;MAP 0 TO FREF 128
RESOURCE FREF 128 FREF 1
DC.B APPL, 0, 0, 0
.ALIGN 2
RESOURCE ICN# 128 MY ICON
; FIRST APPLICATION ICON BIT MAP
INCLUDE LOGO.ICON.ASM
; MENU BAR RESOURCES
.ALIGN 2
RESOURCE MENU 1 apple menu
DC.W 1 ;MENU ID
DC.W 0 ;WIDTH HOLDER
DC.W 0 ;HEIGHT HOLDER
DC.L 0 ;RESOURCE ID HOLDER FOR STD. MENU
DC.L $1FF ;ENABLE ALL ITEMS
DC.B 1 ;TITLE LENGTH
DC.B 20; APPLE SYMBOL
DC.B 21;MENU ITEM LENGTH
DC.B ABOUT THIS PROGRAM...
DC.B 0 ; NO ICON
DC.B 0 ; NO KEYBOARD EQUIVALENT
DC.B 0 ; MARKING CHARACTER
DC.B 0 ; STYLE OF ITEMS TEXT
DC.B 0 ; END OF MENU ITEM
.ALIGN 2
RESOURCE MENU 2 file menu
DC.W 2 ;MENU ID
DC.W 0 ;WIDTH HOLDER
DC.W 0 ;HEIGHT HOLDER
DC.L 0 ;RESOURCE ID HOLDER
DC.L 3 ;ENABLE ALL ITEMS
DC.B 4 ; TITLE LENGTH
DC.B File; file menu
DC.B 6 ;MENU ITEM LENGTH
DC.B Quit/Q
DC.B 0 ; NO ICON
DC.B 0 NO KEYBOARD EQUIVALENT
DC.B 0 ; NO MARKING CHARACTER
DC.B 0 ; STYLE OF ITEMS TEXT
DC.B 0 ; END OF MENU ITEM
.ALIGN 2
RESOURCE MENU 3 edit menu
DC.W 3 ;MENU ID
DC.W 0 ;WIDTH HOLDER
DC.W 0 ;HEIGHT HOLDER
DC.L 0 ;RESOURCE ID HOLDER
DC.L $7B ;ENABLE ALL ITEMS except 2
DC.B 4 ; TITLE LENGTH
DC.B Edit; edit menu
DC.B 6 ;MENU ITEM LENGTH
DC.B Undo/Z
DC.B 0 ; NO ICON
DC.B 0 ; NO KEYBOARD EQUIVALENT
DC.B 0 ; NO MARKING CHARACTER
DC.B 0 ; STYLE OF ITEMS TEXT
DC.B 9 ;MENU ITEM LENGTH
DC.B --------
DC.B 0 ; NO ICON
DC.B 0 ; NO KEYBOARD EQUIVALENT
DC.B 0 ; NO MARKING CHARACTER
DC.B 0 ; STYLE OF ITEMS TEXT
DC.B 5 ;MENU ITEM LENGTH
DC.B Cut/X
DC.B 0 ; NO ICON
DC.B 0 ; NO KEYBOARD EQUIVALENT
DC.B 0 ; NO MARKING CHARACTER
DC.B 0 ; STYLE OF ITEMS TEXT
DC.B 6 ;MENU ITEM LENGTH
DC.B Copy/C
DC.B 0 ; NO ICON
DC.B 0 ; NO KEYBOARD EQUIVALENT
DC.B 0 ; NO MARKING CHARACTER
DC.B 0 ; STYLE OF ITEMS TEXT
DC.B 7 ;MENU ITEM LENGTH
DC.B Paste/V
DC.B 0 ; NO ICON
DC.B 0 ; NO KEYBOARD EQUIVALENT
DC.B 0 ; NO MARKING CHARACTER
DC.B 0 ; STYLE OF ITEMS TEXT
DC.B 5 ;MENU ITEM LENGTH
DC.B Clear
DC.B 0 ; NO ICON
DC.B 0 ; NO KEYBOARD EQUIVALENT
DC.B 0 ; NO MARKING CHARACTER
DC.B 0 ; STYLE OF ITEMS TEXT
DC.B 0 ; END OF MENU ITEMS