SHARE
TWEET

Untitled

a guest Aug 7th, 2014 207 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ cat d8_tab.py
  2. from pta.BasicWordInstruction import *
  3.  
  4. Insn('ldib *',    I8, 0x01)
  5. Insn('stab *',   I10, 0xB1)
  6. Insn('jmp *',    I11, 0x10)
  7. Insn('nop',       I0, 0x00)
  8.  
  9. Insn('ldab @x',   I0, 0x74)
  10. Insn('ldab @x,*', I7, 0x74)
  11. $ cat d8.a
  12.     nop
  13.     nop
  14.     nop
  15.  
  16. start:
  17.     ldib 0x0
  18.     stab ledloc
  19.     ldib 0xff
  20.     stab ledloc
  21.     jmp start
  22.  
  23. ledloc = 0x123
  24.  
  25.     ldab @x
  26.     ldab @x, 0
  27.     ldab @x, 19
  28. $ python ptasm.py d8.a
  29. 0000: 0000 0000 0000 0100 b123 01ff b123 1003
  30. 0008: 7400 7400 7413
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top