flag_handler.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. MSP430 Emulator
  3. Copyright (C) 2020 Rudolf Geosits (rgeosits@live.esu.edu)
  4. "MSP430 Emulator" is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. "MSP430 Emulator" is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <https://www.gnu.org/licenses/>.
  14. */
  15. #ifndef _FLAG_HANDLER_H_
  16. #define _FLAG_HANDLER_H_
  17. #include <stdint.h>
  18. #include <stdlib.h>
  19. #include "decoder.h"
  20. uint8_t is_overflowed (uint16_t source, uint16_t original_destination,
  21. uint16_t *result_addr, uint8_t bw_flag);
  22. uint8_t is_negative (int16_t *result_addr, uint8_t bw_flag);
  23. uint8_t is_zero (uint16_t *result_addr, uint8_t bw_flag);
  24. uint8_t is_carried (uint32_t original_dst_value, uint32_t source_value,
  25. uint8_t bw_flag);
  26. #endif