Permalink
Browse files

Merge pull request #27 from zmpinqc/master

Instruction Memory Manager
  • Loading branch information...
2 parents c7628ea + 16b4c14 commit 24ffcb1f1ad8184e22c073d3b07dd5fa7de89fe4 @zmpinqc zmpinqc committed Apr 26, 2012
Showing with 22 additions and 0 deletions.
  1. +22 −0 src/org/zza/codegenerator/InstructionMemoryManager.java
@@ -0,0 +1,22 @@
+package org.zza.codegenerator;
+
+import java.util.HashMap;
+
+public class InstructionMemoryManager {
+
+ private HashMap<String,Integer> functionMap;
+
+
+ public InstructionMemoryManager(){
+ functionMap = new HashMap<String,Integer>();
+ }
+
+ public void addFunction(String name, int location){
+ functionMap.put(name, location);
+ }
+
+ public int getFunctionAddress(String name){
+ return functionMap.get(name);
+ }
+
+}

0 comments on commit 24ffcb1

Please sign in to comment.