home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / oberonv4.zip / oberonv4.exe / userguid.inf (.txt) < prev    next >
OS/2 Help File  |  1996-02-25  |  40KB  |  1,022 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Title Page ΓòÉΓòÉΓòÉ
  3.  
  4.                           Oberon for OS/2 User's Guide
  5.  
  6.                          Release 4.0-0.6e (February 96)
  7.  
  8.                              (Unregistered version)
  9.  
  10.                                  Daniel Steiner
  11.  
  12.                          Copyright 1994-1996, D. Steiner
  13.  
  14.  
  15. ΓòÉΓòÉΓòÉ 2. Disclaimer and legal issues ΓòÉΓòÉΓòÉ
  16.  
  17.           THE AUTHOR D.STEINER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
  18.           SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 
  19.           FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 
  20.           INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 
  21.           FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
  22.           NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 
  23.           WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
  24.  
  25.  Syntax Font, Copyright 1968 Linotype AG 
  26.  
  27.  Syntax is a registered trademark of Linotype AG. The Syntax font is owned and 
  28.  used by permission of Linotype AG. 
  29.  
  30.  RASTER DATA DESCRIBING THE SYNTAX FONT IS SUPPLIED WITH THIS RELEASE OF OBERON 
  31.  AND MAY BE USED ONLY IN CONJUNCTION WITH THE OBERON SOFTWARE.  ANY OTHER USE 
  32.  OF THE SYNTAX FONT REQUIRES A LICENSE FROM LINOTYPE AG. 
  33.  
  34.  PostScript versions of the fonts in the Syntax family are available from 
  35.  Linotype, Inc. and its subsidiaries. 
  36.  
  37.  Oberon and Oberon for Windows are trademarks of Eidgen╨ñssische Technische 
  38.  Hochschule, Z╨ærich 
  39.  
  40.  Microsoft, MS and MS-DOS are registered trademarks of Microsoft Corporation. 
  41.  
  42.  NT, Win32, Win32s, Windows and Windows NT are trademarks of Microsoft 
  43.  Corporation. 
  44.  
  45.  IBM is a registered trademark of International Business Machines Corporation. 
  46.  
  47.  OS/2 is registered trademark of International Business Machines Corporation. 
  48.  
  49.  Intel is a registered trademark and i486 is a trademark of Intel Corporation. 
  50.  
  51.  
  52. ΓòÉΓòÉΓòÉ 3. Introduction ΓòÉΓòÉΓòÉ
  53.  
  54. Oberon for OS/2 is an implementation of Oberon for IBM OS/2 2.1 and OS/2 Warp 3 
  55. operating system.  Both the programming language Oberon-2 and the Oberon System 
  56. have been implemented. For a complete description of the language and the 
  57. system, the following books are recommended: 
  58.  
  59.      N. Wirth and M. Reiser: Programming in Oberon. Steps beyond Pascal and 
  60.      Modula_2 
  61.  
  62.      H. M╨ñssenb╨ñck: Object-Oriented Programming in Oberon-2 
  63.  
  64.      H. M╨ñssenb╨ñck: Objektorientierte Programmierung in Oberon-2 
  65.  
  66.      M. Reiser: The Oberon System. User Guide and Programmer's Manual 
  67.  
  68.      N. Wirth and J. Gutknecht: Project Oberon. The Design of an Operating 
  69.      System and Compiler 
  70.  
  71.  The Oberon-2 language reference is also available as on-line documentation: 
  72.  Oberon-2 Report 
  73.  
  74.  The original Oberon implementation is an operating system running on a 
  75.  proprietary hardware, the Ceres workstation. Oberon for OS/2, however, is not 
  76.  an operating system but runs as a PM application. The screen output of the 
  77.  Ceres workstation is shown in a PM window.  This window can be controlled by 
  78.  the Presentation Manager, i.e. it can be moved or iconized. 
  79.  
  80.  The size and position of the Oberon Window can be optionally specified on the 
  81.  command line. If the size is not specified the Oberon window covers the entire 
  82.  screen area. If the position is not specified the Oberon window is centered on 
  83.  the screen. The size of the virtual Ceres screen is the size of the client 
  84.  area of the Oberon window, which is currently not exactly the size specified 
  85.  on the command line, as that size specifies the size of the frame window and 
  86.  not the one of the client window (subject to change in future releases) 
  87.  
  88.  The Oberon user interface was designed with a large bitmap display in mind. 
  89.  Oberon works best with a display of 1024 by 768 pixels or bigger. However, 
  90.  Oberon for OS/2  will run with any size display, but working with VGA 
  91.  resolution is far from optimum. 
  92.  
  93.  
  94. ΓòÉΓòÉΓòÉ 3.1. Bug Reports ΓòÉΓòÉΓòÉ
  95.  
  96. Serious problems or bug reports can be mailed to 
  97.  
  98.      daniel.steiner@cch.cerberus.ch 
  99.  
  100.  or sent to 
  101.  
  102.  
  103.      Daniel Steiner 
  104.      Meienbergstr. 81 
  105.      CH-8645 Jona 
  106.      Switzerland. 
  107.  
  108.  Please try to be as specific and concise as possible, since this makes 
  109.  processing of messages faster and easier. You should also mention the version 
  110.  number and host operating system you use (just copy the line that appears in 
  111.  the log viewer when Oberon is started). Please allow one week for answers. 
  112.  
  113.  
  114. ΓòÉΓòÉΓòÉ 4. Installation and Startup ΓòÉΓòÉΓòÉ
  115.  
  116. See the Readme file for instructions on how to install Oberon. 
  117.  
  118. The floppy disk contains three files oberonv4.exe, install.cmd and Readme.Txt. 
  119. See Readme.Txt for further instructions. 
  120.  
  121.  
  122. ΓòÉΓòÉΓòÉ 4.1. Starting Oberon ΓòÉΓòÉΓòÉ
  123.  
  124. Oberon for OS/2 is started with the following command syntax: 
  125.  
  126.  oberon [-h heapsize-in-MB] [-x module command] [-b bootfile-name] [-i 
  127. ini-file] [-t] [-l logfile] [-g <geometry>] 
  128.  
  129. where 
  130.  
  131.      o heapsize-in-MB is the size of the allocated Oberon heap in megabytes 
  132.        (default: -h 4) 
  133.  
  134.      o the command module.command is executed (default: -x Oberon Loop) 
  135.  
  136.      o bootfile-name is the name of the boot file (default: -b Oberon.Hex) 
  137.        The boot file must be in the same directory as oberon.exe. 
  138.  
  139.      o ini-file is the name of a file that is used to store configuration data 
  140.        (default: oberon.ini), see description of module Registry. 
  141.  
  142.        If no explicit path is given, the file is searched for in the following 
  143.        directories: (1) current directory, (2) OS/2 system directory, (3) in 
  144.        all directories listed in the PATH environment variable. 
  145.  
  146.      o Option t means "no title bar". The Oberon window is maximized such that 
  147.        the client area of the window covers the whole screen, i.e. the title 
  148.        bar of the window is not visible. 
  149.  
  150.      o logfile is the name of a file that receives all output written with the 
  151.        module Console. Console is a useful module for low-level debug output. 
  152.        If this option is not specified, output from module Console is lost. 
  153.  
  154.      o geometry has the following syntax and specifies the size and optional 
  155.        position of the Oberon window: 
  156.  
  157.        <width>X<height>[X<x-pos>X<y-pos>]. (e.g. -g 800x600) 
  158.  
  159.        If the size is specified the Oberon window can no longer be resized or 
  160.        maximized. 
  161.        If the size is specified but not the position than the Oberon window 
  162.        will be centered on screen. 
  163.  
  164.  
  165. ΓòÉΓòÉΓòÉ 4.2. Quitting Oberon ΓòÉΓòÉΓòÉ
  166.  
  167. If an Oberon command does not terminate (e.g. hangs in a never-ending loop), 
  168. there is currently no way of stopping that command. The Oberon application must 
  169. be "killed" and restarted. It is planned that future versions support the 
  170. cancellation of a command with Ctrl-C. 
  171.  
  172. The command System.Quit terminates the Oberon application. This is the normal 
  173. way to exit Oberon for OS/2. Alternatively, the application can be terminated 
  174. by choosing "Close" in the application window's system menu or by using the 
  175. keyboard accelerator Alt-F4. 
  176.  
  177.  
  178. ΓòÉΓòÉΓòÉ 5. Release Notes ΓòÉΓòÉΓòÉ
  179.  
  180. Restrictions and Known Bugs in this Release 
  181.  
  182.      o Vectorfonts are not yet fully supported. 
  183.      o Only rudimentary printer support. 
  184.      o Printing causes trouble on some configurations. 
  185.      o Modules Diskette, Backup, and Tar are not yet implemented. 
  186.      o The Oberon window should be the topmost window on the screen, or 
  187.        scrolling may not work correctly. 
  188.      o A display mode with 16 or 256 colors is required. 
  189.      o color palette manager is not supported. 
  190.  
  191.  Changes since Release 4.0-0.6a 
  192.  
  193.      o new installation script 
  194.      o the size of executable has been reduced 
  195.      o new method for object finalisation 
  196.      o rudimentary support for printing to any OS/2 default printer 
  197.      o rudimentary support for Oberon GPI fonts 
  198.      o $filedir.$$$ is now written back to disk which increases loading of the 
  199.        system. 
  200.      o DOS filename may be upto 32 characters long. 
  201.  
  202.  Changes since Release 4.0-0.6 
  203.  
  204.      o option -t is now implementated. 
  205.      o About menu is now located in the system menu. 
  206.      o system.exe has been renamed in OBERONV4.EXE. 
  207.      o better vector font support. 
  208.      o Compiler.Compile supports now option which effects all modules compiled 
  209.        but must specified only once after the command Compiler.Compile on the 
  210.        same command line. 
  211.      o Compiler and loader support now identifiers with length upto 40 
  212.        characters. 
  213.  
  214.  Changes since Release 4.0-0.5 
  215.  
  216.      o rudimentary support for OS/2 vectorfonts have been included. 
  217.      o unregistered version have now the words "unregistered version" in the 
  218.        window title. 
  219.      o the major and minor number of the operating system is written to the log 
  220.        window 
  221.      o UserGuide and Oberon-2 report are no longer available as Oberon 
  222.        documents. They are now included in OS/2 INF format. 
  223.      o size and position of the Oberon window may be specified on the command 
  224.        line. 
  225.      o when compiling ASCII-files the compiler displays errors and warnings in 
  226.        the format (col/line) 
  227.      o new compiler option /w to suppress warnings. 
  228.      o new compiler option /e to enable language extension (default off) 
  229.  
  230.         - underscore in identifier allowed. 
  231.         - identifier may have a length upto 40 characters. 
  232.  
  233.      o Display, PM32 and Fonts have been improved. 
  234.  
  235.  Changes since Release 4.0-0.4 
  236.  
  237.      o Kernel.SetClock is now implemented 
  238.      o changing drives from within OS2oberon is now possible 
  239.  
  240.  Changes since Release 4.0-0.3 
  241.  
  242.      o Analyzer is now part of the distribution 
  243.      o some bugs in OBERON.EXE has been corrected 
  244.      o Implementation of Display1 is now included 
  245.      o Bugs in FileDir and Files corrected 
  246.      o Status of OS2oberon has been changed to Shareware. 
  247.  
  248.  Changes since Release 4.0-0.1 
  249.  
  250.      o OS/2 system calling linkage is used to access OS/2 functions 
  251.      o New command System.CreateDirectory added. 
  252.      o System.Directory writes full path names of files instead of just the 
  253.        file names. 
  254.      o The file translation table $filedir.$$$ will not be deleted in a 
  255.        directory that has the read-only attribute set. This allows for network 
  256.        installations of Oberon for Windows where the system files reside on a 
  257.        server directory that may be shared. 
  258.      o Small changes in appearance and handling of parcs. See Edit.Guide.Text. 
  259.      o A service for permanent storage of configuration data has been 
  260.        introduced, named the Registry. The registry essentially is an interface 
  261.        to an "ini-file" that can be specified at system startup (option -i, see 
  262.        above). The registry can be modified using the commands System.Set and 
  263.        System.Get. 
  264.      o The environment variable OBERONDIRS is no longer supported. Instead, the 
  265.        search path for Oberon files is contained in the registry. Use the 
  266.        command 
  267.  
  268.         System.Set System Directories := "Directory1;Directory2;..." ~ 
  269.  
  270.        instead to specify additional directories in the search path. The Oberon 
  271.        directory, it's subdirectory "Fonts" and the current working directory 
  272.        do not have to be listed, they are searched automatically (see 
  273.        description of Registry below). 
  274.      o The environment variable FONTSUBST is no longer supported. The 
  275.        information about printer font substitution is contained in the 
  276.        registry. Use the command 
  277.  
  278.         System.Set System PrinterFonts := "Font1 Substitution1; Font2 
  279.        Substitution 2;...." ~ 
  280.  
  281.        instead to specify printer font substitution. 
  282.      o Font substitution on the screen is stored in the registry as well, see 
  283.        Font Substitution on the Screen below. 
  284.      o The following text files can contain predefined menu-texts that are used 
  285.        instead of the standard menu string if present: Edit.Menu.Text 
  286.        (Edit.Open), Log.Menu.Text (System.OpenLog), System.Menu.Text 
  287.        (System.Open), and Hex.Menu.Text (Hex.Open). Note: The texts in these 
  288.        files must not contain elements or font styles that are larger than the 
  289.        default system font, otherwise the menu text is clipped away and will 
  290.        not be visible. 
  291.      o A simple but convenient utility named StatusViewer displays the name of 
  292.        the current directory in it's title bar. See StatusViewer.Mod. 
  293.  
  294.  
  295. ΓòÉΓòÉΓòÉ 6. Differences to the Original Oberon ΓòÉΓòÉΓòÉ
  296.  
  297. This section is about the differences to the original Oberon system from a 
  298. user's point of view. The original Oberon system is described in The Oberon 
  299. System by M. Reiser. The differences in module interfaces are described in the 
  300. next section. 
  301.  
  302.  
  303. ΓòÉΓòÉΓòÉ 6.1. Printing ΓòÉΓòÉΓòÉ
  304.  
  305. In the original Oberon on Ceres, the Commands Edit.Print, Draw.Print etc. 
  306. accept a server name as the first Parameter (usually called Pluto). The 
  307. server's printer is then used to print the document. Oberon for OS/2 supports 
  308. now printing to the default printer object with the restriction that some 
  309. special fonts (eg. Elektra) currently are not supported. 
  310.  
  311. The Oberon fonts Syntax and Syndor are not available as printer fonts. They are 
  312. substituted by Postscript fonts instead. By default, both fonts are substituted 
  313. by the Postscript font Helvetica. This default mapping can be changed by 
  314. defining the Key PrinterFonts in the registry section System (see below). 
  315.  
  316.  
  317. ΓòÉΓòÉΓòÉ 6.2. Registry ΓòÉΓòÉΓòÉ
  318.  
  319. Oberon for OS/2 has a mechanism to store configuration data permanently. The 
  320. permanent storage is called the registry. The registry is structured 
  321. hierarchically into sections and keys. Each section can be thought of as a 
  322. dictionary that associates a value with a key. Module Registry provides a 
  323. program interface to the registry (see below). The user interface is embodied 
  324. in the commands System.Set and System.Get. 
  325.  
  326. System.Set ( ^ | section key := [ value ] ) 
  327.  
  328. Enter a section and key in the registry and associate a value with it. If a 
  329. value is not given, the entry for the given section and key is removed from the 
  330. registry. Section, key, and value may be either names or strings. 
  331.  
  332. System.Get ( ^ | section [ key ] ) 
  333.  
  334. Inspect the value of a given section and key in the registry. If a key is not 
  335. given, all keys contained in section are listed together with their associated 
  336. values. Section and key may be either names or strings. 
  337.  
  338. Currently, there are two registry sections supported by Oberon for OS/2. The 
  339. section System contains system-specific settings. The section Fontmap contains 
  340. a list of screen fonts that are to be substituted by other fonts (see Font 
  341. Substitution below). 
  342.  
  343. The keys of section System are 
  344.  
  345.      Key                 Value 
  346.      DefaultFont         A font name. The font will be used as the default font 
  347.                          the next time Oberon is started. 
  348.                          E.g.: System.Set System DefaultFont := Syntax8.Scn.Fnt 
  349.      PrinterFonts        A list of pairs of the form Font Substitution { ";" 
  350.                          Font Substitution }. When printing a document, the 
  351.                          fonts of the family Font are substituted with the font 
  352.                          Substitution. Changes will take effect upon the next 
  353.                          time Oberon is started. See the description of Module 
  354.                          Printer for more details. 
  355.                          E.g.: If your system has a Postscript font Helvetica 
  356.                          installed, the command System.Set System PrinterFonts 
  357.                          := "Syntax Helvetica" will configure Oberon to print 
  358.                          Syntax fonts as Helvetica. 
  359.      Directories         A list of absolute path names, separated by 
  360.                          semicolons. When Oberon opens a file and no explicit 
  361.                          path is given, it looks first in the current 
  362.                          directory, then in the Oberon directory, and then in 
  363.                          all the directories listed here. 
  364.  
  365.  
  366. ΓòÉΓòÉΓòÉ 6.3. Font Substitution on the Screen ΓòÉΓòÉΓòÉ
  367.  
  368. The Oberon for OS/2 font subsystem allows the user to map specific fonts onto 
  369. different fonts. It may for example be convenient to map Syntax10.Scn.Fnt to 
  370. Syntax8.Scn.Fnt on VGA displays. The font mapping table is stored in the 
  371. registry. If a section Fontmap is present, the keys of the section are 
  372. interpreted as font names and the associated values are the substituted fonts. 
  373. You can for example substitute Syntax8.Scn.Fnt for Syntax10.Scn.Fnt by issuing 
  374. the command 
  375.  
  376. System.Set Fontmap Syntax10.Scn.Fnt := Syntax8.Scn.Fnt~. 
  377.  
  378. The mapping will be stored permanently in the registry. You must restart Oberon 
  379. for OS/2 for the changes to become effective. To inspect all mappings, execute 
  380. the command 
  381.  
  382. System.Get Fontmap ~. 
  383.  
  384. To remove a particular mapping, execute 
  385.  
  386. System.Set Fontmap Syntax10.Scn.Fnt := ~. 
  387.  
  388. See the description of commands System.Set and System.Get for detailed 
  389. information. 
  390.  
  391. Note: This feature is supposed to mend problems on displays with small 
  392. resolutions like VGA screens, where one could substitute the font 
  393. Syntax10.Scn.Fnt by Syntax8.Scn.Fnt, for example. The fonts are substituted on 
  394. the display only, but not when printed. Moreover, the metrics of parcs are not 
  395. affected by font substitution. 
  396.  
  397. It is even possible to use Postscript font for substitution. For example 
  398.  
  399. System.Set Fontmap Syntax10.Scn.Fnt := Times New Roman10.Scn.Fnt~. 
  400.  
  401.  
  402. ΓòÉΓòÉΓòÉ 6.4. Oberon Files vs. DOS Files ΓòÉΓòÉΓòÉ
  403.  
  404. Oberon for OS/2 distinguishes between Oberon files and DOS files. In order to 
  405. support 32 character file names, Oberon files contain a small header of 
  406. information containing their file name (see the description of module Files for 
  407. further details). DOS files do not contain such a header. 
  408.  
  409. To specify a DOS file, you must prepend an ampersand character "&" to the file 
  410. name proper. For example, to edit the DOS ASCII test file c:\autoexec.bat, you 
  411. will have to execute the command Edit.Open c:\&autoexec.bat . To store the file 
  412. in plain ascii format, mark the viewer containing the text (its name in the 
  413. title bar is c:\&autoexec.bat) and execute EditTools.StoreAscii *. 
  414.  
  415. Files from Oberon implementations other than Oberon for OS/2 or Oberon for 
  416. Windows or DOSOberon do not contain that header and are treated like DOS files. 
  417. To "import" such files into Oberon for OS/2, you would execute 
  418.  
  419. System.CopyFiles Drive:\Path\&Filename.Ext => Drive:\Path\Filename.Ext ~. 
  420.  
  421. This inserts the header into the file. To remove the header, just execute 
  422.  
  423. System.CopyFiles Drive:\Path\Filename.Ext => Drive:\Path\&Filename.Ext ~. 
  424.  
  425. If you copy Oberon files to floppy with the OS/2 or DOS copy command and read 
  426. them in on a non-OS/2 Oberon, the file will still contain a header and you will 
  427. see it when you open the file with Edit.Open (the header starts with the 
  428. letters "oB"). To copy files on floppy correctly, use the command 
  429. System.CopyFiles and specify A or B as the destination drive. For the sake of 
  430. convenience, file names on floppies are always interpreted as DOS files, it is 
  431. not necessary to prepend the "&" character. 
  432.  
  433. When files are stored on floppy disks using either the Backup or Tar utility, 
  434. the header is ommitted. The files can be read by any other Oberon 
  435. implementation that supports these tools. 
  436.  
  437.  
  438. ΓòÉΓòÉΓòÉ 6.5. Support for Multiple Directories ΓòÉΓòÉΓòÉ
  439.  
  440. The original Oberon implementation uses a flat file directory, i.e. does not 
  441. support subdirectories. Oberon for OS/2 allows to open files from any 
  442. directory, including floppy disks. For each directory that contains Oberon 
  443. files, a translation table is built that associates 32 character Oberon file 
  444. name to DOS file names. These directories containing Oberon files must be 
  445. specified in the registry section System under the key name Directories. When 
  446. Oberon opens a file and no explicit path is given, it looks first in the 
  447. current directory and then in all the directories listed under the registry 
  448. entry System Directories. 
  449.  
  450. The translation tables are stored in the respective directories. The file name 
  451. for the tables is "$FILEDIR.$$$". If ever the translation table becomes 
  452. inconsistent, it is sufficient to delete these files and restart Oberon. The 
  453. tables will be built up from scratch using the information found in the file 
  454. headers of Oberon files. See the description of module Files for further 
  455. details. 
  456.  
  457. Directories on floppy disks have no translation table and the files in such a 
  458. directory do not have a header. When storing a file on floppy, the file name is 
  459. simply truncated to conform to the "eight plus three" naming convention. Only 
  460. paths that start with "A:" or "B:" are supposed to refer to a floppy disk. 
  461.  
  462.  
  463. ΓòÉΓòÉΓòÉ 6.6. Support for systems with two-button mice ΓòÉΓòÉΓòÉ
  464.  
  465. For PCs with a two button mouse, the Ctrl-key of the PC keyboard emulates the 
  466. middle mouse button. The first time Oberon for OS/2 detects a 
  467. middle-mouse-key-down event, this emulation is disabled. 
  468.  
  469.  
  470. ΓòÉΓòÉΓòÉ 7. Module Reference ΓòÉΓòÉΓòÉ
  471.  
  472. This section describes differences to the standard modules described in The 
  473. Oberon System by M. Reiser. It also describes modules unique to Oberon for 
  474. OS/2. 
  475.  
  476.  
  477. ΓòÉΓòÉΓòÉ 7.1. Standard Modules ΓòÉΓòÉΓòÉ
  478.  
  479.  
  480. ΓòÉΓòÉΓòÉ 7.1.1. Files ΓòÉΓòÉΓòÉ
  481.  
  482. The interface to the file system is identical with that of the original Oberon 
  483. system. However, due to the underlying operating system, some differences need 
  484. to be discussed. 
  485.  
  486. Oberon file names may be as long as 32 characters and may contain more than one 
  487. dot, whereas on the DOS FAT file system names are restricted to the well-known 
  488. eight plus three characters with a single dot between the file name and the 
  489. file name extension. Although OS/2 supports longer filename and filenames with 
  490. more than one dot on HPFS partition it does not support case-sensitive 
  491. filenames and therefore Oberon for OS/2 still uses the same mapping for HPFS 
  492. partition as for DOS FAT file system. 
  493.  
  494. In order to be compatible with other Oberon implementations, Oberon for OS/2 
  495. maintains a translation table that maps Oberon file names to DOS file names. 
  496. This table is kept in memory while Oberon is running and is written to disk 
  497. when the application is exited. Since this table is of extreme importance for 
  498. the proper working of Oberon, it is stored again in a distributed manner: Files 
  499. that are created by Oberon have a 34 byte header stored 'inside' the file 
  500. itself. The header consists of a two byte tag and the 32 byte Oberon file name. 
  501. When the cached translation table is not found at system startup, or if the 
  502. cached table is found to be inconsistent, it is newly built up by scanning all 
  503. files in the directory and extracting the Oberon file name from their headers. 
  504. This header is never 'seen' from inside Oberon. 
  505.  
  506. Sometimes one would like to create regular OS/2 (or DOS) files or open files 
  507. that have not been created by Oberon for OS/2. To distinguish OS/2 files from 
  508. Oberon files, an ampersand character "&" is prefixed to the file name proper. 
  509. The ampersand itself is not part of the file name, but just directs the Files 
  510. module to treat the file as a DOS file, i.e. expecting no header when the file 
  511. is opened and writing no header when the file is registered. For example, the 
  512. autoexec.bat file could be opened for editing with the command Edit.Open 
  513. c:\&autoexec.bat and stored with the command EditTools.WriteAscii *. 
  514.  
  515. When files are stored on floppy disks using either the Backup or Tar utility, 
  516. the header is ommitted. The files can be read by any other Oberon 
  517. implementation that supports these tools. 
  518.  
  519. This way of integrating OS/2 files into Oberon for OS/2 has proven to be most 
  520. convenient. However, it has some drawbacks, too. Files created on Oberon for 
  521. OS/2 are not binary compatible with files created on other implementations of 
  522. Oberon. E.g. files created on a Unix implementation that are downloaded 
  523. electronically to either a FAT or HPFS directory do not have a header. They 
  524. must be opened with the ampersand character prefixed to their file name. It is 
  525. possible to "import" such files with a simple trick: use the command 
  526. System.CopyFiles &Filename => Filename ~ to prepend a header to the file. From 
  527. this point, it is possible to open the file without the "&" prefix. 
  528.  
  529. Files created with DosOberon or Oberon for Windows do have the same kind of 
  530. header and can be opened without the prefix. 
  531.  
  532. Oberon for OS/2 allows to open files from any directory, including floppy 
  533. disks. Translation tables for directories are built on demand. For faster 
  534. startup, some translation tables are cached on disk when Oberon is exited. 
  535. These directories must be specified in the Registry. When Oberon starts up, it 
  536. builds the translation table for these directories, using the cached tables if 
  537. available. After the system has successfully booted, the cached translation 
  538. tables are destroyed, such that after a system crash they are rebuilt from 
  539. scratch. Upon normal exit of Oberon, the translation tables of all directories 
  540. specified in the Registry are written to disk. The files that contain this 
  541. table have the name "$FILEDIR.$$$". If ever the translation table becomes 
  542. inconsistent, it is sufficient to delete these files and restart Oberon. 
  543.  
  544. Directories on floppy disks have no translation table and the files in such a 
  545. directory do not have a header. When storing a file on floppy, the file name is 
  546. simply truncated to conform to the "eight plus three" naming convention. Only 
  547. paths that start with "A:" or "B:" are supposed to refer to a floppy disk. 
  548.  
  549. Following a summary of differences to the original Oberon implementation: 
  550.  
  551.   Open (name: ARRAY OF CHAR): File;
  552.   New (name: ARRAY OF CHAR): File;
  553.   Delete (name: ARRAY OF CHAR; VAR res: INTEGER);
  554.   Rename (old, new: ARRAY OF CHAR; VAR res: INTEGER);
  555.  
  556. Filenames may consist of a drive specifier, a path, and a file name. An 
  557. ampersand character previous to the first character of the file name specifies 
  558. a OS/2 file. Rename fails if either the drive specifier or the path of old and 
  559. new do not match. 
  560.  
  561.  
  562. ΓòÉΓòÉΓòÉ 7.1.2. Display ΓòÉΓòÉΓòÉ
  563.  
  564.  o Procedures DefCC, DefCP, DrawCX, FadeCX, InitCC, InitCP, SetCursor are not 
  565.    implemented. 
  566.  
  567.  o Procedure SetMode inspects only set element {2}, i.e. SetMode can only be 
  568.    used to switch between black-on-white and white-on-black mode 
  569.  
  570.  o Map returns 0 (the display bitmap is not directly accessible). 
  571.  
  572.  o The cursor is controlled by OS/2 Presentation manager and is still active 
  573.    when a command is executing. 
  574.  
  575.  o NewPattern: image[1] defines the bottom line of the pattern. image[0] is not 
  576.    used. 
  577.  
  578.  o CopyPatternC, ReplPatternC, ReplConstC, CopyBlockC, and DotC take a frame 
  579.    parameter F against which the display output is clipped. ReplPatternC also 
  580.    takes a "pin point" or "pattern origin" xp, yp to align pattern output. 
  581.  
  582.  
  583. ΓòÉΓòÉΓòÉ 7.1.3. Input ΓòÉΓòÉΓòÉ
  584.  
  585.  o Input.Time() returns 'ticks' in increments of 1/Input.TimeUnit th of seconds 
  586.    (1/1000th of seconds). 
  587.  
  588.  
  589. ΓòÉΓòÉΓòÉ 7.1.4. Special Keys ΓòÉΓòÉΓòÉ
  590.  
  591. Some special keys on the Ceres keyboard are mapped to the PC keyboard as 
  592. follows: 
  593.  
  594. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  595. ΓöéPC Keyboard   Ceres Keyboard   Function                           Γöé
  596. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  597. ΓöéBackspace     DEL                                                 Γöé
  598. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  599. ΓöéDelete        -                delete right in text frames        Γöé
  600. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  601. ΓöéF1            SETUP            mark viewer                        Γöé
  602. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  603. ΓöéF9            PF1              white on black background          Γöé
  604. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  605. ΓöéF10           PF2              minimize window if no titlebar is  Γöé
  606. Γöé                               visible                            Γöé
  607. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  608. ΓöéF11           PF3              black on white background          Γöé
  609. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  610. ΓöéF12           -                set default color palette          Γöé
  611. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  612. ΓöéCtrl-Enter    LINE FEED        line feed                          Γöé
  613. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  614. ΓöéHome          -                redraw screen                      Γöé
  615. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  616. ΓöéPause         BREAK                                               Γöé
  617. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  618. ΓöéShift-Pause   Shift-Break                                         Γöé
  619. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  620. ΓöéF2            No Scroll        refresh in Draw                    Γöé
  621. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  622. ΓöéCtrl-F2       Ctrl-No Scroll                                      Γöé
  623. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  624.  
  625. For systems with a two button mouse, the Ctrl-key of the PC keyboard emulates 
  626. the middle mouse button. 
  627.  
  628.  
  629. ΓòÉΓòÉΓòÉ 7.1.5. Fonts ΓòÉΓòÉΓòÉ
  630.  
  631. Postscript fonts are supported in a transparent way. Fonts.This(name) also 
  632. loads Postscript fonts. name has the following syntax: 
  633.  
  634. name = Family size styles ".Scn.Fnt" 
  635.  
  636. E.g., Fonts.This("Helvetica43bi.Scn.Fnt") returns the font "Helvetica" in 
  637. boldface and italics and in 43 pixels size. 
  638.  
  639.  
  640. ΓòÉΓòÉΓòÉ 7.1.6. Texts ΓòÉΓòÉΓòÉ
  641.  
  642. Some minor changes have been done in the Scanner to allow for reading of file 
  643. names with drive and path specifiers. The syntax of legal tokens of class Name 
  644. is: 
  645.  
  646.   Name = ["&"] NamePart { "." NamePart }.
  647.   NamePart = (letter | "." | "\") { letter | digit | "\"
  648.              | ":" | "&" }.
  649.  
  650. A single "&" character is of class Char. 
  651.  
  652.  
  653. ΓòÉΓòÉΓòÉ 7.1.7. Printer ΓòÉΓòÉΓòÉ
  654.  
  655. The Oberon fonts Syntax and Syndor are not available as printer fonts. They are 
  656. substituted by Postscript fonts instead. By default, both fonts are substituted 
  657. by the Postscript font Helvetica. This default mapping can be changed by 
  658. defining the Key PrinterFonts in the registry section System. PageHeight and 
  659. PageWidth are only valid after a call to Printer.Open. They specify the page 
  660. size in 300 dpi pixels. UseListFont(name) has no effect. GetChar(font, ch, dx, 
  661. x, y, w, h) returns the printer metrics of a character in 300 dpi. In 
  662. Open(name, user, password), the  parameters are ignored. In Page(nofcopies), 
  663. the parameter is ignored. Exactly one page is sent to the printer. 
  664.  
  665.  
  666. ΓòÉΓòÉΓòÉ 7.1.8. System ΓòÉΓòÉΓòÉ
  667.  
  668. The command Quit leaves Oberon. The command ChangeDirectory ( "^" | newdir ) 
  669. changes the current directory. The command CreateDirectory ( "^" | newDir ) 
  670. creates a new directory newDir. The command Directory ([path]template["/d"] | 
  671. "^") accepts a path specifier in front of the template. All Oberon files in the 
  672. directory viewer are listed alphabetically, followed by the DOS files. Option 
  673. /d also lists the DOS file name of an Oberon file. 
  674.  
  675. System.Open looks for a text with name System.Menu.Text. If it is available, it 
  676. is displayed in the menu frame instead of the standard menu text. This way it 
  677. is possible to configure the menu string shown in viewers opened with 
  678. System.Open, e.g. the menu can also contain text elements like PopupElems or 
  679. MenuElems. Note: the hight of the menu frame is not adapted to the text 
  680. displayed, i.e. if the text is too large to fit into the menu frame, it is 
  681. clipped and only a black bar is visible. 
  682.  
  683. The commands System.Set and System.Get serve to store values in the registry 
  684. and to inspect the contents of the registry 
  685.  
  686.  
  687. ΓòÉΓòÉΓòÉ 7.1.9. Types ΓòÉΓòÉΓòÉ
  688.  
  689.  o Interface module to the type system. Necessary to implement persistent 
  690.    objects. 
  691.  
  692.  
  693. ΓòÉΓòÉΓòÉ 7.1.10. Oberon ΓòÉΓòÉΓòÉ
  694.  
  695.  o Time() returns Input.Time() 
  696.  
  697.  
  698. ΓòÉΓòÉΓòÉ 7.1.11. Kernel ΓòÉΓòÉΓòÉ
  699.  
  700. GC may be called at any time, since local pointers on the stack are used as 
  701. roots during the mark phase of the garbage collection. 
  702.  
  703.      Function                      Explanation 
  704.      LoadLibrary(name: ARRAY OF CHAR) 
  705.                                    loads the library (DLL) with name. Returns a 
  706.                                    handle to the library that can be used 
  707.                                    calling GetAdr. Calls the OS/2 API function 
  708.                                    DosLoadModule. 
  709.  
  710.      FreeLibrary(lib: LONGINT)     calls the OS/2 API function DosFreeModule. 
  711.  
  712.      GetAdr(lib: LONGINT; symbol: ARRAY OF CHAR; VAR adr: LONGINT) 
  713.                                    returns in adr the address of the exported 
  714.                                    name symbol in the library given by lib. 
  715.                                    Calls the OS/2 API function 
  716.                                    DosQueryProcAddr. 
  717.  
  718.      GetAdrByOrd(lib: LONGINT; ordinal: LONGINT; VAR adr: LONGINT) 
  719.                                    returns in adr the address of the exported 
  720.                                    ordinal symbol in the library given by lib. 
  721.                                    Calls the OS/2 API function 
  722.                                    DosQueryProcAddr. 
  723.  
  724.  
  725. ΓòÉΓòÉΓòÉ 7.2. Modules unique to Oberon for OS/2 ΓòÉΓòÉΓòÉ
  726.  
  727.  
  728. ΓòÉΓòÉΓòÉ 7.2.1. Registry ΓòÉΓòÉΓòÉ
  729.  
  730. Module Registry is an interface to the initialization file specified at startup 
  731. time. It serves to store configuration data for the system and applications. 
  732. The registry is structured hierarchically into sections and keys. Sections may 
  733. contain an arbitrary number of keys. To each (section, key) pair, a value is 
  734. associated. 
  735.  
  736.      DEFINITION Registry; 
  737.      CONST 
  738.       Done = 0; NotFound = 2; RegistryNotFound = 1; 
  739.      TYPE EntryHandler = PROCEDURE (key, value: ARRAY OF CHAR); 
  740.  
  741.      VAR res: INTEGER; 
  742.           res = NotFound: 
  743.                either a section or a key specified is not contained in the 
  744.                registry. 
  745.           res = RegistryNotFound: 
  746.                no initialization file was given at startup time. 
  747.  
  748.      PROCEDURE Get (section, key: ARRAY OF CHAR; VAR value: ARRAY OF CHAR); 
  749.           Retrieve the value associated with a (section, key) pair. 
  750.      PROCEDURE Set (section, key, value: ARRAY OF CHAR); 
  751.           Associate a value with the pair (section, key) and store it in the 
  752.           registry. 
  753.           If value = "", an existing value is deleted and the (section, key) 
  754.           pair is removed from the registry. 
  755.      PROCEDURE Enumerate (section: ARRAY OF CHAR; handler: EntryHandler); 
  756.           Enumerate all keys and their associated value for a given section. 
  757.           For each key found in the section, the handler is called 
  758.      END Registry. 
  759.  
  760.  The user interface to the registry is provided by means of the commands 
  761.  System.Set and System.Get. 
  762.  
  763.  
  764. ΓòÉΓòÉΓòÉ 7.2.2. Configuration ΓòÉΓòÉΓòÉ
  765.  
  766. At system startup, the module System searches a module Configuration and loads 
  767. it if present. The module is loaded before any viewers have been opened. If the 
  768. module is present, the system does not open the log viewer and system tool. 
  769. Instead, the module body of Configuration is responsible to initialize the 
  770. display. The module can furthermore do any custom initializations. If a module 
  771. Configuration can not be found, the log viewer and system tool are opened 
  772. normally. A minimal configuration module would therefore be: 
  773.  
  774.      MODULE Configuration; 
  775.      IMPORT Oberon, MenuViewers, TextFrames; 
  776.      CONST 
  777.        LogMenu = "System.Close ...."; 
  778.        StandardMenu = "System.Close ...."; 
  779.      VAR 
  780.        X, Y: INTEGER; V: MenuViewers.Viewer; 
  781.      BEGIN 
  782.        Oberon.AllocateSystemViewer(0, X, Y); 
  783.        V := MenuViewers.New(TextFrames.NewMenu("System.Log", LogMenu), 
  784.                TextFrames.NewText(Oberon.Log, 0), TextFrames.menuH, X, Y); 
  785.        Oberon.AllocateSystemViewer(0, X, Y); 
  786.        V := MenuViewers.New( 
  787.                TextFrames.NewMenu("System.Tool", StandardMenu), 
  788.                TextFrames.NewText(TextFrames.Text("System.Tool"), 0), 
  789.                TextFrames.menuH, X, Y); 
  790.      END Configuration. 
  791.  
  792.  
  793. ΓòÉΓòÉΓòÉ 8. The Compiler ΓòÉΓòÉΓòÉ
  794.  
  795. The Compiler implements Oberon-2 as defined in the language report. This 
  796. section describes system specific topics. 
  797.  
  798.  
  799. ΓòÉΓòÉΓòÉ 8.1. Data Representation and Alignment ΓòÉΓòÉΓòÉ
  800.  
  801. The following table shows the internal representation of data types in 
  802. OS2Oberon: 
  803.  
  804.      data type           internal representation 
  805.      SHORTINT            1 Byte signed 
  806.      CHAR, BYTE          1 Byte unsigned 
  807.      BOOLEAN             1 Byte unsigned  (0 = FALSE, 1 = TRUE) 
  808.      INTEGER             2 Bytes signed 
  809.      LONGINT             4 Bytes signed 
  810.      SET                 4 Bytes ({0} = 1) 
  811.      PointerType         4 Bytes (NIL = 0) 
  812.      ProcedureType       4 Bytes (NIL = 0) 
  813.      REAL                4 Bytes IEEE-format (754-1985) 
  814.      LONGREAL            8 Bytes IEEE-format (754-1985) 
  815.  
  816.  Variable addresses, record field offsets and record sizes are always aligned 
  817.  to a multiple of the type's base. The base of an unstructured type is the 
  818.  type's size, the base of an array is the base of the element type and the base 
  819.  of a record type is the maximum base of its field types. 
  820.  
  821.  
  822. ΓòÉΓòÉΓòÉ 8.2. Module SYSTEM ΓòÉΓòÉΓòÉ
  823.  
  824. The module SYSTEM provides some low level operations specific to this 
  825. particular Oberon implementation. It provides the following functions and 
  826. procedures. v stands for a variable, a, n and x for expressions, and T for a 
  827. type. 
  828.  
  829.      Function procedures: 
  830.  
  831.      Name      Argument types    Result type   Meaning 
  832.  
  833.      ADR(v)     v: any type      LONGINT     address of variable v 
  834.      BIT(a, n)   a: LONGINT      BOOLEAN     n IN Mem[a] 
  835.             n: integer type           (if a MOD 4 = 0 & 0 <= n <= 31) 
  836.      CC(n)     n: integer constant  BOOLEAN     icc n (if n < 16) 
  837.                               fcc n MOD 16 (if n >= 16) 
  838.      LSH(x, n)   x, n: integer type  LONGINT     logical shift 
  839.      ROT(x, n)   x: integer type,   type of x    rotation 
  840.             BYTE, CHAR 
  841.      VAL(T, x)   T, x: any type    T        x interpreted as of type T 
  842.  
  843.  The function SIZE remained in the language as defined in [1]. SIZE(T) returns 
  844.  the number of bytes required for type T. Note, SYSTEM.VAL neither produces any 
  845.  code for conversions nor performs any compile time checks but forces the 
  846.  compiler to interpret the type of an expression differently. 
  847.  
  848.      Proper procedures: 
  849.  
  850.      Name        Argument types      Meaning 
  851.  
  852.      GET(a, v)     a: LONGINT        v := Mem[a] 
  853.               v: any basic type 
  854.      GETREG(n, v)    n: integer constant   v := *   see below 
  855.               v: any basic type 
  856.      PUT(a, x)     a: LONGINT        Mem[a] := x 
  857.               x: any basic type 
  858.      PUTREG(n, x)    n: integer constant   * := x   see below 
  859.               x: any basic type 
  860.      MOVE(a0, a1, n)  a0,a1: integer type   move n bytes from address a0 to a1 
  861.               n: integer type, n> 0 
  862.      NEW(v, n)     v: any pointer type   allocate storage block of n bytes and 
  863.               n: integer type     assign its address to v 
  864.  
  865.  The numbering of the registers in GETREG(n, v) and PUTREG(n, v) is defined in 
  866.  the table below. The size of v determines the size of the register, i.e. 
  867.  GETREG(0, ch), where ch is of type CHAR, reads the contents of AL. If v is a 
  868.  constant, the register is taken to be 32 bits. The function CC(n) is not 
  869.  implemented. 
  870.  
  871.      Numbering of 80x86 registers: 
  872.  
  873.      n  register      n   register 
  874.  
  875.      0  EAX / AX / AL   4   ESP / SP / AH 
  876.      1  ECX / CX / CL   5   EBP / BP / CH 
  877.      2  EDX / DX / DL   6   ESI / SI / DH 
  878.      3  EBX / BX / BL   7   EDI / DI / DL 
  879.  
  880.  Types: 
  881.  
  882.  No representation of values is specified. Instead, certain compatibility rules 
  883.  with other types are given: 
  884.  
  885.  BYTE: 
  886.  
  887.   1. BYTE is compatible with CHAR and SHORTINT. 
  888.  
  889.   2. if a formal VAR-parameter is of type ARRAY OF BYTE, then the corresponding 
  890.      actual parameter may be of any type. 
  891.  
  892.  PTR: 
  893.  
  894.   1. variables of type PTR are compatible with any pointer type. 
  895.  
  896.   2. VAR-parameter of type PTR contain the static type of the actual parameter 
  897.      upon procedure entry (to allow for runtime type checks). 
  898.  
  899.  Code procedures 
  900.  
  901.  The compiler allows for inline expanded "assembly" procedures. The syntax for 
  902.  code procedures is 
  903.  
  904.   PROCEDURE "-" ident [FormalPars] { byte } ";" 
  905.  
  906.  When the compiler translates a call to a code procedure, the parameters are 
  907.  evaluated and pushed onto the stack (from right to left). The last parameter 
  908.  in the parameter list can be addressed with 0[ESP]. The bytes specified are 
  909.  then inlined, and finally the stack pointer is reset. Code procedures must not 
  910.  be exported. 
  911.  
  912.  
  913. ΓòÉΓòÉΓòÉ 9. Calling OS/2 API and DLL functions from Oberon Programs ΓòÉΓòÉΓòÉ
  914.  
  915. It is possible to call any 32-bit functions in a DLL or most of OS/2 API 
  916. functions from within Oberon. The following section gives a short overview. 
  917.  
  918. Currently the kernel does not support multithreading. 
  919.  
  920. More details are only available for registered users 
  921.  
  922.  
  923. ΓòÉΓòÉΓòÉ 9.1. Overview ΓòÉΓòÉΓòÉ
  924.  
  925. This is done by declaring a procedure variable for each API function to call 
  926. and initialising it with the address of the respective API function. The 
  927. address is determined by calling the procedure Kernel.GetAdr. The following 
  928. example demonstrates how this is done: 
  929.  
  930.  VAR 
  931.   lib: LONGINT; 
  932.   MyBox: PROCEDURE [1](owner, text, title, style: LONGINT): LONGINT; 
  933.   ... 
  934.  BEGIN 
  935.   lib := Kernel.LoadLibrary("mydll"); (* get handle to mydll.dll *) 
  936.   Kernel.GetAdr(lib, "MyProc", SYSTEM.VAL(LONGINT, MyBox)); (* get address of 
  937. MyProc *) 
  938.   ... 
  939.  
  940. Kernel.LoadLibrary calls the OS/2 DosLoadModule API function, and Kernel.GetAdr 
  941. essentially calls DosQueryProcAddr. With this simple mechanism it is possible 
  942. to call any API function in any DLL. 
  943.  
  944. A few things must be paid attention to. 
  945.  
  946.  o All parameters must have 32-bit size. 
  947.  o Return values are 32-bit. 
  948.  o For most OS/2 API it is necessary to specify OS/2 system calling convention 
  949.    (PROCEDURE[1]). 
  950.  
  951.  Special care must be taken when using Oberon procedures as callback functions. 
  952.  The OS/2 calling convention specifies that EBX, ESI and EDI are callee-saved 
  953.  registers and that the called procedure must not cleanup the stack. The Oberon 
  954.  compiler saves no registers, thus the first action in a callback procedure 
  955.  must be to save these three registers, and to restore them just before the 
  956.  procedure returns. E.g.: 
  957.  
  958.   PROCEDURE + MyCallback (...); 
  959.   VAR EBX, ESI, EDI: LONGINT; 
  960.   BEGIN 
  961.    SYSTEM.GETREG(3, EBX); SYSTEM.GETREG(6, ESI); SYSTEM.GETREG(7, EDI); 
  962.    .... 
  963.    SYSTEM.PUTREG(3, EBX); SYSTEM.PUTREG(6, ESI); SYSTEM.PUTREG(7, EDI); 
  964.   END MyCallback; 
  965.  
  966.  If you need to access the OS/2 API you should have the OS/2 programming 
  967.  toolkit and sufficient OS/2 programming knowledge. 
  968.  
  969.      MORE INFORMATION ARE AVAILABLE ONLY FOR REGISTERED USERS 
  970.  
  971.  
  972. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  973.  
  974. Oberon and Oberon for Windows are trademarks of Eidgen╨ñssische Technische 
  975. Hochschule, Z╨ærich 
  976.  
  977.  
  978. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  979.  
  980. OS/2 and Warp are registered trademark of International Business Machines 
  981. Corporation. 
  982.  
  983.  
  984. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  985.  
  986. Addison Wesley, 1992, ISBN 0_201_56543_9
  987.  
  988.  Tutorial for the Oberon programming language and concise language reference. 
  989.  
  990.  
  991. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  992.  
  993. Springer-Verlag, 1993, ISBN 3-540-56411-X
  994.  
  995.  Covers the basic concepts of OOP, shows typical application patterns, and 
  996. gives useful design hints. Presents the design and implementation of an 
  997. object-oriented window system with an integrated text and graphics editor. 
  998. Contains Oberon-2 language definition. 
  999.  
  1000.  
  1001. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  1002.  
  1003. Springer-Verlag, 1993, ISBN 3-540-55690-7
  1004.  
  1005.  German version of Object-Oriented Programming in Oberon-2 
  1006.  
  1007.  
  1008. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  1009.  
  1010. Addison Wesley, 1991, ISBN 0_201_54422_9
  1011.  
  1012.  User manual for the Oberon programming environment and reference for the 
  1013. standard module library. Includes working examples of how to extend the Oberon 
  1014. system with new commands and frame classes. 
  1015.  
  1016.  
  1017. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  1018.  
  1019. Addison Wesley, 1992, ISBN 0_201_54428_8
  1020.  
  1021.  Program listings with explanations for the whole Oberon system, including the 
  1022. compiler for NS32000.