Search found 12 matches

by Alexander Shiryaev
Sat Dec 06, 2014 5:04 pm
Forum: Archive
Topic: Oberon Competition - Win a $US50 Amazon Gift Voucher
Replies: 5
Views: 90355

Re: Oberon Competition - Win a $US50 Amazon Gift Voucher

Code: Select all

MODULE Quiz;

  VAR a1*, a2*: ARRAY 1000 OF INTEGER;
      
  PROCEDURE* Init*;
    VAR i: INTEGER;
  BEGIN i := 1000;
    REPEAT DEC(i);
      a1[i] := i;
      a2[i] := i
    UNTIL i = 0
  END Init;

END Quiz.
by Alexander Shiryaev
Sun Jul 13, 2014 5:01 pm
Forum: LPC2000
Topic: Buffered UART Routines
Replies: 5
Views: 12890

Re: Buffered UART Routines

For three years, I found some errors and corrected them. I updated my previous post.
by Alexander Shiryaev
Mon Sep 30, 2013 8:09 am
Forum: LPC2000
Topic: CRC-16 CCITT calculation (8408H polynom)
Replies: 0
Views: 3472

CRC-16 CCITT calculation (8408H polynom)

MODULE CRC16CCITT8408; (* A. V. Shiryaev, 2013.09 http://ru.wikipedia.org/wiki/%D0%A6%D0%B8%D0%BA%D0%BB%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9_%D0%B8%D0%B7%D0%B1%D1%8B%D1%82%D0%BE%D1%87%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%B4 *) IMPORT SYSTEM; CONST init* = 0FFFFH; (* Name: CRC-16 CCITT Poly: $8408...
by Alexander Shiryaev
Wed Jan 16, 2013 5:07 pm
Forum: Getting Started
Topic: Ethernet code
Replies: 7
Views: 163793

Re: Ethernet code

If you need Ethernet, it is not difficult. See EasyWEB sources for example.
If you need TCP, it is more complicated.
by Alexander Shiryaev
Mon Oct 29, 2012 2:04 pm
Forum: Cortex-M0, M3, M4 and M7
Topic: Generating a MD5-Hash
Replies: 3
Views: 98962

Re: Generating a MD5-Hash

However, I believe that 4GLCoder deliberatly didn't use NEW to avoid exhausting the heap (there is no automatic garbage collection). POINTER TO RECORD not required here. Context may be of RECORD type. I updated my previous post. As you can see, Context not marked for export, but the following test ...
by Alexander Shiryaev
Mon Oct 29, 2012 2:55 am
Forum: Cortex-M0, M3, M4 and M7
Topic: Generating a MD5-Hash
Replies: 3
Views: 98962

Re: Generating a MD5-Hash

There is my translation. MODULE MD5; (** portable *) (* ejz *) IMPORT SYSTEM; (* ETH Oberon, Copyright 2001 ETH Zuerich Institut fuer Computersysteme, ETH Zentrum, CH-8092 Zuerich. Refer to the "General ETH Oberon System Source License" contract available at: http://www.oberon.ethz.ch/ *) (** The MD...
by Alexander Shiryaev
Wed Jun 20, 2012 6:03 pm
Forum: LPC2000
Topic: LPC2378 MCI driver
Replies: 3
Views: 7172

Re: LPC2378 MCI driver

Sample program: check declared card capacity correspond to real. CardFakeTest.mod: MODULE CardFakeTest; (* A. V. Shiryaev, 2012.06 NOTE: information stored on the card will be lost! *) IMPORT Main, SYSTEM, LPC, MCI, Out, Timer, CheckCard; VAR res: INTEGER; s0: INTEGER; (* 0 -- fast check, 1 -- compl...
by Alexander Shiryaev
Tue Jun 19, 2012 10:03 pm
Forum: LPC2000
Topic: LPC2378 MCI driver
Replies: 3
Views: 7172

Re: LPC2378 MCI driver

Some refinement. DMA controller has some "feature". On intensive peripherial access (such as REPEAT UNTIL SYSTEM.BIT(LPC.U0LSR, 5), Timer.MSecDelay etc.) after StartWrite/StartRead (i.e. when MCI.Busy()), DMA controller does not have time to work. This leads to MCI errors txUnderrun/rxOverrun. In th...
by Alexander Shiryaev
Sun Jun 10, 2012 9:04 am
Forum: LPC2000
Topic: LPC2378 MCI driver
Replies: 3
Views: 7172

Re: LPC2378 MCI driver

There is some mistakes. I forgot to put the brackets :( MCI.mod: SYSTEM.PUT(LPC2378.MCIDataTimer, blocks * 100 * rate DIV 1000) => SYSTEM.PUT(LPC2378.MCIDataTimer, blocks * 100 * (rate DIV 1000)) SYSTEM.PUT(LPC2378.MCIDataTimer, blocks * 300 * rate DIV 1000) => SYSTEM.PUT(LPC2378.MCIDataTimer, block...
by Alexander Shiryaev
Tue May 08, 2012 5:56 pm
Forum: LPC2000
Topic: LPC2378 MCI driver
Replies: 3
Views: 7172

LPC2378 MCI driver

MCI.def: DEFINITION MODULE MCI; CONST (* card types *) cardTypeUnknown* = 0; cardTypeMMC* = 1; cardTypeSD* = 2; cardTypeSDHC* = 3; writeBlocksAdr* = 7FD00000H; writeBlocksLen* = 8192; (* B *) readBlocksAdr* = 7FD00000H; readBlocksLen* = 8192; (* B *) blockLen* = 512; (* B *) (* err codes *) errOk* =...