OWBasic

from Wikipedia, the free encyclopedia
OWBasic v5.20 in the simulator

OWBasic is a compiler / interpreter for the PocketViewer from CASIO .

OWBasic was originally developed as a simple BASIC dialect, but it quickly became more extensive. In the meantime, OWBasic is a fully-fledged alternative to programming the PV with the SDK and the C programming language  ; The current version also includes many functions from higher programming languages ​​such as B. Pointer, and low-level programming possible. The current version is v5.25.

OWBasic was developed by Wolfgang Ortmann from 2000. After Wolfgang Ortmann stopped further development in 2004, AUDACIA Software continued work on OWBasic.

OWBasic is an open source project under the GPL .

Advantages and disadvantages

If you write and execute an OWBasic program , code that can not be executed directly by the processor is generated. Rather, the OWBasic compiler generates an intermediate code that is executed by the interpreter . This results in various advantages and disadvantages:

disadvantage

  • Performance. OWBasic programs run a little slower than programs that can be executed directly by the processor . Normally, however, this is not a problem, as the PV offers more than enough performance for the normal tasks of an application. OWBasic is therefore not suitable only for computationally intensive applications such as 3D games.
  • Limited control. All PV system-specific functions that the SDK offers can be used in an add-in. In OWBasic, however, only those functions can be used that are implemented as OWBasic functions. Interventions in the system, such as B. intercepting interrupts or hooking system procedures, can only be done in add-ins. However, most of the system commands and the options created by various system interventions (timer, asynchronous touch query, packed add-ins, etc.) are now also available in OWBasic.

advantages

  • Mobility. While add-ins for the PV have to be developed, debugged and compiled on the PC, this can also be done directly on the PV for OWBasic programs .
  • Small size. Due to the memory structure of the PV, an add-in occupies at least 64 KB (this limit can be reduced to 16 KB using PVAddInManager), and the PV can only store a limited number of add-ins. Since OWBasic programs are saved as memo entries, they do not occupy the short add-in but the data memory of the PV . Normally, an OWBasic program requires significantly less memory space than a corresponding add-in, and the 64 KB or 16 KB limit is also omitted, so that a large number of OWBasic programs can be stored on the PV . The number is only limited by the data memory.
  • Safety. If a runtime error occurs in an add-in , such as division by zero, the PV may crash and must be laboriously restarted by removing the batteries or pressing the reset button. If such an error occurs in an OWBasic program, OWBasic displays an error message and returns to the PV menu. Errors such as access to an array element with an incorrect index, file operations with incorrect file pointers etc. are also not acknowledged in OWBasic with undefined behavior and possibly a program crash, but with an error message.
  • Portability. Since 2003, the PV-S1600 has been a PV with a completely new interior; In contrast to the previous models, it has a Hitachi SH-3 32-bit processor (old models: NEC V30MZ, 16-bit, 80186-compatible). The SH-3 processor has a different architecture than the NEC V30MZ, which is why add-ins for the old models cannot be executed on the PV-S1600. If you want to write a program for both PV series, you have to take into account all the differences in the memory model, the bit arrangement, etc. when programming, and the program has to be compiled twice and debugged individually for both PVs if necessary. Since OWBasic programs are compiled to bytecode and are therefore not tailored to a specific processor type, they can be executed on both PV series without changing the source code .

documentation

As with most BASIC dialects, learning OWBasic is quite easy. At www.audacia-software.de there is a German and English language command reference in HTML format and in PocketReferencer format for transfer to the PV.

Web links