[Oberon] Standalone BootLoader format

Jörg Straube joerg.straube at iaeth.ch
Tue May 12 11:03:46 CEST 2020


Please have a look at how the code accesses your global variables x, y, z?
Jörg

Gesendet von Mail für Windows 10

Von: Tomas Kral
Gesendet: Dienstag, 12. Mai 2020 10:06
An: Oberon at lists.inf.ethz.ch
Betreff: [Oberon] Standalone BootLoader format

Hi,

Just inspecting standalone Oberon format for 

MODULE* Counter;
  VAR x, y, z: INTEGER;
BEGIN LED(1); z := 0;
  REPEAT LED(z); x := 1000;
     REPEAT y := 1000;
       REPEAT y := y-1 UNTIL y = 0;
       x := x-1
     UNTIL x = 0;
     z := z+1
   UNTIL FALSE
END Counter.

ORP.Compile @
ORTool.DecObj (* produces this disassembly *)
   0     E7000007       B       7
   1     00000000       MOV  R0  R0  R0
   2     00000000       MOV  R0  R0  R0
   3     00000000       MOV  R0  R0  R0
   4     00000000       MOV  R0  R0  R0
   5     00000000       MOV  R0  R0  R0
   6     00000000       MOV  R0  R0  R0
   7     00000000       MOV  R0  R0  R0
   8     4D000000       MOV SB  R0      0
...
  36     40000000       MOV  R0  R0      0
  37     C7000000       B  R0
entries: 32

What is the purpose of 7 words (7*4=28 bytes), that is branched over?
Why 32 entries?

- 
Tomas Kral <thomas.kral at email.cz>
--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://lists.inf.ethz.ch/mailman/listinfo/oberon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20200512/780ec9b6/attachment.html>


More information about the Oberon mailing list