[Oberon] Compiler Modules Empty?

Douglas G. Danforth danforth at greenwoodfarm.com
Sun Apr 13 02:40:09 CEST 2014


(I am using the BlackBox/Component Pascal files)

I believe if you look in the file CPB you will find code that implements
the SYSTEM calls such as

         | lshfn, rotfn: (*SYSTEM.LSH, SYSTEM.ROT*)
                 IF (x.class = Ntype) OR (x.class = Nproc) THEN err(126)
                 ELSIF ~(f IN intSet + charSet + {Byte, Set}) THEN err(111)
                 END
         | getfn, putfn, bitfn, movefn: (*SYSTEM.GET, SYSTEM.PUT, 
SYSTEM.BIT, SYSTEM.MOVE*)
                 IF (x.class = Ntype) OR (x.class = Nproc) THEN err(126)
                 ELSIF (x.class = Nconst) & (f IN {Int8, Int16}) THEN 
Convert(x, DevCPT.int32typ)
                 ELSIF ~(f IN {Int32, Pointer}) THEN err(111); x.typ := 
DevCPT.int32typ
                 END
         | getrfn, putrfn: (*SYSTEM.GETREG, SYSTEM.PUTREG*)
                 IF (f IN intSet) & (x.class = Nconst) THEN
                     IF (x.conval.intval < DevCPM.MinRegNr) OR 
(x.conval.intval > DevCPM.MaxRegNr) THEN err(220)
                     END
                 ELSE err(69)
                 END
         | valfn: (*SYSTEM.VAL*)
                 IF x.class # Ntype THEN err(110)
                 ELSIF (f IN {Undef, String8, String16, NoTyp, NilTyp}) 
(* OR (x.typ.comp = DynArr) *) THEN err(111)
                 ELSE CheckOldType(x)
                 END

-Doug Danforth

On 4/12/2014 5:16 PM, Jan Verhoeven wrote:
> Douglas G. Danforth wrote:
>> I believe SYSTEM is embedded in one of the compiler modules and does
>> not have a separate file.
> SYSTEM is IMPORTed in just about any module. So there must be at least
> an object code file.
>
> It may be a Foreign Module or an assembler written file but there must
> be some kind of specification for the functions in that file.
> And since SYSTEM is very close to the hardware, it must be tailor made
> for every platform.
>
>
>




More information about the Oberon mailing list