Syntax10.Scn.Fnt ParcElems Alloc Syntax14b.Scn.Fnt Syntax8b.Scn.Fnt Syntax12.Scn.Fnt Syntax12b.Scn.Fnt Syntax8.Scn.Fnt Syntax10i.Scn.Fnt Syntax12i.Scn.Fnt Syntax10b.Scn.Fnt Oberon for AmigaTM User's Guide V4 Release 1.3 (31 May 1996) Stefan H_M Ludwig, Claudio Nieder & Ralf Degner Copyright 1991- 96, ETH Z Introduction Oberon for AmigaTM is an implementation of OberonTM for Commodore Amiga Systems. Both the programming language Oberon_2 and the Oberon System have been implemented. For a complete description of the Language and of the System, one should read the following books: N. Wirth and M. Reiser: Programming in Oberon. Steps beyond Pascal and Modula_2. Addison Wesley, 1992, ISBN 0_201_56543_9. Tutorial for the Oberon programming language and concise language reference. M. Reiser: The Oberon System. User Guide and Programmer's Manual. Addison Wesley, 1991, ISBN 0_201_54422_9. User manual for the programming environment and reference for the standard module library. N. Wirth and J. Gutknecht: Project Oberon. The Design of an Operating System and Compiler. Addison Wesley, 1992, ISBN 0_201_54428_8. Program listings with explanations for the whole Oberon system, including the compiler for NS32000. ssenb ck: Object_Oriented Programming in Oberon_2 Springer_Verlag, 1993, ISBN 0_387_56411_X. Principles and applications of object_oriented programming with examples in Oberon_2. The technical report 160 by H. M ssenb ck, Differences between Oberon and Oberon_2, The Programming Language Oberon_2, is recommended too. It is present as on_line documentation: Edit.Open Oberon2.Differences.Text Edit.Open Oberon2.Report.Text The following short tutorial describes the differences to the original implementation from a user's point of view. Oberon for Amiga runs as a single Amiga process on any system with at least a 68020 processor featuring Amiga OS 2.0 or newer. It needs an floating point unit to use REALs. It uses an own screen as display. The dimensions of the user track and the system track are automatically defined when starting Oberon for Amiga and cannot be changed until the Oberon process terminates. Installation Oberon for Amiga is distributed as an lha archive (see the accompaning readme file for a description of the contents). Decompress the archive where ever you want the Oberon for Amiga directory. Open the directory and click to the Oberon icon to start. If you do not own a floating point unit you need the Oberon-NonFPU archive, too. Printing When asked to print (for example with Edit.Print PSPrinter * ), Oberon will generate a file in the T: directory. It will then call a program or script with the name OberonPrint with the printer name set with System.PrinterName as first, the name of the file as second and the name of the Oberon printer driver (only PSPrinter available at the moment) as third parameter. It's up to OberonPrint to print and delete the file afterwards. Depending on your printer you can either send the file directly to PRT: , or use a interpreter, e.g. HWG post.lirary, or simply copy it anywhere. The Script directory contains a sample script, which will copy the file. Of course OberonPrint has to be somewhere in the Amiga DOS command search path or in the script directory. Starting Oberon for Amiga Oberon for Amiga is started from a shell window using the script oberon or from the workbench using the icon. The syntax is: oberon [[CMD=COMMAND] module.command] where - the command module.command is executed (default: CMD Oberon.Loop) Note: The options above are not yet supported When started for the first time, Oberon for Amiga will ask for the preferred screen mode and resolution. This information will be stored in the environment variable Oberon4Amiga. The command System.ChangeMode can be used to change the value at a later time. If Oberon for Amiga gets out of control (e.g. because of a looping command), press Ctrl_C in the terminal window (do not forget to set the focus first) or doubleclick on the KillOberon icon. The Amiga OS has problems if a process is interrupted, while it is waiting for a message reply. To avoid problems, Ctrl_C refuses to work when it detects a possible critical situation. System.Quit terminates the oberon process. It is the normal way to leave Oberon for Amiga. Amiga related commands System.AnsiInput System.OberonInput System.TwoButtonMouse System.ThreeButtonMouse System.ShowMode System.ChangeMode System.OberonLoop System.AmigaLoop System.PrinterName System.ChangePri Differences to the Original Oberon The differences are due to the underlying hardware and software. Here follows a list of modules containing differences: System New commands: - Quit to leave Oberon for Amiga - Execute command to execute a (non_interactive) shell command - ChangeDirectory newdir to change the working directory - ChangeMode to get a screen mode requester for changing the screen mode. You need an asl.library with version 38 or higher for the requester. Note: The change will only take effect after a restart of Oberon for Amiga. - OberonLoop makes the main loop Oberon friendly. It will run with a low task priority and will never give back the control to Amiga-OS. So Oberon background tasks can eat all calculation power not used by other tasks. - AmigaLoop makes the main loop Amiga-OS friendly. Amiga-OS will call the main loop 50 times per second, so background tasks are only called 50 times per second, too. The Oberon task sleeps if the task is waiting for the next call. - PictPrintThresh sets the threshold Note: Printing of PictElems is very, very slow. So only use small PictElems in your Texts. Amiga* Amiga specific modules, by which the Oberon System gains access to the Amiga libraries. Display Imports Amiga*. Procedures DefCC, DefCP, DrawCX, FadeCX, InitCC, InitCP, SetCursor are not implemented. Procedure SetMode has no effect. The display bitmap is not directly accessible (Map returns 0). Pattern format is different, use Display.NewPattern to define a pattern. image[1] defines the bottom line of the pattern.image[0] is reserved. Display1 Module exporting additional drawing procedures. Input Input events are buffered. Special keys: F1 mark viewer Esc escape F3 break F5 Hot-Key for EditKeys (see EditKeys.Text ) The F-keys 6 to 10 and the HELP-key are not needed for a normal System V4. In O4A it is possible to define a procedure for every key that will be called if the key is pressed. Modify Configuration.Mod file in directory configuration to change the default settings The default settings are: F6 Clipboard.Show F7 Copy SnapShot of O4A Screen to Clipboard F8 Prog.Guide.Text F9 ObTris - A Tetris like Game F10 Mines - A Minesweeper HELP Welcome.Text O4A supports the Amiga HotKeys for the Clipboard: Right-Amiga-C Copy selection to Amiga Clipboard Right-Amiga-V Paste Amiga Clipboard at caret Right-Amiga-X Cut selection to Amiga Clipboard Input.Time() returns the real time in milliseconds since Oberon for Amiga has been started. Files Exports ChangeDirectory. Types New interface module to the type system. Necessary to implement persistent objects. Oberon Time() returns Input.Time() Kernel GC may be called at any time, since local pointers (on the stack or in registers) are used as roots during the mark phase of the garbage collection. It is not possible to set parameters of the serial device from Oberon. Use the WB Serial-Prefs-Tool to do this bevor you start the Serial Device. Because of this the parameters of V24.Start and the procedures FlowCntlCTS, FlowCntlDTR, FlowCntlOff and FlowCntlXOn have no effect. New command: Open to serial device for Terminal International Characters The option character is "\" instead of "/". This allows to use "/" in file names (Amiga path names). For questions and bug reports, please write to The Secretary Institut f r Computersysteme ETH Zentrum Tel: (+41_1) 632 7311 CH_8092 Z rich Fax: (+41_1) 261 5389 Switzerland e_mail: oberon@inf.ethz.ch Ralf Degner Schillerstr. 16 29525 Uelzen Germany e-mail: degner@pallas.amp.uni-hannover.de