From: Alan Cox Date: Thu, 1 Oct 2015 20:43:29 +0000 (+0100) Subject: cpu-6502: ntohs X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=ab8ad3c18b55ce2614b7d86e9482e947c042b793;p=FUZIX.git cpu-6502: ntohs --- diff --git a/Kernel/cpu-6502/cpu.h b/Kernel/cpu-6502/cpu.h index 1b9d8304..4633186c 100644 --- a/Kernel/cpu-6502/cpu.h +++ b/Kernel/cpu-6502/cpu.h @@ -58,4 +58,6 @@ typedef union { /* this structure is endian dependent */ #define used(x) /* No support for inline */ -#define inline \ No newline at end of file +#define inline + +#define ntohs(x) ((((x) & 0xFF) << 8) | (((x) & 0xFF00) >> 8))