Guest User

Untitled

a guest
Nov 10th, 2016
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. assumption: BF uses ASCII characters
  2. todo: use a jump table to jump to labels based on the ASCII character, jump to invalid_character in all other places
  3.  
  4. basic structure:
  5. - read BF program into memory (stack or main memory? maybe depend on program size?)
  6. - initialize BF memory, should be fixed size, so has to be initialized to zeroes before program starts in data section
  7. - use register to keep track of where you are in BF program
  8. - read current character, somehow use the jump table (indirect indexing? lea? use register?)
  9. - use correct methods, then jump back to read loop (in case of [ save current address into register, then when ] found jump back)
  10. - finish program once at end of BF memory (somehow)
Advertisement
Add Comment
Please, Sign In to add comment