[Oberon] [Fwd: RE: objects and jewels]
Frans-Pieter Vonck
fp at vonck.nl
Wed Feb 20 10:47:28 CET 2013
Hi Jan,
In the Oberon System the assembly code is hidden in the Kernel and SYSTEM
Modules.
Even hardware drivers like Serial did not use assembly directly.
The processor on my simplecortex board,an developmentboard with Arduino
format pinouts, has a core speed of 120 MHZ.
The NS320 processor in the original Ceres system had a speed of 30 MHZ.
So using importing assembly in driver modules was neither necessary in the
early nineties as it is now in 2013.
Getting and Putting registers is as low as I want to go.
However register setting needs also to be abstracted.
Therefore I advocate a driver module LED for all your fancy light effects.
DEFINITION LED
VAR led :RECORD pin,port:INTEGER END
PROCEDURE Init(aled: Led)
PROCEDURE InitSerie(LedsPort0,LedsPort1: SET)
PROCEDURE SwitchOn(aled:Led);
PROCEDURE SwitchOFF(aled: Led)
PROCEDURE Blink*(aled:Led,mSec;INTEGER);
END LED
Greets,
F.P.
Greets,
F.P.
> On Tuesday 19 February 2013 22:13:01 Frans-Pieter Vonck wrote:
>
>> VAR led1: LED.led;
>> LED.SwitchOn(led1); (Modular style)
>> than with,
>> led1.SwitchOn. (object style)
>
> How about
>
> mov dx, port
> mov al, LedBit
> or al, LedBit
> out al, dx
>
>
> --
> Met vriendelijke groeten,
>
> Jan Verhoeven
> http://www.verhoeven272.nl
>
More information about the Oberon
mailing list