Unverified Commit 9d5d3c2a authored by petter's avatar petter
Browse files

Kalmers changes for formal parameters below FP

git-svn-id: https://www2.in.tum.de/repos/vam@9 e840d55b-1d80-4f23-a9d8-6aec749d046a
parent fe16d7aa
......@@ -2,18 +2,16 @@ package vam.machines.cma;
public class CALL extends MainCommand
{
int number;
public CALL( int number )
public CALL()
{
super("CALL "+number);
this.number = number;
super("CALL");
}
public void execute()
{
FP( SP() - number - 1 ); // setzen des neuen Frame Pointer
memory.setIntValue( FP(), PC() ); // Rcksprungadresse retten
PC( stack.popInt() ); // Funktion anspringen
int tmp = memory.getIntValue(SP());
memory.setIntValue(SP(),PC());
FP( SP() );
PC(tmp);
}
}
......@@ -11,12 +11,9 @@ public class MARK extends MainCommand
public void execute()
{
stack.push(); // organisatorische Zellen
stack.push( EP() ); // reservieren und initialisieren
stack.highlight( 1,Color.magenta ); // organisatorische Zellen einfrben
stack.highlight( 1,Color.magenta ); // organisatorische Zellen einfrben
stack.push( FP() );
stack.highlight( 1,Color.magenta ); // organisatorische Zellen einfrben
stack.push();
stack.highlight( 1,Color.magenta ); // organisatorische Zellen einfrben
stack.highlight( 1,Color.magenta ); // organisatorische Zellen einf�rben
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment