gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
mjc2wsl - dup, dup2 commands
[mjc2wsl.git] / src / mjc2wsl.java
index 6f7efe1..4b231aa 100644 (file)
@@ -473,7 +473,20 @@ public class mjc2wsl{
                                break;
                        }
                        
                                break;
                        }
                        
-                       //TODO dup, dup2
+                       case dup : {
+                                       prl(getTop());
+                                       prl(cmdToEStack("tempa"));
+                                       prl(cmdToEStack("tempa"));
+                                       break;                                  
+                       }
+                       case dup2 : {
+                                       prl(getTopTwo());
+                                       prl(cmdToEStack("tempb"));
+                                       prl(cmdToEStack("tempa"));
+                                       prl(cmdToEStack("tempb"));
+                                       prl(cmdToEStack("tempa"));
+                                       break;                                  
+                       }
                        
                        case pop : {
                                        prl(cmdPopEStack());
                        
                        case pop : {
                                        prl(cmdPopEStack());
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner