(** This module translates a [LIN] program into a [ASM] program. *) (** Very few work here: The globals are associated an offset from the bottom of the memory and depending on there size. The instruction that loads the address of a global into a register actually loads the offset associated to the global. In 8051, a program is supposed to run forever. A preamble that contains two instructions is added: the first calls the main, and the second infinitely jumps to itself once the main has returned. *) val translate : LIN.program -> ASM.program