Search found 377 matches

Return to advanced search

Re: Disabling Interrupts

The code generated by SYSTEM.PUT(irqICER, irqSCBit) is: mov r10, irqICER mov r9, irqSCBit str r9, [r10] or, depending on the value of irqICER, it could be: ldr r10, [pc+offset] <Const:0> mov r9, irqSCBit str r9, [r10] ... <Const:0> irqICER As far as I know that is about as optimal as it could be wit...
by cfbsoftware
Tue Apr 16, 2019 12:43 pm
 
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Disabling Interrupts
Replies: 1
Views: 8

Re: Setting Baud rates in Serial

Thank you for your example.
bscholte wrote:I am sure one can make a nice iteration to calculate these values,

Yes indeed you can. Look for the Astrobe example called CalcBaudRate in your Astrobe Examples\General folder for an Oberon algorithm to calculate these values.
by cfbsoftware
Tue Apr 16, 2019 11:24 am
 
Forum: Cortex-M3
Topic: Setting Baud rates in Serial
Replies: 1
Views: 4

Re: Type Test Limitations in Leaf Procedures?

Thank you for your report. On first sight it appears to be a limitation which I was not aware of. Note that the record parameters in these examples should be VAR parameters, but the problem still remains.

Leaf procedures with POINTER parameters appear to be OK.
by cfbsoftware
Mon Apr 15, 2019 12:11 pm
 
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Type Test Limitations in Leaf Procedures?
Replies: 1
Views: 12

Re: Overhead of Record Parameters

The call to P3 is the most efficient (just). The calls to P1 and P2 generate identical code for the reason you state.
by cfbsoftware
Mon Apr 15, 2019 11:43 am
 
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Overhead of Record Parameters
Replies: 1
Views: 10

Re: Extended Type Formal VAR Parameters

That all looks good to me. In this case the assignment: t := t1 is equivalent to: t.i := t1.i t2.k remains unchanged. If you wanted to modify k as well you would need to use an assignment with a type guard (and a type test to be on the safe side) within the procedure P1. PROCEDURE P1(VAR t: T1); VAR...
by cfbsoftware
Mon Apr 15, 2019 8:48 am
 
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Extended Type Formal VAR Parameters
Replies: 5
Views: 36

Re: Type Tests on Elements of Arrays

Good questions! It took some investigation and discussions with colleagues to satisfy myself that the CASE statements in your example are behaving as designed. The EBNF syntax for the CASE statement in the Oberon report, where the subject of a CASE statement is an expression, only applies to the num...
by cfbsoftware
Sun Apr 14, 2019 11:09 am
 
Forum: Bug Reports
Topic: Type Tests on Elements of Arrays
Replies: 1
Views: 15

Re: Extended Type Formal VAR Parameters

I can recommend an excellent reference to help you to understand the reasoning behind these sorts of details. It is the book titled Object-Oriented Programming in Oberon-2 by Hanspeter Mössenböck. It is available as PDF with the friendly permission of Springer-Verlag from : http://ssw.jku.at/Researc...
by cfbsoftware
Sun Apr 14, 2019 4:16 am
 
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Extended Type Formal VAR Parameters
Replies: 5
Views: 36

Re: Extended Type Formal VAR Parameters

Refer to section 10.1. Formal parameters in the Oberon Language Report. In particular: The type of each formal parameter is specified in the parameter list. For variable parameters, it must be identical to the corresponding actual parameter's type, except in the case of a record, where it must be a ...
by cfbsoftware
Sat Apr 13, 2019 5:02 am
 
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Extended Type Formal VAR Parameters
Replies: 5
Views: 36

Type Tests on Elements of Arrays

Here's a loosely related follow-up issue I ran into today: MODULE M1; TYPE T1 = POINTER TO T1Desc; T1Desc = RECORD END; VAR ta: ARRAY 4 OF T1; t: T1; BEGIN CASE ta[0] OF (* 1: does not compile: invalid type *) T1: END; IF ta[0] IS T1 THEN END; (* 2: does not compile: compiler error; reg stack not e...
by cfbsoftware
Sat Apr 13, 2019 4:25 am
 
Forum: Bug Reports
Topic: Type Tests on Elements of Arrays
Replies: 1
Views: 15

Re: Type Extensions Across Modules

Oh, that's a bit disappointing. In my book, being able to extend a base type without the need to change this base type scores high. Again, is this a limitation of the language or the compiler? There appears to be some misunderstanding. You can certainly extend a base type without the need to change...
by cfbsoftware
Sat Apr 13, 2019 4:14 am
 
Forum: Astrobe for ARM Cortex-M3, M4 and M7
Topic: Type Extensions Across Modules
Replies: 4
Views: 44
Next

Return to advanced search

cron