ECHO OFF
XTRA
rubout off
goto page1
rem ======================== POINT ===========================
:POINT
CLEAR +YELLOW,BLUE
BIG 1,,1,POINT COMMAND
COLOR WHITE
PUT 5,,POINT is a very powerful XTRA command which can turn any part
PUT ,,of your screen into a bright-bar menu.
COLOUR YELLOW
PUT  8,2,The parameters define a block within which the bright-bar may move.
PUT   ,2,The block has the current paper colour, the bar has shadow colour.

PUT 11,2,You can move the bar with the arrow keys, Home and End, and select
put ,2, with RETURN.
put 14,2,More powerfully, if an alphnumeric key is pressed, POINT will
put   ,2,test the first non-space character in each line for a match.
put 17,2,If a unique match is found, POINT returns with the errorlevel.
put 19,2,If more than one match is found, POINT jumps to the next one
put   ,2,down and awaits confirmation.
COLOUR RED
PUT 22,12,Try driving the menu here - NEXT is for next screen.
:rebox
colour white
box 10,72,6,10
put 11,74,Ann
put ,73,Claire
put ,73,Daisy
put ,73,Donald
put ,73,Edwin
put ,73,Mandy
put ,74,Mick
put ,75,"36
put ,74,men
colour +red
put ,74,Next
point 11,73,6,10
if errorlevel 10 goto lineout
goto rebox

rem ======================== LINEOUT ===========================
:LINEOUT
CLEAR +YELLOW,BLUE
BIG 1,,1,LINEOUT COMMAND
COLOR WHITE
PUT  5,,LINEOUT is very similar to POINT, but makes a horizontal bright-bar
PUT   ,,menu anywhere on your screen.
color yellow
PUT 12,,As with all other XTRA commands, if the column parameter is
put ,,blank, the menu-line will be centered.
PUT 15,,Controls and key-searching are as with POINT.
PUT 17,,LINEOUT & POINT actually read characters from the screen. They
put ,,would be happy picking from a display left by another program.
:linebox
color blue,white,red
box  8,,70,1
put  9,5,"  Ann  Claire  Daisy Donald  Edwin  Nina   Nicky   36     now   Quit
lineout  9,5,7,10
if errorlevel 10 goto MENU
goto LINEbox
rem ======================== PAGE ONE ===========================
:page1
CLEAR black,black
COLOR ,white,BLACK
BOX  0,,77,23
COLOR +RED,WHITE
BIG  1,,7,Introducing
COLOR +YELLOW,BLUE
BOX 7,,37,7,6
BIG  9,,3,XTRA
COLOR ,WHITE
PUT 18,,More than a dozen XTRA DOS commands from Clockwork Software.
COLOR BLUE
PUT 20,,(This entire demonstration package is a simple batch file
PUT ,,using some of the the XTRA commands. No screen files, no ANSI.
PUT ,,DEMO.BAT is very large, DOS will read it faster from C: drive.)
COLOR RED
PUT 24,51," Press any key to continue
GET
rem ======================== PAGE TWO ===========================
CLEAR  +WHITE,BLUE
PUT 1,,The Clockwork XTRA program offers :-
COLOR +RED
BIG 3,,1,"14 XTRA
BIG 13,,2,COMMANDS
COLOUR 14
BIG 7,,8,D O S
COLOR +WHITE
PUT 19,,BEEP, BIG, BOX, CHOOSE, CHORD, CLEAR, COLOR,
PUT ,,GET, LINEOUT, POINT, PUT, TEST, REMOVE, RUBOUT
COLOR RED
PUT 24,3,Press any key to continue
GET
rem ======================== MAIN MENU ===========================
:MENU
COLOR RED,WHITE,CYAN
BOX 0,,78,23,1
color magenta
PUT 21,,This menu uses the POINT command, use arrows, Home, End,
PUT ,,RETURN to confirm, or press key for first letter of line.
color red
PUT 1,,for
BIG 2,,2,information about
PUT  8,,the
PUT 10,,XTRA program itself
PUT ,,BOX command
PUT ,,SOUND commands
PUT ,,COLOUR, & CLEAR commands
PUT ,,GET, TEST and CHOOSE commands
PUT ,,POINT and LINEOUT commands
PUT ,,PUT and BIG commands
PUT ,,REMOVE and RUBOUT commands
PUT ,,Quit
POINT 10,25,30,9
IF ERRORLEVEL 9 GOTO quit
IF ERRORLEVEL 8 GOTO rubout
IF ERRORLEVEL 7 GOTO PRINTING
IF ERRORLEVEL 6 GOTO point
IF ERRORLEVEL 5 GOTO FLOW
IF ERRORLEVEL 4 GOTO COLOUR
IF ERRORLEVEL 3 GOTO SOUNDS
IF ERRORLEVEL 2 GOTO BOX
IF ERRORLEVEL 1 GOTO PROG
rem ======================== ABOUT XTRA ===========================
:PROG
CLEAR +YELLOW,BLUE
BIG 1,,1,XTRA
COLOR WHITE
PUT 5,5,Is a small (8k) resident program which watches commands from the
PUT  ,5,keyboard or from BATCH files, and intercepts those it recognises.
PUT 8,5,The intercepted commands are :-
COLOR +WHITE
PUT 10,,BEEP, BIG, BOX, CLEAR, CHOOSE, COLOR, COLOUR, XTRA,
PUT   ,,GET, CHORD, LINEOUT, POINT, PUT, REMOVE, RUBOUT, TEST.
color white
PUT 13,5,Together with the existing DOS commands these offer a wonderful
PUT   ,5,range of easy-to-use commands for making bright menus, harmony
PUT   ,5, and unbeatable displays.
PUT 17,5,Because the screen is created directly, without ANSI, or previously
PUT   ,5,stored screen files, displays are simply made and maintained
PUT   ,5,even by complete novices.
color yellow
PUT 21,,This entire demonstration is generated live from a simple,
PUT   ,,(but large) batch file. No ANSI, no files.
COLOR RED
PUT 24,53,Press any key to continue
GET
rem ======================== PARAMETERS ===========================
BOX 5,,77,18,0
COLOR +YELLOW
BIG 1,,1,PARAMETERS
color white
PUT 4,,Most XTRA commands are followed by parameters, e.g.:-
colour +yellow
PUT 6,25,COLOUR
PUT 8,25,BOX
PUT 10,25,PUT
COLOR +WHITE
PUT 6,33,"red, white, blue
PUT 8,29,"3,5,32,10,5
PUT 10,29,"10,,This is some text.
COLOUR white
PUT 12,,(See the handbook for meaning of each parameter.)
PUT 14,,Parameters are separated by commas.
PUT 16,,All parameters are optional. Some default to the previously
PUT   ,,set value, others to a special or progressive value.
COLOR YELLOW
PUT 19 ,,Parameters can be decimal numbers, colour names or text.
COLOUR +CYAN
PUT 21 ,,If a text parameter starts with a digit, color name, or space
PUT ,,then tell XTRA it is text by preceding it with a double quote (").
COLOR RED
PUT 24,53,Press any key to continue
GET
rem ======================== NOTES ===========================
color black,white
BOX 1,,74,21,1
BIG 3,,5,NOTES
PUT 10,5,This demonstration batch file DEMO.BAT has 480 lines and generates
PUT   ,5,"24 full screens of display.  But with batch file of this size,
put ,5, DOS takes a fair time hunting for labels, even when reading DEMO.BAT
put ,5, from C: drive.
colour blue
PUT 15,5,It's not a fair test of either DOS or XTRA because most batch files
put ,5,or menu files are much smaller, containing 1 or 2 screens maximum.
colour black
put 18,5,Have a look at DEMO.BAT to see how it works.
put 20,5,But we have included some model batch files on the disc, more
put ,5,suitable for adaptation for your own use.
GET
goto MENU
rem ======================== COLOUR ===========================
:COLOuR
CLEAR +YELLOW,BLUE
BIG 1,,1,COLOUR COMMANDS
COLOUR +white
PUT 7,,INK colour
PUT ,,PAPER colour
PUT ,,SHADOW colour
COLOR WHITE
PUT 5,,XTRA remembers your 3 selected colours:-
PUT 12,,You can change these colours at any time with the COLOUR command.
PUT 14 ,,CLEAR not only changes the colour, but also clears the screen.
PUT 20,,(COLOR is an acceptable spelling of COLOUR).
COLOR MAGENTA
PUT 17,,Colours may be selected by number or name
PUT ,,See next page for colour names.
COLOR RED
PUT 24,53,Press any key to continue
GET
rem ======================== COLOUR 2 ===========================
:COLOUR2
BOX 5,,78,19,0
color +white
PUT 5,,COLOUR NAMES
PUT ,,"DULL             BRIGHT
COLOR BLACK,WHITE
BOX 7,,36,8,1
PUT 8,26,"0   black        8   +black
PUT ,26,"1   blue         9   +blue
PUT ,26,"2   green       10   +green
PUT ,26,"3   cyan        11   +cyan
PUT ,26,"4   red         12   +red
PUT ,26,"5   magenta     13   +magenta
PUT ,26,"6   yellow      14   +yellow
PUT ,26,"7   white       15   +white
COLOR +YELLOW,blue
PUT 18,,Colours may be specified by name or by number.
PUT 21,,N.B. If these colours seem wrongly named,
PUT ,,try adjusting your contrast/brightness.
PUT 24,53,Press any key to continue
COLOR  +BLACK,BLACK
PUT 8,23,"ÿÿ
PUT 8,38,"ÛÛ
COLOR  +BLUE,BLUE
PUT 9,23,"ÿÿ
PUT 9,38,"ÛÛ
COLOR  +GREEN,GREEN
PUT 10,23,"ÿÿ
PUT 10,38,"ÛÛ
COLOR  +CYAN,CYAN
PUT 11,23,"ÿÿ
PUT 11,38,"ÛÛ
COLOR  +RED,RED
PUT 12,23,"ÿÿ
PUT 12,38,"ÛÛ
COLOR  +MAGENTA,MAGENTA
PUT 13,23,"ÿÿ
PUT 13,38,"ÛÛ
COLOR  +YELLOW,YELLOW
PUT 14,23,"ÿÿ
PUT 14,38,"ÛÛ
COLOR  +WHITE,WHITE
PUT 15,23,"ÿÿ
PUT 15,38,"ÛÛ
color cyan,+blue
PUT 20,,Setting paper colours to bright causes flashing ink.
GET
GOTO menu
rem ======================== BOX ===========================
:BOX
clear +yellow,black
box 0,,78,23,2
color white,red
BOX  9,30,30,6,0
color white,blue
BOX 3,6,,,1
color +white,green,magenta
BOX 12,43,,,2
color ,white
BOX 2,43,,,4
color ,cyan
BOX 1,20,10,17,5
color ,black,blue
BOX 8,,26,5,6
COLOR +YELLOW
BIG  9,,5,BOXES
PUT 21,,The box command enables boxes to be drawn anywhere on the screen,
PUT ,,in any colour, with any border, with or without shadow.
color red,black
PUT 24,51," Press any key to continueÿ
GET
goto menu
rem ======================== SOUNDS ===========================
:SOUNDS
CLEAR +YELLOW,BLUE
BIG 1,,1,SOUND COMMANDS
COLOR WHITE
PUT 5,,Two XTRA commands play music.
color +white
PUT 8,20,BEEP
PUT 10,20,CHORD
color +yellow
PUT 8,25, - Play a series of single notes.
PUT 10,26, - Play a series of 3-voice chords.
color white
PUT 13,,(BEEP is louder and more suitable for PCs with inferior sound, such as IBM)
COLOUR +white,red,cyan
:SOUND2
BOX 16,,12,3,1
PUT 17,,BEEP demo
PUT   ,,CHORD demo
PUT   ,,QUIT
POINT 17,,10,3
IF ERRORLEVEL 3 GOTO MENU
IF ERRORLEVEL 2 GOTO CHORD
BEEP 4,1,4,2,4,3,4,4,4,5,4,6,4,7,8,8
GOTO SOUND2
:CHORD
CHORD 4,8,3,5,4,9,5,7,4,10,5,1,4,11,6,2,4,12,1,3,4,13,1,4,4,14,9,11,8,15,10,12
GOTO SOUND2
rem ======================== PRINTING ===========================
:PRINTING
CLEAR +YELLOW,BLUE
BIG 1,,1,PRINTING COMMANDS
COLOR WHITE
PUT 5,,There are two text printing commands:-
color +white
PUT 7 ,,PUT
PUT 10,,BIG
color +blue
PUT 8,5,Meaning -
PUT 11,5,Meaning -
color +yellow
PUT 8,15,Print text anywhere using the standard character set.
PUT 11,15,Print text using one of 8 built-in BIG fonts.
color white
PUT 15,,If the row is unspecified, then the next row down is used.
PUT 17,,If the column is unspecified, then the text is automatically centered.
COLOR YELLOW
COLOR RED
PUT 24,53,Press any key to continue
GET

rem ======================== FONTS ===========================
:PUTb
CLEAR ,,black
BIG 1,,8,FONTS
color +white
PUT 9,18,No Name      Depth       Available
COLOUR RED
PUT 23,,Key number to sample any of these fonts.
COLOR BLACK,WHITE,magenta
BOX 10,,46,9,1
PUT 11,18,"1  SMALL       3     Caps and numbers only
PUT  ,18,"2  MEDIUM      4     Caps, lowers and numbers
PUT  ,18,"3  LARGE       6     Caps, lowers and numbers
PUT  ,18,"4  MINIPIPE    3     Caps and numbers only
PUT  ,18,"5  PIPE        5     Caps, lowers and numbers
PUT  ,18,"6  SMALL_SHAD  3     Caps and numbers only
PUT  ,18,"7  MED_SHAD    4     Caps, lowers and numbers
PUT  ,18,"8  LARGE_SHAD  6     Caps, lowers and numbers
PUT  ,18,"   Quit
POINT 11,18,14,9
color +yellow,blue,black
if errorlevel 9 goto menu
IF ERRORLEVEL 8 GOTO LARGESHAD
IF ERRORLEVEL 7 GOTO MEDSHAD
IF ERRORLEVEL 6 GOTO SMALLSHAD
IF ERRORLEVEL 5 GOTO PIPE
IF ERRORLEVEL 4 GOTO MINIPIPE
IF ERRORLEVEL 3 GOTO LARGE
IF ERRORLEVEL 2 GOTO MEDIUM
IF ERRORLEVEL 1 GOTO SMALL
rem ======================== FONTS ===========================
:SMALL
CLEAR
BIG 5,,1,THIS IS SMALL
BIG 12,,,"1234567890
GOTO PUTC
:SMALLSHAD
CLEAR
BIG 5,,6,THIS IS SMALLSHAD
BIG 12,,6,"1234567890
GOTO PUTC
:MEDIUM
CLEAR
BIG 4,,2,THIS IS MEDIUM
BIG 10,,2,This is medium
BIG 16,,,"1234567890
GOTO PUTC
:MEDSHAD
CLEAR
BIG 4,,7,THIS IS MEDSHAD
BIG 10,,7,This is medshad
BIG 16,,7,"1234567890
GOTO PUTc
:LARGE
CLEAR
BIG 2,,3,THIS IS LARGE
BIG 8,,3,This is large
BIG 15,,,"1234567890
GOTO PUTC
:LARGESHAD
CLEAR
BIG 2,,8,LARGESHAD
BIG 9,,8,Largeshad
BIG 17,,8,"1234567890
GOTO PUTC
:MINIPIPE
CLEAR
BIG 4,,4,THIS IS MINIPIPE
BIG 11,,,"1234567890
GOTO PUTC
:PIPE
CLEAR
BIG 2,,5,THIS IS PIPE
BIG 8,,5,This is Pipe
BIG 15,,,"1234567890
GOTO PUTC
:PUTC
COLOR RED
PUT 24,53,Press any key to continue
GET
GOTO PUTB
rem ======================== FLOW ===========================
:flow
CLEAR +YELLOW,BLUE
BIG 1,,1,FLOW CONTROL
COLOR WHITE
PUT 5,,XTRA offers 5 resident functions to back up the existing
PUT ,,Batch File flow controls.
color +white
PUT 8 ,,CHOOSE string
PUT 12 ,,GET
PUT 15 ,,POINT and LINEOUT
PUT 18 ,,TEST
color +blue
PUT  9,5,Meaning -
PUT 13,5,Meaning -
PUT 16,5,Meaning -
PUT 19,5,Meaning -
color +yellow
PUT  9,15,Wait till one of the string letters is keyded, return its
PUT ,15,position in the string as an errorlevel.
PUT 13,15,Wait till any key is pressed, return scancode as errorlevel.
PUT 16,15,Set up bright-bar menus (see POINT desciption page).
PUT 19,15,If key waiting return scancode as errorlevel, otherwise
PUT ,15,return zero.

colour +green
PUT 22,,TEST is particularly suitable for inclusion in a musical
PUT   ,,or animation loop, (loop till key pressed).
COLOR RED
PUT 24,53,Press any key to continue
GET
GOTO MENU


rem ======================== RUBOUT ===========================
:RUBOUT
CLEAR +YELLOW,BLUE
BIG 1,,1,REMOVE AND RUBOUT
color black,white
box 5,,78,7,1
box 15,,78,8,1
COLOR +WHITE
PUT 5,," REMOVEÿ
PUT 15,," RUBOUTÿ
color +yellow
PUT 7,6,Removes XTRA and all overlying resident programs.  XTRA can
PUT ,6,therefore be used as barrier. Call XTRA before you execute other
PUT ,6,residents such as SIDEKICK, DBFAST, POLYP or whatever.  The
PUT ,6,command REMOVE clears the lot from memory, restoring vectors.
COLOR MAGENTA
PUT 12,6,(REMOVE also wipes any errorlevel information previously set by XTRA.)
COLOR +YELLOW
PUT 17,6,When XTRA commands are issued from the keyboard, the old command
PUT ,6,line remains confusingly at the prompt.  RUBOUT tells XTRA to
PUT ,6,rubout the command at line 24.
PUT 21,6,But this does tend to mess up any display on line 24.  So cancel
PUT ,6, rubout with RUBOUT OFF when switching back to batch commands.
COLOR RED

PUT 24,51," Press any key to continueÿ
GET
GOTO MENU
:quit
clear
