- Timestamp:
- 07/15/2017 11:46:04 AM (7 years ago)
- Branches:
- master
- Children:
- 7d0d347
- Parents:
- e102943
- Location:
- lib700
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
lib700/bitrev.c
re102943 rd18a473 8 8 #include "ram.h" 9 9 10 static int16_t bitmask[] = {10 static uint16_t bitmask[] = { 11 11 12 12 0x0001, 0x0002, 0x0004, 0x0008, … … 24 24 */ 25 25 26 int16_t bitrev(int16_t bitsin, int16_t nbits)26 uint16_t bitrev(uint16_t bitsin, int16_t nbits) 27 27 { 28 int16_t m, n; 28 uint16_t n; 29 int16_t m; 29 30 30 31 n = 0; -
lib700/bitrev.x
re102943 rd18a473 15 15 */ 16 16 17 extern int16_t bitrev(int16_t bitsin, int16_t nbits);17 extern uint16_t bitrev(uint16_t bitsin, int16_t nbits); -
lib700/ctype.c
re102943 rd18a473 12 12 */ 13 13 14 #define _CTYPE_C15 16 14 #include "ram.h" 17 15 … … 22 20 #define _LX _L|_X 23 21 24 int8_t __atab[] = { /* EOF won't work properly with this table */22 uint8_t __atab[] = { /* EOF won't work properly with this table */ 25 23 26 24 /* Octal */ /* Hex */ -
lib700/ctype.x
re102943 rd18a473 15 15 */ 16 16 17 extern int8_t __atab[];17 extern uint8_t __atab[]; -
lib700/micons.c
re102943 rd18a473 4 4 Version 3 -- 1987-06-11 -- D.N. Lynx Crowe 5 5 6 short 7 micons(wi) 8 short wi; 6 micon16(wi) 9 7 10 8 Convert between motorola and intel format for a short. 11 9 12 int 13 miconi(wi) 14 int wi; 15 16 Convert between motorola and intel format for an int. 17 18 long 19 miconl(wi) 20 long wi; 10 micon32(wi) 21 11 22 12 Convert between motorola and intel format for a long. … … 30 20 /* 31 21 ============================================================================= 32 micon s(wi) -- Convert between motorola and intel format for a short.22 micon16(wi) -- Convert between motorola and intel format for a short. 33 23 ============================================================================= 34 24 */ 35 25 36 int16_t micons(int16_t wi)26 uint16_t micon16(uint16_t wi) 37 27 { 38 return(( int16_t)( ((wi << 8) & 0xFF00) | ((wi >> 8) & 0x00FF) ));28 return(((wi << 8) & 0xFF00u) | ((wi >> 8) & 0x00FFu)); 39 29 } 40 30 41 31 /* 42 32 ============================================================================= 43 micon i(wi) -- Convert between motorola and intel format for an int.33 micon32(wi) -- Convert between motorola and intel format for a long. 44 34 ============================================================================= 45 35 */ 46 36 47 int16_t miconi(int16_t wi)37 uint32_t micon32(uint32_t wi) 48 38 { 49 return(((wi << 8) & 0xFF00) | ((wi >> 8) & 0x00FF)); 50 } 51 52 /* 53 ============================================================================= 54 miconl(wi) -- Convert between motorola and intel format for a long. 55 ============================================================================= 56 */ 57 58 int32_t miconl(int32_t wi) 59 { 60 return( ((wi << 24) & 0xFF000000L) | ((wi << 8) & 0x00FF0000L) | 61 ((wi >> 8) & 0x0000FF00L) | ((wi >> 24) & 0x000000FFL) ); 39 return(((wi << 24) & 0xFF000000ul) | ((wi << 8) & 0x00FF0000ul) | 40 ((wi >> 8) & 0x0000FF00ul) | ((wi >> 24) & 0x000000FFul)); 62 41 } 63 42 -
lib700/micons.x
re102943 rd18a473 15 15 */ 16 16 17 extern int16_t miconi(int16_t wi); 18 extern int32_t miconl(int32_t wi); 19 extern int16_t micons(int16_t wi); 17 extern uint16_t micon16(uint16_t wi); 18 extern uint32_t micon32(uint32_t wi);
Note:
See TracChangeset
for help on using the changeset viewer.