Search found 170 matches

by gray
Fri Feb 04, 2022 9:07 am
Forum: Astrobe for FPGA RISC5
Topic: SYSTEM.LDREG
Replies: 4
Views: 178680

SYSTEM.LDREG

The Astrobe RISC5 compiler creates erroneous code in the following case: PROCEDURE P; VAR i: INTEGER; BEGIN i := 0; SYSTEM.LDREG(i, 13) END P; The procedure compiles without error message, but the code created is: 4400000DH MOV r4, r0, 13 Evidently, the target register number must be a constant, as ...
by gray
Tue Jan 18, 2022 1:08 pm
Forum: Astrobe for FPGA RISC5
Topic: RISC5 Oberon Compiler Source Code
Replies: 1
Views: 66171

Re: RISC5 Oberon Compiler Source Code

Wow. Thanks! Also for CPIde.
by gray
Sat Jan 15, 2022 8:01 am
Forum: Astrobe for FPGA RISC5
Topic: Spurious Imports
Replies: 5
Views: 115209

Re: Spurious Imports

Thanks! The indirectly imported modules do count as regards the max allowed 15 imported modules, which we can check in the BL opcode of an external procedure call, where the module number is encoded in a 4 bit value (hence the restriction of 15, zero is not a valid module number for BL instructions)...
by gray
Sat Jan 01, 2022 9:53 am
Forum: Astrobe for FPGA RISC5
Topic: Spurious Imports
Replies: 5
Views: 115209

Re: Spurious Imports

OK, thanks, I have read up. Does the Astrobe compiler more or less work like the Project Oberon one in that area? In particular the import and export of symbols (reading and writing of symbol files, ORB. Import and ORB.Export) and creating object files (ORG.Close)? The way the symbol table is built ...
by gray
Thu Dec 30, 2021 11:39 am
Forum: Astrobe for FPGA RISC5
Topic: Spurious Imports
Replies: 5
Views: 115209

Spurious Imports

In the process of debugging an inexplicable error during the system start-up sequence I started to look into 'rsc' files (yes, I know), namely the list of imported modules. I have realised that the list of imports in the 'rsc' files sometimes contains additional modules that are not in the IMPORT li...
by gray
Thu Dec 30, 2021 10:56 am
Forum: Archive
Topic: System.Exception in RISC5 Compiler
Replies: 0
Views: 35397

System.Exception in RISC5 Compiler

Test case: MODULE M1; CONST OK := M2.OK; END M1. Note the missing IMPORT statement. With the v8.0 compiler: OR Compiler 17.10.2021 compiling M1 2 14 Error: = ? 2 18 Error: undef System.Exception: CASE-trap: selector = 54 at ORP.ORP.factor(Item& x) at ORP.ORP.term(Item& x) at ORP.ORP.SimpleExpression...
by gray
Thu Oct 28, 2021 5:21 am
Forum: Astrobe for FPGA RISC5
Topic: System.Date (v8.0)
Replies: 1
Views: 63743

Re: System.Date (v8.0)

Checking for the correctness of the date and time actually set is also useful as we actually can set the clock even with incorrect parameters. Here are two example cases with incorrect parameters where the clock gets set nonetheless. Typos happen. :( System.Date 28 10 n21 10 20 30 System.Date 28 10 ...
by gray
Mon Oct 25, 2021 9:19 am
Forum: Astrobe for FPGA RISC5
Topic: System.Date (v8.0)
Replies: 1
Views: 63743

System.Date (v8.0)

The new System.Date procedure in v8.0: PROCEDURE Date*; (* ... *) BEGIN (* ... *) IF S.class = Texts.Int THEN (*set clock*) (* ... *) IF (day >= 1) & (day <= 31) & (mo >= 1) & (mo <= 12) & (yr >= 0) & (yr <= 63) THEN dt := ((((yr*16 + mo)*32 + day)*32 + hr)*64 + min)*64 + sec; Kernel.SetClock(dt) EN...
by gray
Mon Oct 25, 2021 8:31 am
Forum: Astrobe for FPGA RISC5
Topic: ASSERT & Error.Mod (version 8.0)
Replies: 1
Views: 62527

ASSERT & Error.Mod (version 8.0)

Astrobe for RISC v8.0 provides a new module Error.Mod. It is used, for example, in Math.Mod: PROCEDURE Sqrt*(x: REAL): REAL; (* ... *) BEGIN ASSERT(x >= 0.0, Error.input); (* ... *) END Sqrt; That is, to provide an error code for ASSERT via a second parameter (which could be any integer value, does ...
by gray
Wed Jun 02, 2021 4:39 am
Forum: Archive
Topic: Oberon.Call Can Leave 'res' Undefined
Replies: 0
Views: 2311

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...