Files
Construction-of-Compilers/Project-01/uap25-pro01-tram/tramcode/square.tram
Jan-Niclas Loosen b0974af092 Start with project
2025-10-23 13:45:02 +02:00

11 lines
263 B
Plaintext

// Quellkode: let square(x) { x*x }
// in square(10)
// Annahmen: Das Argument von square wird durch Kellerzelle 0 repraesentiert,
// sowie PP=0, FP=0 und TOP=-1
CONST 10
INVOKE 1 LSQUARE 0
HALT
LSQUARE: LOAD 0 0
LOAD 0 0
MUL
RETURN