An emulator, assembler, and disassembler for the Sega Game Gear
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
669 B

  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. #pragma once
  4. #include <stdbool.h>
  5. #include <stdint.h>
  6. #include <stdlib.h>
  7. /* Structs */
  8. struct Line {
  9. char *data;
  10. size_t length;
  11. size_t lineno;
  12. struct Line *next;
  13. };
  14. typedef struct Line Line;
  15. typedef struct {
  16. Line *lines;
  17. char *filename;
  18. } LineBuffer;
  19. typedef struct {
  20. //
  21. } ErrorInfo;
  22. /* Functions */
  23. void error_info_print(const ErrorInfo*, FILE*);
  24. void error_info_destroy(ErrorInfo*);
  25. size_t assemble(const LineBuffer*, uint8_t**, ErrorInfo**);
  26. bool assemble_file(const char*, const char*);