home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / alpha / alpha.txt < prev    next >
Text File  |  1994-01-04  |  37KB  |  882 lines

  1.  
  2.     *******************************************************************
  3.     *                                                                 *
  4.     * (C) Copyright International Business Machines Corporation 1993. *
  5.     *                 All rights Reserved.                            *
  6.     *                                                                 *
  7.     *******************************************************************
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                            ALPHA V1.8
  15.  
  16.              Lionel de Lambert - Iunius MMDCCXLIII AUC
  17.  
  18.                 IBM United Kingdom Laboratories Ltd.
  19.  
  20.                            04 January 1994
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. This document describes the installation, function and commands of the ALPHA
  29. code analysis and browse programmes which run under the OS/2 operating
  30. system. The languages supported are :-
  31. 370 and 386 assembler, PASCAL(Ada), PL/AS(PL/I, REXX), C and FORTRAN.
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44. Alpha V1.7
  45.  
  46. Introduction.
  47.  
  48. This programme may be of interest to those people who examine 370, 386
  49. assembler, PASCAL(Ada), PL/AS(PL/I, REXX), C, FORTRAN etc. under OS/2.
  50. This programme was written together with the CMS programme ANALYSE in
  51. order to establish some of the praecognita for the CICS restructure
  52. project.
  53.  
  54. This programme will provide basic browse functions for all files with a
  55. record size <=256 as well as highlighting specified keywords and allowing
  56. user defined Marker references and flow lines, and for language files
  57. such as 370 & 386 Assemble, PASCAL, PL/AS, C, FORTRAN etc.
  58. ALPHA will also draw branch flow lines from 'Jump/GOTO' instructions
  59. to labels in the  same window, will display the programme call structure,
  60. and expand the procedure call in a secondary window.
  61.  
  62. The programme is written in PASCAL and MASM for OS/2 using Presentation
  63. Manager calls.
  64.  
  65.  
  66. Installation
  67.  
  68. The minimum requirement is to transfer the binary file 'ALPHA.EXE' to
  69. a directory on your PS/2.
  70.  
  71. If you want different colours, fonts etc. you can copy the text file
  72. 'ALPHA.PRF' to the PS/2 and edit the file. You can also
  73. install the 'Alpha' fonts by transferring the binary file 'ALPHA.FON'
  74. to the PS/2 and using the 'Add font' command of the
  75. Installation menu on the 'Control Panel' on OS/2 V1.3. On OS/2 V2.0 select
  76.  'System Setup'  from 'OS/2 System' and use 'Add' in the 'Edit font' of
  77. the 'Font Palette'.
  78. If you wish to access files from the host then you should also install the
  79. 'Transfer_pgm' (ALMCOPY). You can send commands to the
  80. host if you also install a 'Command_pgm' (OS2CMD).
  81.  
  82.  
  83. Starting up Alpha
  84.  
  85. The syntax for starting up the Alpha programme is :-
  86.  
  87. ìC:\┘ <START> ALPHA <file name> </p <profile name>> </m>
  88.  
  89. Where the option /m may be specified to cause the programme to be started
  90. minimised. This is intended for use in the 'STARTUP.CMD' file as an
  91. alternative to having the programme in the "Group - main" window, e.g.
  92.  
  93. START ALPHA /p /m
  94.  
  95. The option /p may be specified to cause the file of initial values of
  96. colours, font etc. to be read. The default file name for this profile is
  97. 'ALPHA.PRF'. This file may be used to set alternative start up values such
  98. as the keyword colours. If a file name is not supplied on the OS/2 command
  99. line then the first display will ask for the file name to be browsed.
  100. The Enter key or Enter button should be used to terminate the string, e.g.
  101.  
  102.         C:\WORK\TEST.A37<Enter_key>
  103.  
  104. On OS/2 V1.3 if Alpha is minimised or active with or without a file
  105. allocated and the file manager window is active then a selected
  106. file may be moved from the file manager window by dragging mouse button 2
  107. and releasing it over the Ω icon or main window.
  108. This will cause the new file to be allocated.
  109. On OS/2 V2.0 a file from a Drives window may be dropped on to the Alpha
  110. Icon of the unstarted programme.
  111.  
  112.  
  113.  
  114.  
  115. note
  116. If the window fails to appear the error, WinGetLastError, is written to the
  117. OUTPUT device. This should be directed to a printer or file e.g.
  118. ALPHA >PRN | >file_name
  119.  
  120.  
  121. Description
  122.  
  123. This programme may be used to browse any file with a record size <=256 and
  124. may also be used with language files such as :-
  125. 370, 386 assembler, PASCAL(Ada), PL/AS(PL/I, REXX), C, and FORTRAN
  126. programmes etc. on a PS/2 under OS/2 to help in analysing their structure.
  127.  
  128. The basic browse functions are :-
  129.  
  130. 1) Home - Move to top of file
  131. 2) End - Move to end of file
  132. 3) Page_up - scroll up 1 screen
  133. 4) Page_down - scroll down 1 screen
  134. 5) F7 - scroll up 1/2 screen
  135. 6) F8 - scroll down 1/2 screen
  136. 7) F19 (Shift+F7) - scroll left 1/2 screen
  137. 8) F20 (Shift+F8) - scroll right 1/2 screen
  138. 9) The Horizontal and Vertical scroll bars.
  139.  
  140. The mouse button 1 when pressed will isolate the addressed string using
  141. ' ', ',', '+' etc. as separators, and highlight it and all references in
  142. the window or as the file is browsed.
  143. In Locate mode if mouse button 1 is pressed twice (double clicked) then the
  144. isolated string will become a search argument. If mouse button 2 is pressed
  145. once (clicked) then the next occurrence of the search argument will be
  146. located. If mouse button 2 is double clicked then the search will start
  147. at the top of the file.
  148.  
  149. In Expand mode if mouse button 1 is double clicked then the search string
  150. is assumed to be a label or procedure name and a second window is opened
  151. with the procedure code provided the label/routine name can be found.
  152.  
  153. Search commands may be issued from the command window, which may be invoked
  154. by the F6 key or the system menu icon Alpha.
  155.  
  156. When the main window is displayed keywords which are associated with the
  157. file extension will be highlighted using the colours specified in the
  158. profile.
  159.  
  160. Note
  161. Up to 128 language keywords may be specified with their corresponding
  162. colour and the length of the record to be scanned. Only the first 16
  163. keywords on the line will be highlighted and the search order is the order
  164. specified in the profile. The keyword must be <=12 characters.
  165.  
  166. The File_type keyword in the profile may be used to introduce extra file
  167. types but the first 6 types are assumed to refer to :- 370 assembler, 386
  168. assembler, PASCAL, PL/AS, C, and FORTRAN in that order. With Flow on for
  169. language files branch flow lines will be drawn from 'Branch/GOTO'
  170. instructions to labels in the same window.
  171.  
  172. If the profile specifies Read_file=Yes, the default, then the file may be
  173. browsed as soon as the window is opened, performance then improves once
  174. the file is read in.
  175.  
  176.  
  177. Note
  178. Only the first 256 characters of a record are read. Once the file is read
  179. in there is an internal switch over. If a locate etc. was in progress at
  180. the time of the switch over the window may not display the line found;
  181. it may be necessary to repeat the command e.g. F5.
  182.  
  183. If the profile specifies Read_file=No then only 120 records from the file
  184. are read in to storage and scrolling takes place within this buffer unless
  185. F4+Ctrl is pressed when the whole file is read in to memory asynchronously.
  186. As the file is scrolled up/down extra pages are read in to the buffer.
  187. The affect is that on scrolling upwards, after the window is displayed,
  188. there may be a pause (hour glass symbol) while extra data is read in.
  189.  
  190. Small parts (<=window size) of the file may be remembered and redisplayed
  191. by using the Clipboard function. Drag the mouse with button 1 down over the
  192. lines to be saved and press Ctrl+Insert to save the highlighted lines.
  193. To redisplay the saved lines press Shift+Insert. The lines are displayed
  194. from the cursor position onwards. The highlighted records may be printed
  195. on LPT1 by pressing Insert+Alt.
  196.  
  197.  
  198. Function keys
  199.  
  200. The following keys are effective for the programme:-
  201.  
  202. Mouse button 1 will isolate and highlight the text. If button 1 is pressed
  203. twice then the highlighted string may then be used as a search argument by
  204. button 2.
  205.  
  206. Mouse button 2 will scan from the current position to the end of file for
  207. the locate string, i.e. the string isolated by button 1 or by use of a
  208. locate command from the command window (F6).
  209. If the mouse button 2 is pressed twice then the scan will start from the
  210. top of the file.
  211.  
  212. F1 is the help key.
  213.   F1+Alt will display/hide the current status. {The statement number is
  214. displayed in the TITLE bar. R indicates that the file is being read in
  215. to memory, S indicates that the programme structure is being recorded.}
  216. F2 will change the font. The System Monospaced font is the default font,
  217. unless the Alpha font is installed.
  218. F3 will terminate programme.
  219. F4 will allocate a new file
  220.   F4+Ctrl will read the currently assigned file in to memory.
  221.  
  222. Note
  223. A separate thread is attached to read in the file whilst the file may
  224. continue to be browsed within the 120 record buffer. The scrolling of the
  225. file will be much faster but there may be some degradation of performance
  226. while the file is read in to store. A maximum of 21,844 records can be read
  227. in if there is enough memory available. When the file is read in there is
  228. a beep of 1760HZ to indicate that the file has been read and one of 880HZ
  229. to idicate that the structure has been recorded, provided that "Quiet=No"
  230. is specified in the profile.
  231.  
  232. F5 will repeat the previous command
  233. F6 will issue a command.
  234.  
  235. Note
  236. This window may also be created from the system menu icon Alpha. A child
  237. window is created in to which may be typed the command.
  238.  
  239. F7 scroll up 1/2 screen.
  240. F8 scroll down 1/2 screen.
  241. F9 switch on/off comment suppression.
  242.     A sequence of blank or comment lines will be compressed to a single line
  243.     of  provided that he file is read in. The comment lines must begin with
  244.     characters specified in Comment_start and end with the characters
  245.     specified in Comment_end.
  246. F10 not used.
  247. F11 not used.
  248. F12 will move the mouse button 1 focus line {The line on which mouse button
  249.      1 was last pressed.} to the centre of screen.
  250.   F12+Ctrl will switch on/off the scale line in the centre of the window.
  251. F13 (shift+F1) will display the programme structure.
  252. F14 (shift+F2) will change the text colours.
  253. F17 (shift+F5) will locate the next Marker.
  254. F19 (Shift+F7) will scroll left 1/2 line.
  255. F20 (shift+F8) will scroll right 1/2 line.
  256. F24 (shift+F12) will reset the horizontal scroll, clear line markers etc.
  257. Page_Up will scroll up one page.
  258. Page_Down will scroll down one page.
  259. Home key will move to top of file.
  260. End  key will move to end of file.
  261. Insert+Ctrl will place mouse Button 1 drag area in Clipboard.
  262. Insert+Shift will copy Clipboard text to mouse Button 1 position - cursor.
  263. Insert+Alt will write the highlighted records to LPT1.
  264. Delete+Ctrl will remove the highlighted records, mouse button 1 display
  265. area, from the window display.
  266. Delete+Shift will restore the deleted records.
  267. The Up & Down arrow keys will move the cursor.
  268. The scroll arrows, slider etc. and Page up or Page down keys may be used
  269. for browsing.
  270.  
  271. Note
  272. If the mouse button 1 is kept depressed on the scroll bar arrows then the
  273. lines or characters will scroll until the button is released.
  274. If the file is not read in then the file size is estimated by adding 1000
  275. every time the internal array is filled.
  276. In this case the slider may move to the end of the vertical scroll bar
  277. before end_of_file is reached and then move up.
  278.  
  279. Enter key will terminate an input string or refresh the screen.
  280.  
  281. Help window
  282. This window may be invoked by the F1 key or the Help button on the command
  283. window. The window may be scrolled by :-
  284.  
  285. Page_up - scroll up 1 screen
  286. Page_down - scroll down 1 screen
  287. Home - scroll to the top of the Help data
  288. End - scroll to the end of the Help data
  289. F7 - scroll up 1/2 screen
  290. F8 - scroll down 1/2 screen
  291. The Page_Up key word at the bottom of the window will scroll up 1 screen if
  292. selected by mouse button 1.
  293. The Page_Down key word at the bottom of the window will scroll down 1
  294. screen if selected by mouse button 1.
  295. The OS/2 help file, ALPHA.HLP, may be accessed by selecting '?' from
  296. the system menu.
  297.  
  298. The Help window may be cancelled by F3, the Cancel button or by Enter.
  299.  
  300.  
  301.  
  302. Allocate window
  303. The File Allocate window will be created by the F4 key or from the Allocate
  304. menu item of the command window. The file may be selected from the List box
  305. or typed in to the Entry box. The drive may be changed by selecting ¿aα from
  306. the List box or typing the drive letter followed by a ':' e.g. 'a:' in the
  307. Entry box. The Path may be changed by selecting a directory name from the
  308. List box or by typing the path name in the Entry box e.g. 'C:\WORK'.
  309. The COMBO box will hold the last three allocate texts which have been
  310. entered.
  311.  
  312. A host file may be received and allocated by entering
  313. '>H:fn ft fm PC_file_name'; this string is passed to Transfer_pgm (ALMCOPY)
  314. {without the '>' and with '/Q' appended} which must be installed on the PS/2.
  315. If Transfer_pgm fails the return code is displayed in red and the Entry text
  316. is left to be edited. If the requested file can not be allocated then the
  317. allocate window together with an error message will be displayed.
  318.  
  319. A host command may be executed by entering '<host command'; this string is
  320. passed to Command_pgm (OS2CMD) {without the '<'} which must be installed
  321. on the PS/2.
  322.  
  323. If the DosExecPgm call fails for either OS2CMD or ALMCOPY then the error
  324. code is displayed in black.
  325.  
  326. Note
  327. If the Allocate window can not be contained in the main window then it will
  328. be made sysmodal; i.e. it must be closed before other windows can be used.
  329. For 8515 type screens a more suitable value for the Window and Default_chr
  330. keywords in the profile might be Window=(0,120,1020,650) and
  331. Default_chr=(14,20) for example.
  332.  
  333. Command window
  334. This window may be invoked by the F6 key or the system menu icon Alpha.
  335.  
  336. The following commands may be issued :-
  337. +n - scroll down n lines
  338. -n - scroll up n lines
  339. <n - scroll left n characters
  340. >n - scroll right n characters
  341. :n - go to record n
  342. / - Search for string, not case dependent, from the current position in the
  343.      file.
  344. " - Search for string, as typed, from the current position in the file
  345. ' - Search for string, as typed, from the current position in the file but
  346.     only in column 1
  347. (s-e)>file_name - will copy records from the current file starting at s and
  348.     ending with e to the file file_name.
  349.     file_name may be 'LPT2' etc., an existing file or a new file.
  350.    If the end record number is '*'  then the file is copied to end-of-file.
  351. (s-e)- - will remove the records from the window.
  352.  will cycle through the last 6 commands.
  353. The Delete|Backspace key will delete a character from the input text.
  354.  
  355. If the first character is invalid then the line will be filled red until it
  356. is deleted.
  357.  
  358. F3 or ENTER will close the window and enter the command.
  359.  
  360. The cancel button will remove the window; only this child window will
  361. receive input until it is terminated.
  362.  
  363. The Flow button will switch on/off the drawing of flow lines. These lines
  364. are drawn for language files from 'Branch/GOTO' instructions to labels
  365. within the window.
  366.  
  367. The Expand/Locate button will switch on/off the label expansion. The
  368. isolated label is expanded by locating the routine and opening a second
  369. window containing the code. The mouse button 1 must be pressed twice
  370. (double clicked) to cause the label to be located. A depth of 8 expand
  371. windows is allowed, and each window may be scrolled using the scroll bar,
  372. Page_Up, Page_Down, etc.
  373. The file must be read in to storage to use this facility. The Expand window
  374. may be closed by F3 or the CALL menu item when the main window will remain
  375. at the CALL. If the Routine menu is clicked then the main window will
  376. scroll to the expand text, i.e. the called code line may be passed back to
  377. the higher level window. The Locate menu or F6 will perform a case
  378. sensitive forward search from the current line+1.
  379. F5 will repeat the previous locate. If Button 2 is double clicked after
  380. moving to the expanded label then the window will be moved back to the
  381. previous line, i.e. return to point of call.
  382. The label searched for is succeeded by ":" for PLS and preceded by
  383. "FUNCTION" or   "PROCEDURE" in PASCAL. The label searched for is preceded
  384. by "char", "extern", "far", "int", "long", "pascal", "pointer", "short",
  385. "static" or "void" if the language type is C. The label searched for is
  386. preceded by "FUNCTION" or "SUBROUTINE" if the language type is FORTRAN.
  387. (The language keywords may be specified by the Language_operator keyword
  388. in the profile. The C language values, language 5, may be set by the
  389. Precedent_C keyword in the profile.)
  390.  
  391. The Mark button will switch on/off the drawing of user flow lines defined
  392. by the mouse button 1, or the setting of a marker. Up to 16 user lines or
  393. markers may be associated with the file. If mouse button 1 is double clicked
  394. then a marker will be associated with the line. If mouse button 1 is pressed
  395. once then it will delimit the ends of a flow line. The markers or flow
  396. lines remain associated with the record until F24 (Shift+F12) is pressed.
  397. The markers enable places within the file to be remembered and recalled by
  398. (Shift+F5).
  399.  
  400. The Options menu may be selected to change the state of the following
  401. options :-
  402.  
  403. Transient Options - reset when a new file is allocated.
  404.  
  405. Comment Suppression - replace a block of comment lines by one highlighted
  406. line of .
  407. Scale - place a scale line in the middle of the window.
  408. Statement_# - will display the current line number in the TITLE bar.
  409. Status - indicate in the top left of the window the current status of file
  410. reading etc.
  411.  
  412. Permanent Options - remain set when a new file is allocated.
  413.  
  414. Quiet - suppress the beep which indicates that the file is read in to
  415. storage.
  416. Read_file_when_allocated - when the file has been allocated read it in to
  417. storage by attaching a subtask. The file may be browsed whilst this is in
  418. progress but the reading of the file in to storage will be slower.
  419. Record_structure - For language files this will cause the recording of the
  420. calling structure when the file has been read.
  421. Tab - recognize tab characters, X'09', and skip to n*8.
  422. Proportional - use the font spacing for writing the characters rather than
  423. the character size; this will allow proportional fonts to be used however
  424. these are not suitable for displaying code.
  425. Keyword - allow or suppress the keyword highlighting.
  426.  
  427. The Allocate menu will create the Allocate window
  428.  
  429. The Structure menu may be used to display the call structure for 370,
  430. 386 assembler, PASCAL, PL/AS, C and FORTRAN programmes provided that the
  431. Record_structure option is effective when the file is read in.
  432. For 370 assembler the structure is based on BAL, BAS, DFHSTACK,
  433. for 386 assembler CALL, PROC instructions, for PASCAL PROCEDURE,
  434. FUNCTION, keywords, for C char, extern, far, int, long,
  435. pascal, pointer, short, static or void keywords, for PL/AS PROC,
  436. CALL, keywords, and for FORTRAN FUNCTION, SUBROUTINE, CALL
  437. keywords {Labels ƒ27 characters are ignored}. The C language keywords
  438. may be specified by the Precedent_C keyword in the profile, and the operators
  439. for the other languages by the Language_operator keyword.
  440. If an entry is selected from the Programme Structure List Box then the
  441. main window is scrolled to that line.
  442. The Print button may be used to print the contents of the List box on LPT1.
  443.  
  444. The Font menu may be used to dynamically change the font and character size;
  445. the change is not saved in the profile.
  446.  
  447. The Colour  menu may be used to dynamically change the text colours. The
  448. language keyword colours must be specified in the profile.
  449.  
  450. FONTs
  451. You can specify the initial/default font in the profile by using the Font
  452. keyword in the profile, or you can change the font dynamically by invoking
  453. the Font window.
  454.  
  455. You can use the System Monospaced, Helvetica, Roman and Courier fonts but
  456. the Courier font and the System Monospaced are the only monospaced fonts
  457. supplied with OS/2 V1.3. A monospaced font with point sizes 8,9,10,11,16
  458. & 20 is supplied with the ALPHA PACKAGE, which may also be used.
  459. The fonts are then requested by specifying Font="Alpha",(10) etc. in the
  460. profile.
  461. The font type or face_name and size may be selected by the Font and
  462. Character_size keywords in the profile. If a profile is not supplied then
  463. the "Alpha",(10) font will be used if it is installed and a character_size
  464. of (8,14) else the "System Monospaced",(10) font will be used and a
  465. character_size of (8,16). Outline fonts are not selectable.
  466.  
  467. If the point size is not specified then the font is selected by using the
  468. Character_size.
  469. Point sizes (1/72") are :-
  470. Courier (8,10,12), Roman (8,10,12,14,18,24),
  471. Helvetica (8,10,12,14,18,24),
  472. System (8,10,12, {8x8, 8x16,9x20),
  473. "Alpha" (8{8x12},9{9x10},10{8x14},11{11x12},16{12x16},20{12x20}).
  474. If the point size is specified but an image font does not exist for this
  475. nominal point size then the outline font, if available, will be used and
  476. scaled by the Character_size.
  477. The font may be requested by face_name, e.g. Font="Alpha",(8).
  478.  
  479.  
  480. Profile
  481. A profile may be specified defining the following keyword values :-
  482.  
  483. {Colours may take the values :-
  484. BLUE, DARKCYAN, BLACK, DARKBLUE, DARKPINK, DARKGRAY, DARKRED, DARKGREEN,
  485. BROWN, CYAN, RED, GREEN ,PINK, YELLOW, PALEGRAY, DEFAULT, WHITE}
  486.  
  487. Text_colour specifies the colour of the window text.
  488.  
  489. Highlight_colour is used for the isolate function of mouse button 1.
  490.  
  491. Locate_colour is used for the argument for the locate function.
  492.  
  493. Comment_colour - the first comment_colour is used for comment lines
  494. beginning, /*, {, *, ;, C  and for the 'scale' background.
  495. The second comment_colour is  used for the compressed comment line
  496. and for the Clipboard highlight.
  497.  
  498. Branch_colour is used for 370, 386 branch instructions.
  499.  
  500. Expand_colour is used for the text in the label expansion window.
  501.  
  502. Back_ground is use to specify the main window background colour.
  503.  
  504. File_type specifies the File types to be recognized. The string must be
  505. ▓64 characters and terminated by a comma. The first 6 types are
  506. used for :-
  507.    1 370 assembler
  508.    2 386 assembler
  509.    3 PASCAL, (Ada)
  510.    4 PL/S, PL/AS, PL/I  etc., (REXX)
  511.    5 C
  512.    6 FORTRAN
  513. For REXX files use :- "A37,ASM,PAS,CMD,C,FOR," and replace the PLS entries
  514. under the Language_colour keyword.
  515. For Ada  files use :- "A37,ASM,ADA,PLS,C,FOR," and replace the PAS entries
  516. under the Language_colour keyword.
  517.  
  518. Comment_start specifies the first two characters of the start of a comment.
  519. The string must be ▓12 characters.  The 6 pairs are used for :-
  520.    1 370 assembler
  521.    2 386 assembler
  522.    3 PASCAL, for Ada specify Comment_start="* ; --/*/*C "
  523.    4 PL/S, PL/AS etc.
  524.    5 C
  525.    6 FORTRAN
  526.  
  527. Comment_end specifies the last two characters of the end of a comment.
  528. The string must be ▓12 characters.  The 6 pairs are used as for
  529. Comment_start
  530.  
  531. Precedent_C specifies the C language procedure keywords. The string
  532. must be <=64 characters and terminated by a comma. E.g.
  533. Precedent_C="char,extern,far,int,long,pascal,pointer,short,static,void,"
  534.  
  535. Language_colour  defines the highlight colours for key words. Up to 128
  536. entries may be defined as follows :-
  537.  file_type,key_word,colour,scan_length
  538. and are terminated by .END, invalid entries are ignored.  The keywords
  539. must be <=12 characters.
  540.  
  541. Language_operator defines the operator keywords for each language.
  542. The second value indicates how to process the keyword, viz.
  543. < or > indicate the scan direction from the keyword to locate the label,
  544. 'P' or 'C' indicates that the keyword specifies an entry point or call,
  545. ':' indicates that the label will be followed by a colon,
  546. '2' indicates that the second label following a ',' is to be used.
  547. Up to 32 entries may be defined as follows :-
  548. file_type,<║>C║Pì:┘ì2┘,keyword
  549. and are terminated by '.END', invalid entries are ignored.
  550. The keywords must be <=12 characters. The C-language procedure
  551. values are supplied on the Precedent_C keyword.
  552.  
  553. Font  may take the values :-
  554. Courier|System|Helvetica|Roman|Alpha<,Bold|Italic><,(Point_size)> or a
  555. face name may be specified e.g. Font="Alpha",(10)
  556.  
  557. Character_size specifies the (width,height) of the characters.
  558. The character width is used to select the size of the Font if the  point
  559. size is not specified on the "Font" keyword.
  560.  
  561. Read_file takes the value Yes|No and specifies whether the file  is to be
  562. read in after allocation.
  563.  
  564. Flow takes the value On|Off and specifies whether to draw flow lines from
  565. branch statements to labels.
  566.  
  567. Expand takes the value On|Off and specifies that Expand mode will  be
  568. effective once the file is read in.
  569.  
  570. Marker takes the value On|Off  and specifies whether mouse button 1 will
  571. define marker values.
  572.  
  573. Language takes the values :-
  574.  *<,Language> {The '*' implies determine the language from the file suffix}.
  575. If a Language is also given then this will be the default if the file type
  576. can not be found in "File_type", e.g.
  577. Language=*,PAS. For PL/I, REXX use Language=PLS etc.
  578.  A37 - 370 assemble
  579.  ASM - 386 macro assemble
  580.  PAS - Pascal (Ada)
  581.  PLS - PL/S or PL/AS etc. (PL/I, REXX)
  582.  C   - C language
  583.  FOR - FORTRAN
  584.  
  585. Default_chr specifies the default character width and height used for
  586. scaling the Allocate and Command dialogue boxes. The default value is
  587. (10,16), for 8515, 8516 screens a default value of (14,20) is used.
  588.  
  589. Window  specifies the initial window position.
  590. If no profile is specified then Window=(0,4h,63.5w,26h)
  591. {(0,120,1020,650) for 8515/8516 screens} is assumed where w and h are
  592. the Default_chr width & height.
  593.  
  594. Quiet will suppress the beep on completion of file read.
  595.  
  596. Record_structure will record the CALL structure for 370 & 386 assembler,
  597. PASCAL, PL/AS, C and FORTRAN programmes, as the file is read in to memory.
  598.  
  599. Tab will use X'09' as the tab character to move to column n*8 when file is
  600. read.
  601.  
  602. Proportional  will use the Font character spacing rather than the Character
  603. width to place the characters.
  604.  
  605. Keyword will highlight the specified keywords.
  606.  
  607. Statement_number sets the display of the statement number On|Off.
  608.  
  609. Command_pgm specifies the programme name invoked by <.
  610.  
  611. Transfer_pgm specifies the programme name invoked by >.
  612.  
  613. Alpha has within it (hard coded) routines which understand certain language
  614. features e.g. 370 Assembler labels start in start in column 1, procedures are
  615. invoked by BAL, BAS etc. and PASCAL procedures are preceded by FUNCTION
  616. or PROCEDURE etc.. The keywords and their attributes may be set by the
  617. Language_operator keyword in the profile.
  618. There are 6 such languages 'understood' by Alpha, viz. :-
  619.  
  620.  1 370 Assembler
  621.  2 386 Assembler
  622.  3 PASCAL (Ada)
  623.  4 PL/AS (PL/I, REXX)
  624.  5 C
  625.  6 FORTRAN
  626.  
  627. Because Ada is similar to PASCAL and PL/I & REXX are similar to PL/AS,
  628. in respect to procedure calls etc., you can also analyse these languages
  629. by pretending they are type 3 & 4 respectively.
  630.  
  631. However, you can interpret any language/file type (use the highlighting
  632. facility) by suppling extra definitions in a profile which is specified as a
  633. parameter to Alpha e.g.
  634.  
  635.   START ALPHA /p profile_name
  636.  
  637. A sample profile (ALPHA.PRF) is provided in the package, which includes
  638. comments explaining the use of the keywords. This may be edited to change/add
  639. a file extension, highlighting and programme structure by modifying the
  640. following keywords :-
  641.  
  642. File_type - list of file extensions up to 32 characters
  643. Comment_start - list of comment start character pairs (blank is ignored)
  644.                 up to 12 characters.
  645. Comment_end - list of comment end character pairs (blank is ignored)
  646.                 up to 12 characters.
  647. Language_colour - list of keyword definitions
  648.   file_type,keyword,colour,maximum scan length
  649. Precedent_C - list of procedure keywords for language 5 which precede
  650. a procedure definition, up to 64 charcaters.
  651. Language_operator - list of operator definitions
  652.   file_type,attributes,keyword
  653.  
  654.  
  655. e.g. to add language XYZ with a routine call 'ICALL routine_name' and
  656. a structure similar to PL/S
  657.  
  658. File_type="A37,ASM,PAS,XYZ,C,"
  659. Language_colour
  660. XYZ,ICALL,DARKGREEN,72
  661. XYZ,Next_key ,RED,72
  662. .END
  663. Language_operator
  664. XYZ,>C,ICALL
  665. .END
  666.  
  667. Only the first 6 language types will allow the Expand, Flow and Structure
  668. operations to be effective. This implies that you could not use all the
  669. features of Alpha for a new language which did not have the call/label
  670. syntax of one of the existing languages.
  671.  
  672. The Alpha programme scans the keyword table in the order specified in the
  673. profile to the comment start in the record for a maximum of 16 found
  674. entries. A keyword_found array is created and the text is written by
  675. running down the array from the last to the first so if the entries
  676. in the profile were in the order :-
  677.  
  678. PLS, END LOOP,GREEN,72
  679. PLS, END,DARKCYAN,72
  680.  
  681. Then the 'END LOOP' would overwrite the 'END'; spaces are significant.
  682.  
  683.  
  684. Alpha2 V1.2
  685. ===========
  686.  
  687. ALPHA2.EXE is a simple 32 bit version of the Alpha programme with
  688. written in C Set/2 and MASM v6.0 which will run on OS/2 V2.0.
  689.  
  690. Highlighting of keywords has been provided for the following language
  691. types :-
  692. A37,ASM,PAS,PLS,C,FOR
  693.  
  694.  
  695. The syntax of Alpha2 is :-
  696.  
  697.    START ALPHA2 ìfile_name┘ ì/p ìprofile name - default ALPHA.PRF┘┘
  698.  
  699. The Language_colour, File_type, Comment_start, Comment_end, Language_operator,
  700. Precedent_C, Transfer_pgm and Window keywords are the only ones which are 
  701. recognized from the profile.
  702. The window position is remembered if it is resized.
  703.  
  704. The Allocate dialogue box is used to request a file to be read. If the
  705. drive letter is changed then the OK button should be used to refresh the
  706. List boxes. {The maximum number of child windows is 16.}
  707. The 'Profile' button will remember the File entered in the Entry box as
  708. the profile for subsequent invocations. A null value will remove the saved
  709. profile name. This will obviate the need for the '/p' parameter and enable
  710. a file to be dropped on the unstarted programme. Files may also be dropped
  711. on the main window. The 'Transfer' button will pass the contents of the
  712. Combo box to the Transfer_pgm. (The data will be passed unmodified.)
  713.  
  714. The Command dialogue box may be used to issue a search command e.g.
  715.  
  716. None case sensitive search for a string.
  717. Case sensitive search for a string.
  718. Case sensitive search for a string in column one.
  719. Move to a specified line number.
  720.  
  721. The COMBO box will hold the previous three commands entered.
  722.  
  723. The Options menue may be used to set the following options :-
  724.  
  725.  Statement No. - display the statement number in the TITLE bar.
  726.  Tab - expand the record by using X'09' characters to round
  727.        to columns n*8.
  728.  Keyword - highlight the keywords.
  729.  Include - For the files MASM, PAS, PLS, C read the include
  730.            files specified by :-
  731.            include file_name, {£INCLUDE : 'file_name' },
  732.            %INCLUDE first_part_of_file_name;,
  733.            #include <file_name>,
  734.            respectively when expanding a call etc.
  735.            (The current directory together with the paths defined
  736.            by the INCLUDE environmental variable will be searched.
  737.            The total number of open files/windows is limited to 16 so
  738.            the include nesting level can not exceed 16 - the number
  739.            of open windows. For language 4, PL/S, the file extension
  740.            is appended to the first_part_of_file_name.)
  741. Grid - Draw vertical grid lines through every tenth character in 'Grid' colour.
  742.  
  743.  
  744. The Font  dialogue box may be used to change and remember the font of
  745. the text, comments etc.
  746.  
  747. The Colour dialogue box may be used to change and remember the colours
  748. of the text, comments etc. The following colours may be changed with
  749. this dialog box :-
  750. Text - The main text colour.
  751. Highlight - The mouse button 1 isolate keyword.
  752. Locate/Position - The mouse button 2 locate string, the character
  753.   position of the last mouse button 1 click and the Structure List box
  754.   procedures.
  755. Comment/statement# - The Comment colour, statement number and Structure
  756.   List box calls.
  757. Background - The background colour.
  758. Branch - The Branch/Jump instruction colour.
  759. Grid - The vertical grid line colour.
  760. Select area - The mouse button 1 drag area.
  761. {The colours available are:-
  762. BLUE, DARKCYAN, BLACK, DARKBLUE, DARKPINK, DARKGRAY, DARKRED, DARKGREEN,
  763. BROWN, CYAN, RED, GREEN ,PINK, YELLOW, PALEGRAY, DEFAULT, WHITE,
  764. ORANGE, PURPLE, PALEGREEN, PALEBLUE.
  765. The last four will not be available on VGA screens.}
  766.  
  767. The Window menu may be used to close all child windows or to arrange them
  768. so that the title text is visible, Cascade, or so that a partial view of
  769. each child may be seen, Tile. The Select window option may be used to show a
  770. selected window.
  771.  
  772. The mouse button 1 will highlight a string and mouse button 2 will cause a
  773. search for this string from the current line +1. If mouse button 1 is
  774. clicked twice on a label then a search from the top of the file is made
  775. for the label definition or procedure entry and a secondary window is
  776. opened (Expand).
  777. {The language structure tables are searched first so if you
  778. have specified some structure keywords via. Language_operator
  779. then you will have to record the structure first, Ctrl+s.}
  780.  
  781. If mouse button 1 is clicked twice on a BEGIN for PASCAL, DO for PLS or {
  782. for C then the code up to the following END etc. will not be displayed.
  783. These lines may be restored by double clicking on the suppressed line
  784. or by F12. If the Include option is effective and button 1 is double clicked
  785. on an 'INCLUDE' statement then a second window will be created with the
  786. include file. If mouse button 1 is held down and dragged to the bottom or top
  787. of the window the window will continue to scroll until the button is
  788. released or the mouse is moved back within the window.
  789.  
  790. The following keys are effective for the programme :-
  791.  
  792. F1 will open the Help window.
  793. F2 will open the Font dialogue box.
  794. F3 will terminate the programme.
  795. F4 will open the Allocate file dialogue box.
  796. F5 will repeat the previous command.
  797. F6 will open the Command dialogue box.
  798. F7 will scroll the window up 1/2 a screen.
  799. F8 will scroll the window down 1/2 a screen.
  800. F12 will reset the collapse of the BEGIN/END pairs etc.
  801. F24 (F2+Shift) will open the Colour dialogue box.
  802. Page_Up will scroll up 1 screen.
  803. Page_Down will scroll down 1 screen.
  804. Home will scroll to the top of the file.
  805. End will scroll to the end of the file.
  806. Up_arrow - scroll up 1 line.
  807. Down_arrow - scroll down 1 line.
  808. Left_arrow - scroll Left 1 column.
  809. Right_arrow - scroll Right 1 column.
  810.  
  811. The Insert+Ctrl keys will copy the highlighted lines to the Clipboard.
  812.  
  813. The Delete+Ctrl keys will suppress the lines highlighted by the button 1
  814. drag area from the display.
  815.  
  816. The Delete+Shift keys will restore the lines previously hidden.
  817.  
  818. The Ctrl+S keys will record/display the programme structure.
  819. {The programme calling structure will be recorded if this has not already
  820.  been done and then the Structure dialog box will be displayed. 
  821.  If an entry from the List box is selected then the last active window 
  822.  will be scrolled to that line. The Print button may be used to print 
  823.  the contents of the List box on LPT1. The calling structure is based on 
  824.  the profile keywords :- Language_operator, Precedent_C and File_type.} 
  825.  
  826. The Alt+n keys will record a bookmark.
  827.  
  828. The Ctrl+n keys will move to a bookmark.
  829.  
  830. The Help menu may be used to select the About box, the help window or
  831. the extended OS/2 help file, ALPHA2.HLP, which must be installed in
  832. the HELP path.
  833.  
  834. The following keys are effective for the Help window :-
  835. 1) Home - Move to top of file.
  836. 2) End - Move to end of file.
  837. 3) Page_up - scroll up 1 screen.
  838. 4) Page_down - scroll down 1 screen.
  839. 5) Up_arrow - scroll up 1 line.
  840. 6) Down_arrow - scroll down 1 line.
  841. 9) The Vertical scroll bar.
  842.  
  843. A file may be allocated by dragging mouse button 2 with the Ctrl key
  844. pressed over the Alpha window and releasing the button.
  845.  
  846.  
  847. Changes since V1.7
  848.  
  849. Alpha  - 16 and 20 point fonts.
  850.        - PAS,C,PLS - Comment continuation.
  851.        - Default window size for 8515/8516 screens.
  852.        - Language_operator keyword to specify programme structure.
  853.        - Comment_end keyword to specify the terminating characters of
  854.          a comment.
  855.        - Support for OS/2 Help file ALPHA.HLP.
  856.  
  857. Alpha2 - Collapse of BEGIN/END pairs.
  858.        - PAS,C,PLS - Comment continuation.
  859.        - Printer support.
  860.        - Open a second window with the inlude file by double clicking on
  861.          the INCLUDE statement, provided that the Include option is
  862.          effective.
  863.        - Comment_end keyword to specify the terminating characters of
  864.          a comment.
  865.        - Select window function in Window menue.
  866.        - Remember the profile name from the Allocate menue.
  867.        - Transfer_pgm keyword from profile.
  868.        - Support for OS/2 Help file ALPHA2.HLP.
  869.        - Insert+Ctrl - will place highlighted lines in the Clipboard.
  870.        - Ctrl+S - will record/display the programme structure.
  871.        - Alt+n - will set a bookmark.
  872.        - Ctrl+n - will move to a bookmark.
  873.        - Option - Grid - draw vertical grid lines every 10th. character. 
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.