hex2_globals.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* -*- c-file-style: "linux";indent-tabs-mode:t -*- */
  2. /* Copyright (C) 2017 Jeremiah Orians
  3. * Copyright (C) 2017 Jan Nieuwenhuizen <janneke@gnu.org>
  4. * This file is part of mescc-tools
  5. *
  6. * mescc-tools is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * mescc-tools is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with mescc-tools. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #include "hex2.h"
  20. /* Global variables */
  21. extern FILE* output;
  22. extern char* filename;
  23. extern char* scratch;
  24. extern int ALIGNED;
  25. extern int Architecture;
  26. extern int Base_Address;
  27. extern int BigEndian;
  28. extern int ByteMode;
  29. extern int exec_enable;
  30. extern int hold;
  31. extern int ip;
  32. extern int linenumber;
  33. extern int toggle;
  34. extern struct entry** jump_tables;
  35. /* Function prototypes */
  36. int Architectural_displacement(int target, int base);
  37. int Throwaway_token(FILE* source_file);
  38. int consume_token(FILE* source_file);
  39. int storeLabel(FILE* source_file, int ip);
  40. unsigned GetTarget(char* c);
  41. void Clear_Scratch(char* s);
  42. void line_error();
  43. void outputPointer(int displacement, int number_of_bytes, int absolute);
  44. void pad_to_align(int write);
  45. int hex(int c, FILE* source_file);
  46. int octal(int c, FILE* source_file);
  47. int binary(int c, FILE* source_file);