Search found 171 matches

by gray
Wed Jun 02, 2021 4:39 am
Forum: Archive
Topic: Oberon.Call Can Leave 'res' Undefined
Replies: 0
Views: 3536

Oberon.Call Can Leave 'res' Undefined

This applies to Embedded Oberon. Oberon.Call: PROCEDURE Call* (name: ARRAY OF CHAR; VAR res: INTEGER); (* .. *) BEGIN i := 0; ch := name[0]; WHILE (ch # ".") & (ch # 0X) DO Mname[i] := ch; INC(i); ch := name[i] END ; IF ch = "." THEN (* .. *) END END Call; Oberon.Call has a code path that leaves 're...
by gray
Wed Jun 02, 2021 4:28 am
Forum: Astrobe for FPGA RISC5
Topic: Self-unloading With Modules.Free?
Replies: 2
Views: 81915

Re: Self-unloading With Modules.Free?

Thanks for your information and insights. Your general words of caution are useful in any case, as in case "self-freeing" would not work, the unloading could easily be delegated to an extended loader process/task that would free the first program before loading the subsequent one. My current design ...
by gray
Tue Jun 01, 2021 9:23 am
Forum: Astrobe for FPGA RISC5
Topic: Self-unloading With Modules.Free?
Replies: 2
Views: 81915

Self-unloading With Modules.Free?

Is there any reason why, or a situation when, this would not work? MODULE M; IMPORT Modules, Oberon; PROCEDURE Run*; BEGIN Modules.Free("M"); Oberon.Collect(0) END Run; END M. That is, a module unloading itself. The reasoning here is that Modules.Free just sets the module name to the empty string, a...
by gray
Sun May 16, 2021 6:07 am
Forum: Archive
Topic: Oberon.Loop
Replies: 0
Views: 3360

Oberon.Loop

The following applies to both Project Oberon and Embedded Oberon. Maybe I am preaching to the choir here, and everyone has made the fix on their systems already, it must be a known issue. I am documenting it here with the suggestion to consider the fix for Embedded Oberon, which already uses a subst...
by gray
Mon May 03, 2021 6:54 am
Forum: Astrobe for FPGA RISC5
Topic: SYSTEM.PUT Transfer Width
Replies: 0
Views: 91846

SYSTEM.PUT Transfer Width

With the Astrobe compiler, SYSTEM.PUT(adr, val) transfers either eight or 32 bits, depending on the type of 'val'. But what if 'val' is an expression? I had this procedure interfacing a device in the FPGA hardware. PROCEDURE SetSignal*(dev: INTEGER; sig: BYTE); BEGIN SYSTEM.PUT(Adr, LSL(sig, DataShi...
by gray
Sat Apr 17, 2021 6:48 am
Forum: Astrobe for FPGA RISC5
Topic: Configurable Stack Size
Replies: 0
Views: 88948

Configurable Stack Size

As mentioned in here , my first real use of creating my own boot file was to make the stack size configurable. To tie up that loose end, here's how. It should basically apply to Project Oberon as well, but I'll focus on Embedded Oberon. The stack size is hard-coded to 32 kB (8000H) in two places. Ke...
by gray
Wed Apr 14, 2021 11:16 am
Forum: Astrobe for FPGA RISC5
Topic: Creating Boot Files for EO with Astrobe for RISC5
Replies: 1
Views: 70140

Creating Boot Files for EO with Astrobe for RISC5

The following applies to Embedded Oberon, running on an FPGA board, using an SD card for storage. To venture into making changes to the inner core of the Embedded Oberon (EO) system, that is, modifying modules Files, FileDir, Modules, or Kernel, it's necessary to create a new boot file to reflect th...
by gray
Wed Apr 14, 2021 12:51 am
Forum: Astrobe for FPGA RISC5
Topic: Tools for backing up a Project Oberon SD card image
Replies: 1
Views: 63657

Re: Tools for backing up a Project Oberon SD card image

I also use Win32 Disk Imager and the 'dd' command line tool. Here's my backup approach. I use Disk Imager to initially create an SD card to boot Embedded Oberon, using the disk image as downloaded from the Astrobe website, eg. 'Embedded200812.img'. Thereafter, I have an SD card with a 256 MB FAT par...
by gray
Sun Apr 11, 2021 8:05 am
Forum: Archive
Topic: System.Date
Replies: 0
Views: 3743

System.Date

Embedded Oberon's System.Date runs these checks on input data to set the clock: IF (day >= 1) & (day < 31) & (mo >= 1) & (mo <= 12) & (yr >= 2000) & (yr <= 2099) THEN However, the year gets encoded into six bits with a 32 bit INTEGER, ie. only allowing years up to 2063. This can easily be checked by...
by gray
Sun Apr 11, 2021 7:36 am
Forum: Archive
Topic: RTC.Active
Replies: 0
Views: 3697

RTC.Active

I think there are two issues with RTC.Active(). Issue 1) dt0 := Clock(); ok := dt0 > 0; On 1 Jan 2032, Clock() will start to return negative values, so the RTC will not be installed thereafter. If no external device is connected to the SPI device, Clock() will read, via SPI, seven 0FFH bytes, as the...