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.
 
 
 
 
 

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