Talk:Stack-oriented programming: Difference between revisions

Content deleted Content added
Added a point about "stack based hardware"
Line 21:
 
Are there techniques on how to [[Program refinement|refine]] abstract mathematical descriptions to stack-oriented programming languages? E.g. how did someone come up with the Fibonacci number example provided in this article? Reading the provided source code it is not trivial to see that it implements the Fibonacci number series. --[[User:Abdull|Abdull]] ([[User talk:Abdull|talk]]) 19:12, 9 October 2010 (UTC)
 
== Why is Assembly language stack-oriented? ==
 
I am thinking about x86 assembly (acumulator and registry based machine language). I heard that there exists some other machine lanugages, some of them are list oriented (or perhaps there are even stack oriented?).
 
I know it (x86) can operate with stack (there is "stack pointer").
There are only operations of add (push) and remove (pop). And something like reset stack (pop-all ?). TMK there is no compute operation on top elements of stack and return result to stack ...
 
I am not sure if that counts as stack-oriented since every programming language with stack data structure would apply too; I believe I missunderstand the reason. Could somebody explain to me why is Assembly stack-oriented?
 
Thanks :)