Advertisement
Madmouse

isnt she pretty? :D

Feb 8th, 2015
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. // the following is code taken from my assembler project, and it is very dependent
  2. // on that context, but you may use the general idea in your own project if you like lol
  3.  
  4. void encode_instruction(std::vector<int>* bcode, std::vector<std::string> c)
  5. {
  6.     int in = instructions.at(c.front())[1];
  7.     for(int i=(Madnsize(in)/SIZE_BYTE)-1;i>=0;i--)
  8.         bcode->push_back((in&(0xff<<SIZE_BYTE*i))>>SIZE_BYTE*i);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement