Advertisement
Bkmz

Untitled

Mar 21st, 2012
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.01 KB | None | 0 0
  1. --- i8080-compiler.py   2012-03-21 20:06:49.000000000 +0800
  2. +++ /home/bkmz/Downloads/Skype/compiler.py      2012-03-21 22:39:52.000000000 +0800
  3. @@ -1,4 +1,3 @@
  4. -#!/usr/bin/env python2.7
  5.  import re
  6.  import sys
  7.  
  8. @@ -119,7 +118,7 @@
  9.              processed = True
  10.  
  11.          if not processed:
  12. -            raise CompilerError("instruction is unknown or mailformed at line %d\n>>\t%s" % (ln+1, line))
  13. +            raise CompilerError("instruction is unknown or mailformed at line %d\n>>\t%s" % (ln, line))
  14.  
  15.      # Insert ending position and return
  16.      result.append(d("00"))
  17. @@ -300,7 +299,23 @@
  18.  "STAX B": "02",
  19.  "STAX D": "12",
  20.  "HLT": "76",
  21. -"RET": "C9"
  22. +"RET": "C9",
  23. +"RZ": "C8",
  24. +"RNZ": "C0",
  25. +"RNC": "D0",
  26. +"RC": "D8",
  27. +"RPO": "E0",
  28. +"RPE": "E8",
  29. +"^RP$": "F0",
  30. +"RM": "F8",
  31. +"PUSH B": "C5",
  32. +"PUSH D": "D5",
  33. +"PUSH H": "E5",
  34. +"PUSH PSW": "F5",
  35. +"POP B": "C1",
  36. +"POP D": "D1",
  37. +"POP H": "E1",
  38. +"POP PSW": "F1"
  39.  } #}}}
  40.  
  41.  TWOBYTES = { #{{{
  42. @@ -379,3 +394,4 @@
  43.      f.close()
  44.  
  45.  # }
  46. +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement