An emulator, assembler, and disassembler for the Sega Game Gear
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 

37 lignes
1.0 KiB

  1. /* Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
  2. Released under the terms of the MIT License. See LICENSE for details. */
  3. #include "instructions.h"
  4. #include "../logging.h"
  5. /*
  6. TEMP SYNTAX NOTES:
  7. - http://clrhome.org/table/
  8. - http://www.z80.info/z80undoc.htm
  9. - http://www.z80.info/z80code.txt
  10. - http://www.z80.info/z80href.txt
  11. instruction := mnemonic [arg[, arg[, arg]]]
  12. mnemonic := [a-z0-9]{2-4}
  13. arg := register | immediate | label | indirect | indexed | condition | page0
  14. register := A | B | C | D | E | AF | BC | DE | HL | F | I | IX | IY | PC | R | SP
  15. immediate := 8-bit integer | 16-bit integer
  16. label := string
  17. indirect := \( (register | immediate) \)
  18. indexed := \( (IX | IY) + immediate \)
  19. condition := NZ | N | NC | C | PO | PE | P | M
  20. page0 := $0 | $8 | $10 | $18 | $20 | $28 | $30 | $38
  21. */
  22. /*
  23. ...
  24. */
  25. ASMInstParser get_inst_parser(char mnemonic[MAX_MNEMONIC_SIZE + 1])
  26. {
  27. // TODO
  28. DEBUG("get_inst_parser(): -->%s<--", mnemonic)
  29. return NULL;
  30. }