Search found 443 matches

by cfbsoftware
Mon Jan 30, 2012 9:23 pm
Forum: Oberon Language
Topic: Exported pointer variables
Replies: 15
Views: 90327

Re: Exported pointer variables

That is how it is intended to behave. A read-only record is just that. It cannot be modified outside of the module where it is declared - neither by an attempt to modify the entire record in a single assignment, or by attempts to modify elements of the record with separate assignments. t1 is differe...
by cfbsoftware
Sat Jan 28, 2012 6:44 am
Forum: Astrobe for ARM Cortex-M0, M3, M4 and M7
Topic: Oberon running on Cortex-M3
Replies: 4
Views: 33675

Oberon running on Cortex-M3

This afternoon we have successfully used Astrobe to develop and run our first Oberon program (Blinker, of course!) on an ARM Cortex-M3 MCU. The Embedded Artists LPC1343 you can see in the photo may well be the smallest dev board that an Oberon program has ever run on: http://www.astrobe.com/images/L...
by cfbsoftware
Mon Dec 12, 2011 11:55 am
Forum: Astrobe for ARM Cortex-M0, M3, M4 and M7
Topic: Trap in MAU
Replies: 6
Views: 45846

Re: Trap in MAU

NEW only ever allocates memory - it never frees any memory. When you use NEW on a local dynamic array as in your example the memory is allocated on the stack (not the heap), just like the memory used by other local variables. When you exit from the procedure the memory used by the dynamic array is r...
by cfbsoftware
Thu Dec 08, 2011 9:30 pm
Forum: Astrobe for ARM Cortex-M0, M3, M4 and M7
Topic: Trap in MAU
Replies: 6
Views: 45846

Re: Trap in MAU

The identification of the error codes are in Section 8.1 Runtime Error Codes in the Oberon for Microcontrollers document. Trap 11 is a heap overflow. If you suspect you are not always going to have enough free memory on your MCU when using NEW to allocate heap space you should use the MAU functions ...
by cfbsoftware
Thu Oct 27, 2011 12:22 pm
Forum: Oberon Language
Topic: Oberon 2011: CASE Statements
Replies: 1
Views: 13823

Re: Oberon 2011: CASE Statements

Consider the following example which could be used to map a set of strings to a corresponding integer code: PROCEDURE FindKeyword*(id: ARRAY OF CHAR; VAR sym: INTEGER); BEGIN sym := ident; IF id = "ARRAY" THEN sym := array ELSIF id = "BEGIN" THEN sym := begin ELSIF id = "BY" THEN sym := by ELSIF id ...
by cfbsoftware
Mon Oct 10, 2011 7:25 am
Forum: Getting Started
Topic: Interrupt for check if smth come with UART
Replies: 1
Views: 17831

Re: Interrupt for check if smth come with UART

I don't know whether it answers your specific question but there is a sample of interrupt driven UART code in the topic "Buffered UART Routines":

viewtopic.php?f=2&t=74
by cfbsoftware
Sat Oct 08, 2011 12:06 pm
Forum: Oberon Language
Topic: Oberon 2011: CASE Statements
Replies: 1
Views: 13823

Oberon 2011: CASE Statements

Single-character strings can now be used as CASE labels as well as INTEGER constants. When the labels are strings the selector is a CHAR. The 2011 Oberon Language Report does not explicitly specify implementation details of CASE statements such as: What is the valid range of values for CASE labels? ...
by cfbsoftware
Fri Sep 30, 2011 11:30 pm
Forum: Oberon Language
Topic: Further revision of Oberon-07
Replies: 26
Views: 168471

Re: Further revision of Oberon-07

If you nominate a character as an escape character e.g. "\" then you also have to specify how to represent that escape character in the situations where you want to use it as literal character, not an escape. Typically this is done by doubling the character e.g. "\\". Unfortunately in computing cont...
by cfbsoftware
Sat Sep 24, 2011 1:21 pm
Forum: Oberon Language
Topic: CASE statement
Replies: 1
Views: 14419

Re: CASE statement

The maximum value that you can use as a label in a CASE statement in the Astrobe implementation of Oberon is 255. Refer to the Implementation Limits section in the Astrobe documentation for more information. If you really want to use a CASE statement you could rewrite your example as: lcdOrientation...
by cfbsoftware
Fri Sep 23, 2011 8:19 am
Forum: Oberon Language
Topic: Further revision of Oberon-07
Replies: 26
Views: 168471

Re: Further revision of Oberon-07

Correct. "" is not a single-character string so it cannot be assigned to a CHAR variable. Single-character strings are interpreted in either of two ways in the Astrobe Oberon 2011 compiler depending on whether the context is a CHAR or an ARRAY OF CHAR. The following example illustrates the two diffe...