|
Hi,
When we run 'Main'(for any of the programs from Chapter 11) in the VMEmulator, how does the VMEmulator 'see' the VM commands of the called methods belonging to other files?
Example(from Square - Main):
function Main.main 1
call SquareGame.new 0
pop local 0
push local 0
call SquareGame.run 1 pop temp 0
push local 0
call SquareGame.dispose 1 pop temp 0
push constant 0
return
--> How does the VMEmulator know what to do when it see's 'Call SquareGame.new 0', 'call SquareGame.run 1', or 'call SquareGame.dispose 1'?
Is there an explanation for this in somewhere in the lectures or textbook that I missed? If not, could someone give me a brief explanation of this or point me towards a good explanation of this that already exists out there on the Internet?
Thanks,
Jason
|