[Oberon] CAP and recursion

Roger Keller kellerog at student.ethz.ch
Fri May 26 23:11:22 CEST 2006

>> I'll guess that load (x); puts the character in
>> a register in the cpu.  Would be interesting to
>> understand how MakeCon and Gen3 work to upcase a
>> character.
> Complier writing is a whole science in itself.
> Do you really want to go there ?

as much as i could see (and i have to admit, that right now, i'm not
completely aware of all the ascii-codes), Gen3 was used to generate an "and"
of basically the input value (the character x) and 5fH ... iirc, this just
unmasks bits 5 & 7 (the latter, as we all know, is always 0 in the original
ascii table). bit 5 is then just the difference between an upper case letter
and a lower case letter. unmasking it with an "and" means to remove it and
therefore make an uppercase letter from a lower case letter. however, this
also transforms some non-alphabetic characters (e.g. '{' -> '[') ...
as one can see, this is no rocket science. it's just a very little bit of


More information about the Oberon mailing list