Word Unperfect
public
Read
Owner: themaster
Branch: main
Commits: 0
Git CLI clone URL
git clone https://www.xt-emporium.com/git/word-unperfect.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
word-unperfect
/
rev
/
wp_host_compat.h
File editor
#ifndef WP_HOST_COMPAT_H #define WP_HOST_COMPAT_H #include <stdbool.h> #include <stdint.h> typedef uint8_t undefined; typedef uint16_t undefined2; typedef uint32_t undefined3; typedef uint32_t undefined4; typedef uint8_t byte; typedef uint16_t uint; typedef uint32_t ulong; typedef int32_t int3; typedef uint32_t uint3; typedef void code(void); static __inline void wp_host_swi_noop(void) { /* Host-port stand-in for a DOS/BIOS software interrupt thunk. */ } static __inline code *swi(uint8_t interrupt_vector) { (void)interrupt_vector; return wp_host_swi_noop; } #define __cdecl16near #define __cdecl16far #define __stdcall16far static __inline bool ghidra_carry1(uint8_t x, uint8_t y) { return (uint8_t)(x + y) < x; } static __inline bool ghidra_carry2(uint16_t x, uint16_t y) { return (uint16_t)(x + y) < x; } static __inline bool ghidra_sborrow1(int8_t x, int8_t y) { int8_t r = (int8_t)(x - y); return ((x ^ y) & (x ^ r)) < 0; } static __inline bool ghidra_sborrow2(int16_t x, int16_t y) { int16_t r = (int16_t)(x - y); return ((x ^ y) & (x ^ r)) < 0; } static __inline bool ghidra_scarry1(int8_t x, int8_t y) { int8_t r = (int8_t)(x + y); return ((~(x ^ y)) & (x ^ r)) < 0; } static __inline bool ghidra_scarry2(int16_t x, int16_t y) { int16_t r = (int16_t)(x + y); return ((~(x ^ y)) & (x ^ r)) < 0; } #define CARRY1(x,y) ghidra_carry1((uint8_t)(x), (uint8_t)(y)) #define CARRY2(x,y) ghidra_carry2((uint16_t)(x), (uint16_t)(y)) #define SBORROW1(x,y) ghidra_sborrow1((int8_t)(x), (int8_t)(y)) #define SBORROW2(x,y) ghidra_sborrow2((int16_t)(x), (int16_t)(y)) #define SCARRY1(x,y) ghidra_scarry1((int8_t)(x), (int8_t)(y)) #define SCARRY2(x,y) ghidra_scarry2((int16_t)(x), (int16_t)(y)) #define CONCAT11(x,y) ((uint16_t)((((uint16_t)(uint8_t)(x)) << 8) | (uint8_t)(y))) #define CONCAT21(x,y) ((uint32_t)((((uint32_t)(uint16_t)(x)) << 8) | (uint8_t)(y))) #define CONCAT22(x,y) ((uint32_t)((((uint32_t)(uint16_t)(x)) << 16) | (uint16_t)(y))) #define CONCAT31(x,y) ((uint32_t)(((((uint32_t)(x)) & 0x00ffffffU) << 8) | (uint8_t)(y))) #define SUB21(x,n) ((uint8_t)((((uintptr_t)(x)) >> ((n) * 8)) & 0xffU)) #define ZEXT24(x) ((uint32_t)((uintptr_t)(x) & 0xffffU)) #define LOCK() ((void)0) #define UNLOCK() ((void)0) #endif
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
main
Visibility
public
Your access
Read
Remote
None
File activity
View file history