Related articles |
---|
Stack Machine and Parameters jkallup@web.de (Jens Kallup) (2004-11-29) |
Re: Stack Machine and Parameters amalmanuel@gmail.com (amal) (2004-12-16) |
From: | "Jens Kallup" <jkallup@web.de> |
Newsgroups: | comp.compilers |
Date: | 29 Nov 2004 00:27:15 -0500 |
Organization: | T-Online |
Keywords: | code |
Posted-Date: | 29 Nov 2004 00:27:15 EST |
Hello Newsgroup,
I trying to program an interpreter in stack machine behavior.
It works fine at now - IF ELSE ENDIF FOR loops and
variable definitions like "b0 = 100".
But now, I reached the point where parameters of functions
should be interpreted. I don't know how it possible.
I pushed parameters on stack of functions that are fixed and
know by me - but how works with unknow procedure
parameters?
Here a little code snippet of the parsed interpreter code:
enter main
npush 10
vpush b0
add
nassign b0
call @test
ret
Thank you for helping messages
Jens Kallup
Return to the
comp.compilers page.
Search the
comp.compilers archives again.