1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

SCP: Remove ASCII source code character set dependency

Provide reasonable behavior on any platform which doesn't use ASCII as a character set.  Method suggested by Dave G4UGM.
This commit is contained in:
Mark Pizzolato
2015-08-03 12:35:08 -07:00
parent a747c0f860
commit 7c7b44e409
3 changed files with 17 additions and 4 deletions

View File

@@ -278,6 +278,10 @@ typedef uint32 t_addr;
#define SIM_SW_REG (1u << 28) /* register value */
#define SIM_SW_STOP (1u << 29) /* stop message */
/* Convert switch letter to bit mask */
#define SWMASK(x) sim_swmask ((int)x)
/* Simulator status codes
0 ok
@@ -358,10 +362,6 @@ typedef uint32 t_addr;
#define KBD_LIM_WAIT(x) (((x) > KBD_MAX_WAIT)? KBD_MAX_WAIT: (x))
#define KBD_WAIT(w,s) ((w)? w: KBD_LIM_WAIT (s))
/* Convert switch letter to bit mask */
#define SWMASK(x) (1u << (((int) (x)) - ((int) 'A')))
/* String match - at least one character required */
#define MATCH_CMD(ptr,cmd) ((NULL == (ptr)) || (!*(ptr)) || strncmp ((ptr), (cmd), strlen (ptr)))