diff --git a/H316/h316_udp.c b/H316/h316_udp.c index c91bf122..ad49c10b 100644 --- a/H316/h316_udp.c +++ b/H316/h316_udp.c @@ -179,8 +179,8 @@ typedef struct _UDP_PACKET UDP_PACKET; #define UDP_HEADER_LEN (2*sizeof(uint32) + sizeof(uint16)) // Locals ... -UDP_LINK udp_links[MAXLINKS] = {0}; // data for every active connection -TMLN udp_lines[MAXLINKS] = { 0 }; // line descriptors +UDP_LINK udp_links[MAXLINKS] = { {0} }; // data for every active connection +TMLN udp_lines[MAXLINKS] = { {0} }; // line descriptors TMXR udp_tmxr = { MAXLINKS, NULL, 0, udp_lines};// datagram mux int32 udp_find_free_link (void) @@ -402,7 +402,7 @@ int32 udp_receive (DEVICE *dptr, int32 link, uint16 *pdata, uint16 maxbuf) while ((pktlen = udp_receive_packet(link, &pkt)) > 0) { // First do some header checks for a valid UDP packet ... - if (pktlen < UDP_HEADER_LEN) { + if (((size_t)pktlen) < UDP_HEADER_LEN) { sim_debug(IMP_DBG_UDP, dptr, "link %d - received packet w/o header (length=%d)\n", link, pktlen); continue; } diff --git a/Ibm1130/dmsr2v12phases.h b/Ibm1130/dmsr2v12phases.h index 47fbb2d9..438a81ab 100644 --- a/Ibm1130/dmsr2v12phases.h +++ b/Ibm1130/dmsr2v12phases.h @@ -1,171 +1,171 @@ -0x01, "DUP - COMMON SUBROUTINES", -0x02, "DUP - CTRL RECORD PROCESSOR", -0x03, "DUP - STORE PHASE", -0x04, "DUP - *FILES, *LOCAL, *NOCAL PHASE", -0x05, "DUP - DUMP PHASE", -0x06, "DUP - DUMP LET/FLET PHASE", -0x07, "DUP - DELETE PHASE", -0x08, "DUP - DEFINE PHASE", -0x09, "DUP - EXIT PHASE", -0x0A, "DUP - CARD I/O INTERFACE", -0x0B, "DUP - KEYBOARD INPUT INTERFACE", -0x0C, "DUP - PAPER TAPE I/O INTERFACE", -0x0D, "DUP - SAVED UPCOR PHASE", -0x0E, "DUP - PRINCIPAL I/O DUMMY PHASE", -0x0F, "DUP - PRINCIPAL I/O (W/O KB) DUMMY PHASE", -0x10, "DUP - PAPER TAPE I/O DUMMY PHASE", -0x11, "DUP - MOVE DCI PROGRAMS TO UA OR FXA", -0x12, "DUP - EXIT TO MODIF DUMMY PHASE", +{0x01, "DUP - COMMON SUBROUTINES"}, +{0x02, "DUP - CTRL RECORD PROCESSOR"}, +{0x03, "DUP - STORE PHASE"}, +{0x04, "DUP - *FILES, *LOCAL, *NOCAL PHASE"}, +{0x05, "DUP - DUMP PHASE"}, +{0x06, "DUP - DUMP LET/FLET PHASE"}, +{0x07, "DUP - DELETE PHASE"}, +{0x08, "DUP - DEFINE PHASE"}, +{0x09, "DUP - EXIT PHASE"}, +{0x0A, "DUP - CARD I/O INTERFACE"}, +{0x0B, "DUP - KEYBOARD INPUT INTERFACE"}, +{0x0C, "DUP - PAPER TAPE I/O INTERFACE"}, +{0x0D, "DUP - SAVED UPCOR PHASE"}, +{0x0E, "DUP - PRINCIPAL I/O DUMMY PHASE"}, +{0x0F, "DUP - PRINCIPAL I/O (W/O KB) DUMMY PHASE"}, +{0x10, "DUP - PAPER TAPE I/O DUMMY PHASE"}, +{0x11, "DUP - MOVE DCI PROGRAMS TO UA OR FXA"}, +{0x12, "DUP - EXIT TO MODIF DUMMY PHASE"}, -0x1F, "FOR - INPUT PHASE", -0x20, "FOR - CLASSIFIERPHASE", -0x21, "FOR - CHECK ORDER/ST NO PHASE", -0x22, "FOR - COMMON SUBR OR FUNCTION PHASE", -0x23, "FOR - DIMENSION/REAL/INTEGER PHASE", -0x24, "FOR - REAL CONSTANT PHASE", -0x25, "FOR - DEFINE FILE, CALL LINK/EXIT PHASE", -0x26, "FOR - VARIABLE, STMT FUNC PHASE", -0x27, "FOR - DATA STATEMENT PHASE", -0x28, "FOR - FORMAT STATEMENT PHASE", -0x29, "FOR - SUBTRACT DECOMPOSITION PHASE", -0x2A, "FOR - ASCAN I PHASE", -0x2B, "FOR - ASCAN II PHASE", -0x2C, "FOR - DO/CONTINUE/ETC PHASE", -0x2D, "FOR - SUBSCRIPT OPTIMIZATION PHASE", -0x2E, "FOR - SCAN PHASE", -0x2F, "FOR - EXPANDER I PHASE", -0x30, "FOR - EXPANDER II PHASE", -0x31, "FOR - DATA ALLOCATION PHASE", -0x32, "FOR - COMPILATION ERROR PHASE", -0x33, "FOR - STATEMENT ALLOCATION PHASE", -0x34, "FOR - LIST STATEMENT PHASE", -0x35, "FOR - LIST SYMBOL TABLE PHASE", -0x36, "FOR - LIST CONSTANTS PHASE", -0x37, "FOR - OUTPUT I PHASE", -0x38, "FOR - OUTPUT II PHASE", -0x39, "FOR - RECOVERY/EXIT PHASE", +{0x1F, "FOR - INPUT PHASE"}, +{0x20, "FOR - CLASSIFIERPHASE"}, +{0x21, "FOR - CHECK ORDER/ST NO PHASE"}, +{0x22, "FOR - COMMON SUBR OR FUNCTION PHASE"}, +{0x23, "FOR - DIMENSION/REAL/INTEGER PHASE"}, +{0x24, "FOR - REAL CONSTANT PHASE"}, +{0x25, "FOR - DEFINE FILE, CALL LINK/EXIT PHASE"}, +{0x26, "FOR - VARIABLE, STMT FUNC PHASE"}, +{0x27, "FOR - DATA STATEMENT PHASE"}, +{0x28, "FOR - FORMAT STATEMENT PHASE"}, +{0x29, "FOR - SUBTRACT DECOMPOSITION PHASE"}, +{0x2A, "FOR - ASCAN I PHASE"}, +{0x2B, "FOR - ASCAN II PHASE"}, +{0x2C, "FOR - DO/CONTINUE/ETC PHASE"}, +{0x2D, "FOR - SUBSCRIPT OPTIMIZATION PHASE"}, +{0x2E, "FOR - SCAN PHASE"}, +{0x2F, "FOR - EXPANDER I PHASE"}, +{0x30, "FOR - EXPANDER II PHASE"}, +{0x31, "FOR - DATA ALLOCATION PHASE"}, +{0x32, "FOR - COMPILATION ERROR PHASE"}, +{0x33, "FOR - STATEMENT ALLOCATION PHASE"}, +{0x34, "FOR - LIST STATEMENT PHASE"}, +{0x35, "FOR - LIST SYMBOL TABLE PHASE"}, +{0x36, "FOR - LIST CONSTANTS PHASE"}, +{0x37, "FOR - OUTPUT I PHASE"}, +{0x38, "FOR - OUTPUT II PHASE"}, +{0x39, "FOR - RECOVERY/EXIT PHASE"}, -0X51, "COBOL 51", -0X52, "COBOL 52", -0X53, "COBOL 53", -0X54, "COBOL 54", -0X55, "COBOL 55", -0X56, "COBOL 56", -0X57, "COBOL 57", -0X58, "COBOL 58", -0X59, "COBOL 59", -0X5A, "COBOL 5A", -0X5B, "COBOL 5B", -0X5C, "COBOL 5C", +{0X51, "COBOL 51"}, +{0X52, "COBOL 52"}, +{0X53, "COBOL 53"}, +{0X54, "COBOL 54"}, +{0X55, "COBOL 55"}, +{0X56, "COBOL 56"}, +{0X57, "COBOL 57"}, +{0X58, "COBOL 58"}, +{0X59, "COBOL 59"}, +{0X5A, "COBOL 5A"}, +{0X5B, "COBOL 5B"}, +{0X5C, "COBOL 5C"}, -0X6E, "SUP PHASE 1 - MONITOR CONTROL RECORD ANALYZER", -0x6F, "SUP PHASE 2 - JOB PROCESSING", -0x70, "SUP PHASE 3 - DELETE TEMPORARY LET", -0x71, "SUP PHASE 4 - XEQ PROCESSING", -0x72, "SUP PHASE 5 - SUPV CONTROL REC PROCESSING", -0X73, "SYSTEM DUMP-CORE-TO-PRINTER", -0X74, "AUXILIARY SUPERVISOR", -0X78, "CORE LOAD BUILDER, PHASE 1", -0x79, "CORE LOAD BUILDER, PHASE 2", -0x7A, "CORE LOAD BUILDER, PHASE 3", -0x7B, "CORE LOAD BUILDER, PHASE 4", -0x7C, "CORE LOAD BUILDER, PHASE 5", -0x7D, "CORE LOAD BUILDER, PHASE 6", -0x7E, "CORE LOAD BUILDER, PHASE 7", -0x7F, "CORE LOAD BUILDER, PHASE 8", -0x80, "CORE LOAD BUILDER, PHASE 9", -0x81, "CORE LOAD BUILDER, PHASE 10", -0x82, "CORE LOAD BUILDER, PHASE 11", -0x83, "CORE LOAD BUILDER, PHASE 12", -0x84, "CORE LOAD BUILDER, PHASE 13", +{0X6E, "SUP PHASE 1 - MONITOR CONTROL RECORD ANALYZER"}, +{0x6F, "SUP PHASE 2 - JOB PROCESSING"}, +{0x70, "SUP PHASE 3 - DELETE TEMPORARY LET"}, +{0x71, "SUP PHASE 4 - XEQ PROCESSING"}, +{0x72, "SUP PHASE 5 - SUPV CONTROL REC PROCESSING"}, +{0X73, "SYSTEM DUMP-CORE-TO-PRINTER"}, +{0X74, "AUXILIARY SUPERVISOR"}, +{0X78, "CORE LOAD BUILDER, PHASE 1"}, +{0x79, "CORE LOAD BUILDER, PHASE 2"}, +{0x7A, "CORE LOAD BUILDER, PHASE 3"}, +{0x7B, "CORE LOAD BUILDER, PHASE 4"}, +{0x7C, "CORE LOAD BUILDER, PHASE 5"}, +{0x7D, "CORE LOAD BUILDER, PHASE 6"}, +{0x7E, "CORE LOAD BUILDER, PHASE 7"}, +{0x7F, "CORE LOAD BUILDER, PHASE 8"}, +{0x80, "CORE LOAD BUILDER, PHASE 9"}, +{0x81, "CORE LOAD BUILDER, PHASE 10"}, +{0x82, "CORE LOAD BUILDER, PHASE 11"}, +{0x83, "CORE LOAD BUILDER, PHASE 12"}, +{0x84, "CORE LOAD BUILDER, PHASE 13"}, -0X8C, "SYS 1403 READER", -0x8D, "SYS 1132 PRINTER", -0x8E, "SYS CONSOLE PRINTER", -0x8F, "SYS 2501/1442 READER", -0x90, "SYS 1442/1442 READER", -0x91, "SYS 1134/1055 PAPER TAPE IO", -0x92, "SYS KEYBOARD", -0x93, "SYS 2501/1442 CONVERSION", -0x94, "SYS 1134/1055 CONVERSION", -0x95, "SYS KEYBOARD CONVERSION", -0x96, "DISKZ", -0x97, "SYS DISK1", -0x98, "SYS DISKN", +{0X8C, "SYS 1403 READER"}, +{0x8D, "SYS 1132 PRINTER"}, +{0x8E, "SYS CONSOLE PRINTER"}, +{0x8F, "SYS 2501/1442 READER"}, +{0x90, "SYS 1442/1442 READER"}, +{0x91, "SYS 1134/1055 PAPER TAPE IO"}, +{0x92, "SYS KEYBOARD"}, +{0x93, "SYS 2501/1442 CONVERSION"}, +{0x94, "SYS 1134/1055 CONVERSION"}, +{0x95, "SYS KEYBOARD CONVERSION"}, +{0x96, "DISKZ"}, +{0x97, "SYS DISK1"}, +{0x98, "SYS DISKN"}, -0xA0, "CIL CORE IMAGE LOADER - PHASE 1", -0xA1, "CIL CORE IMAGE LOADER - PHASE 2", +{0xA0, "CIL CORE IMAGE LOADER - PHASE 1"}, +{0xA1, "CIL CORE IMAGE LOADER - PHASE 2"}, -0XB0, "RPG B0", -0XB1, "RPG B1", -0XB2, "RPG B2", -0XB3, "RPG B3", -0XB4, "RPG B4", -0XB5, "RPG B5", -0XB6, "RPG B6", -0XB7, "RPG B7", -0XB8, "RPG B8", -0XB9, "RPG B9", -0XBA, "RPG BA", -0XBB, "RPG BB", -0XBC, "RPG BC", -0XBD, "RPG BD", -0XBE, "RPG BE", -0XBF, "RPG BF", -0XC0, "RPG C0", -0XC1, "RPG C1", -0XC2, "RPG C2", -0XC3, "RPG C3", -0XC4, "RPG C4", -0XC5, "RPG C5", -0XC6, "RPG C6", -0XC7, "RPG C7", -0XC8, "RPG C8", -0XC9, "RPG C9", -0XCA, "RPG CA", -0XCB, "RPG CB", -0XCC, "RPG CC", +{0XB0, "RPG B0"}, +{0XB1, "RPG B1"}, +{0XB2, "RPG B2"}, +{0XB3, "RPG B3"}, +{0XB4, "RPG B4"}, +{0XB5, "RPG B5"}, +{0XB6, "RPG B6"}, +{0XB7, "RPG B7"}, +{0XB8, "RPG B8"}, +{0XB9, "RPG B9"}, +{0XBA, "RPG BA"}, +{0XBB, "RPG BB"}, +{0XBC, "RPG BC"}, +{0XBD, "RPG BD"}, +{0XBE, "RPG BE"}, +{0XBF, "RPG BF"}, +{0XC0, "RPG C0"}, +{0XC1, "RPG C1"}, +{0XC2, "RPG C2"}, +{0XC3, "RPG C3"}, +{0XC4, "RPG C4"}, +{0XC5, "RPG C5"}, +{0XC6, "RPG C6"}, +{0XC7, "RPG C7"}, +{0XC8, "RPG C8"}, +{0XC9, "RPG C9"}, +{0XCA, "RPG CA"}, +{0XCB, "RPG CB"}, +{0XCC, "RPG CC"}, -0XCD, "DUP PART 2 - CTRL", -0XCE, "DUP PART 2 - MACRO UPDATE", +{0XCD, "DUP PART 2 - CTRL"}, +{0XCE, "DUP PART 2 - MACRO UPDATE"}, -0XCF, "ASM INITIALIZATION PHASE", -0xD0, "ASM CARD CONVERSION PHASE", -0xD1, "ASM DSF OUTPUT PHASE", -0xD2, "ASM INTERMEDIATE INPUT PHASE", -0xD3, "ASM END STATEMENT PHASE", -0xD4, "ASM ASSEMBLY ERROR PHASE", -0xD5, "ASM CONTROL CARDS I", -0xD6, "ASM CONTROL CARDS 2", -0xD7, "ASM DUMMY SYST SYMBOL TBL", -0xD8, "ASM SYMBOL TABLE OPTIONS PHASE", -0xD9, "ASM EXIT PHASE", -0xDA, "ASM PROG HEADER MNEMONICS PH", -0xDB, "ASM FILE STATEMENT PHASE", -0xDC, "ASM COMMON SUBROUTINES,ASCOM", -0xE4, "ASM INTERMEDIATE I/O", -0xE5, "ASM SYMBOL TABLE OVERFLOW", -0xDD, "ASM PROG CONTROL MNEMONICS PH", -0xDE, "ASM IMPERATIVE STATEMENTS PH", -0xDF, "ASM DECML,XFLC PROCESSING PH", -0xE0, "ASM DECIMAL CONVERSION PH", -0xE1, "ASM PROG LINKAGE PHASE", -0xE2, "ASM DMES PROCESSING PHASE", -0xE3, "ASM PUNCH CONVERSION PHASE", -0xE6, "ASM GRAPHIC ORDER PHASE", -0xE8, "ASM CONTROL CARDS III", -0xE9, "ASM MACRO PH 1 - SPECIAL OP AND PREPROCESSI", -0xEA, "MACRO PHASE 1A - SPECIAL PSEUDO OPS", -0xEB, "MACRO PHASE 1B - CONDITIONAL ASM PSEUDO OPS", -0xEC, "ASM MACRO PHASE 2 - MACRO DEFINITION", -0xED, "MACRO PHASE 2A - MACRO DEFINITION", -0xEE, "MACRO PHASE 2B - MACRO DEFINITION", -0xEF, "MACRO PHASE 3 - MACRO EXPANSION", -0xF0, "MACRO PHASE 3A - MACRO EXPANSION", -0xF1, "MACRO PHASE 3B - MACRO EXPANSION", -0xE7, "ASM DIVISION OPERATOR", -0xF2, "ASM CROSS-REFERENCE PART I", -0xF3, "ASM CROSS-REFERENCE PART 2A", -0xF4, "ASM CROSS-REFERENCE PART 2B", -0xF5, "ASM CROSS-REFERENCE PART 2C", -0xF6, "ASM CROSS-REFERENCE PART III", +{0XCF, "ASM INITIALIZATION PHASE"}, +{0xD0, "ASM CARD CONVERSION PHASE"}, +{0xD1, "ASM DSF OUTPUT PHASE"}, +{0xD2, "ASM INTERMEDIATE INPUT PHASE"}, +{0xD3, "ASM END STATEMENT PHASE"}, +{0xD4, "ASM ASSEMBLY ERROR PHASE"}, +{0xD5, "ASM CONTROL CARDS I"}, +{0xD6, "ASM CONTROL CARDS 2"}, +{0xD7, "ASM DUMMY SYST SYMBOL TBL"}, +{0xD8, "ASM SYMBOL TABLE OPTIONS PHASE"}, +{0xD9, "ASM EXIT PHASE"}, +{0xDA, "ASM PROG HEADER MNEMONICS PH"}, +{0xDB, "ASM FILE STATEMENT PHASE"}, +{0xDC, "ASM COMMON SUBROUTINES,ASCOM"}, +{0xE4, "ASM INTERMEDIATE I/O"}, +{0xE5, "ASM SYMBOL TABLE OVERFLOW"}, +{0xDD, "ASM PROG CONTROL MNEMONICS PH"}, +{0xDE, "ASM IMPERATIVE STATEMENTS PH"}, +{0xDF, "ASM DECML,XFLC PROCESSING PH"}, +{0xE0, "ASM DECIMAL CONVERSION PH"}, +{0xE1, "ASM PROG LINKAGE PHASE"}, +{0xE2, "ASM DMES PROCESSING PHASE"}, +{0xE3, "ASM PUNCH CONVERSION PHASE"}, +{0xE6, "ASM GRAPHIC ORDER PHASE"}, +{0xE8, "ASM CONTROL CARDS III"}, +{0xE9, "ASM MACRO PH 1 - SPECIAL OP AND PREPROCESSI"}, +{0xEA, "MACRO PHASE 1A - SPECIAL PSEUDO OPS"}, +{0xEB, "MACRO PHASE 1B - CONDITIONAL ASM PSEUDO OPS"}, +{0xEC, "ASM MACRO PHASE 2 - MACRO DEFINITION"}, +{0xED, "MACRO PHASE 2A - MACRO DEFINITION"}, +{0xEE, "MACRO PHASE 2B - MACRO DEFINITION"}, +{0xEF, "MACRO PHASE 3 - MACRO EXPANSION"}, +{0xF0, "MACRO PHASE 3A - MACRO EXPANSION"}, +{0xF1, "MACRO PHASE 3B - MACRO EXPANSION"}, +{0xE7, "ASM DIVISION OPERATOR"}, +{0xF2, "ASM CROSS-REFERENCE PART I"}, +{0xF3, "ASM CROSS-REFERENCE PART 2A"}, +{0xF4, "ASM CROSS-REFERENCE PART 2B"}, +{0xF5, "ASM CROSS-REFERENCE PART 2C"}, +{0xF6, "ASM CROSS-REFERENCE PART III"}, diff --git a/Ibm1130/dmsr2v12slet.h b/Ibm1130/dmsr2v12slet.h index 3260b9bc..de011c4b 100644 --- a/Ibm1130/dmsr2v12slet.h +++ b/Ibm1130/dmsr2v12slet.h @@ -1,129 +1,129 @@ /* DMS R2V12 SLET without RPG, for debugging only */ -0x0001, 0x7c50, 0x032f, 0x0008, -0x0002, 0x11de, 0x05a2, 0x000b, -0x0003, 0x21de, 0x05a2, 0x0010, -0x0004, 0x01de, 0x03c0, 0x0015, -0x0005, 0x41de, 0x0550, 0x0018, -0x0006, 0x01de, 0x03c0, 0x001d, -0x0007, 0x01de, 0x05a2, 0x0020, -0x0008, 0x01de, 0x05a2, 0x0025, -0x0009, 0x01de, 0x0500, 0x002a, -0x000a, 0x7a06, 0x00db, 0x002e, -0x000b, 0x7a06, 0x0035, 0x002f, -0x000c, 0x7a06, 0x00d8, 0x0030, -0x000d, 0x7782, 0x087c, 0x0031, -0x000e, 0x7a06, 0x0248, 0x0038, -0x000f, 0x7a06, 0x0248, 0x003a, -0x0010, 0x7a06, 0x0248, 0x003c, -0x0011, 0x01de, 0x0280, 0x003e, -0x0012, 0x0e6e, 0x0140, 0x0040, -0x001f, 0x760c, 0x09f1, 0x0041, -0x0020, 0x7a34, 0x0500, 0x0049, -0x0021, 0x7a34, 0x0280, 0x004d, -0x0022, 0x7a34, 0x03c0, 0x004f, -0x0023, 0x7a34, 0x0500, 0x0052, -0x0024, 0x7a34, 0x03c0, 0x0056, -0x0025, 0x7a34, 0x0280, 0x0059, -0x0026, 0x7a34, 0x0500, 0x005b, -0x0027, 0x7a34, 0x03f0, 0x005f, -0x0028, 0x7a34, 0x03c0, 0x0063, -0x0029, 0x7a34, 0x03c0, 0x0066, -0x002a, 0x7a34, 0x03c0, 0x0069, -0x002b, 0x7a34, 0x03c0, 0x006c, -0x002c, 0x7a34, 0x0500, 0x006f, -0x002d, 0x7a34, 0x0500, 0x0073, -0x002e, 0x7a34, 0x0500, 0x0077, -0x002f, 0x7a34, 0x0500, 0x007b, -0x0030, 0x7a34, 0x0500, 0x007f, -0x0031, 0x7a34, 0x0404, 0x0083, -0x0032, 0x7a34, 0x03c0, 0x0087, -0x0033, 0x7a34, 0x03c0, 0x008a, -0x0034, 0x7a34, 0x0280, 0x008d, -0x0035, 0x7a34, 0x03c0, 0x008f, -0x0036, 0x7a34, 0x03c0, 0x0092, -0x0037, 0x7a34, 0x0500, 0x0095, -0x0038, 0x7b96, 0x03c0, 0x0099, -0x0039, 0x766e, 0x013e, 0x009c, -0x006e, 0x04fe, 0x02fe, 0x009d, -0x006f, 0x07fe, 0x052b, 0x00a0, -0x0070, 0x07fe, 0x0280, 0x00a5, -0x0071, 0x07fe, 0x0280, 0x00a7, -0x0072, 0x07fe, 0x03ea, 0x00a9, -0x0073, 0x0506, 0x04f8, 0x00ad, -0x0074, 0x0400, 0x0189, 0x00b1, -0x0078, 0x01e0, 0x0782, 0x00b3, -0x0079, 0x05bc, 0x04dd, 0x00ba, -0x007a, 0x08b6, 0x01e8, 0x00be, -0x007b, 0x08b6, 0x01e8, 0x00c0, -0x007c, 0x08b6, 0x01e8, 0x00c2, -0x007d, 0x08b6, 0x01e8, 0x00c4, -0x007e, 0x0aa0, 0x0140, 0x00c6, -0x007f, 0x0aa0, 0x0140, 0x00c7, -0x0080, 0x0aa0, 0x0140, 0x00c8, -0x0081, 0x0aa0, 0x0140, 0x00c9, -0x0082, 0x0be2, 0x0140, 0x00ca, -0x0083, 0x08b6, 0x01e8, 0x00cb, -0x0084, 0x0aa0, 0x0140, 0x00cd, -0x008c, 0x0000, 0x0134, (int16)0x80ce, -0x008d, 0x0000, 0x0113, 0x00cf, -0x008e, 0x0000, 0x011f, 0x00d0, -0x008f, 0x0000, 0x009c, (int16)0x80d1, -0x0090, 0x0000, 0x00ab, 0x00d2, -0x0091, 0x0000, 0x016c, (int16)0x80d3, -0x0092, 0x0000, 0x0174, 0x00d5, -0x0093, 0x0000, 0x00b9, 0x00d7, -0x0094, 0x0000, 0x0003, (int16)0x80d8, -0x0095, 0x0000, 0x0003, 0x00d9, -0x0096, 0x00f0, 0x00ec, 0x00da, -0x0097, 0x00f0, 0x01a2, 0x00db, -0x0098, 0x00f0, 0x02b0, 0x00dd, -0x0099, 0x0000, 0x0113, 0x00cf, -0x009a, 0x0000, 0x00ab, 0x00d2, -0x009b, 0x0000, 0x00ab, 0x00d2, -0x009c, 0x0000, 0x00b9, 0x00d7, -0x009d, 0x0000, 0x00b9, 0x00d7, -0x00a0, 0x0000, 0x016c, 0x00e0, -0x00a1, 0x0000, 0x01c0, 0x00e2, -0x00cd, 0x11de, 0x0280, 0x00e4, -0x00ce, 0x01de, 0x11df, 0x00e6, -0x00cf, 0x01e0, 0x026b, 0x00f5, -0x00d0, 0x01e8, 0x00bb, 0x00f7, -0x00d1, 0x01e8, 0x005f, 0x00f8, -0x00d2, 0x01e8, 0x005f, 0x00f9, -0x00d3, 0x0280, 0x01d5, 0x00fa, -0x00d4, 0x0ad0, 0x0145, 0x00fc, -0x00d5, 0x0280, 0x01d6, 0x00fe, -0x00d6, 0x0280, 0x0113, 0x0100, -0x00d7, 0x0000, 0x0130, 0x0101, -0x00d8, 0x07a8, 0x0254, 0x0102, -0x00d9, 0x0280, 0x01d7, 0x0104, -0x00da, 0x0280, 0x01a0, 0x0106, -0x00db, 0x0282, 0x00a3, 0x0108, -0x00dc, 0x0458, 0x05a7, 0x0109, -0x00dd, 0x0280, 0x01d5, 0x010e, -0x00de, 0x0280, 0x01d6, 0x0110, -0x00df, 0x0280, 0x017c, 0x0112, -0x00e0, 0x0282, 0x0127, 0x0114, -0x00e1, 0x0280, 0x0196, 0x0115, -0x00e2, 0x0280, 0x01d8, 0x0117, -0x00e3, 0x0280, 0x0099, 0x0119, -0x00e4, 0x098a, 0x005f, 0x011a, -0x00e5, 0x098a, 0x0062, 0x011b, -0x00e6, 0x0eca, 0x03c1, 0x011c, -0x00e7, 0x0280, 0x00b8, 0x0120, -0x00e8, 0x0280, 0x017f, 0x0121, -0x00e9, 0x0280, 0x01d6, 0x0123, -0x00ea, 0x0280, 0x01d9, 0x0125, -0x00eb, 0x0280, 0x01d9, 0x0127, -0x00ec, 0x0280, 0x01ca, 0x0129, -0x00ed, 0x0280, 0x01c2, 0x012b, -0x00ee, 0x05dc, 0x0158, 0x012d, -0x00ef, 0x07ac, 0x0051, 0x012f, -0x00f0, 0x0280, 0x01af, 0x0130, -0x00f1, 0x12f4, 0x027f, 0x0132, -0x00f2, 0x0280, 0x01c7, 0x0134, -0x00f3, 0x07a8, 0x0052, 0x0136, -0x00f4, 0x0924, 0x005b, 0x0137, -0x00f5, 0x0886, 0x003d, 0x0138, -0x00f6, 0x0eca, 0x03b2, 0x0139, +{0x0001, 0x7c50, 0x032f, 0x0008}, +{0x0002, 0x11de, 0x05a2, 0x000b}, +{0x0003, 0x21de, 0x05a2, 0x0010}, +{0x0004, 0x01de, 0x03c0, 0x0015}, +{0x0005, 0x41de, 0x0550, 0x0018}, +{0x0006, 0x01de, 0x03c0, 0x001d}, +{0x0007, 0x01de, 0x05a2, 0x0020}, +{0x0008, 0x01de, 0x05a2, 0x0025}, +{0x0009, 0x01de, 0x0500, 0x002a}, +{0x000a, 0x7a06, 0x00db, 0x002e}, +{0x000b, 0x7a06, 0x0035, 0x002f}, +{0x000c, 0x7a06, 0x00d8, 0x0030}, +{0x000d, 0x7782, 0x087c, 0x0031}, +{0x000e, 0x7a06, 0x0248, 0x0038}, +{0x000f, 0x7a06, 0x0248, 0x003a}, +{0x0010, 0x7a06, 0x0248, 0x003c}, +{0x0011, 0x01de, 0x0280, 0x003e}, +{0x0012, 0x0e6e, 0x0140, 0x0040}, +{0x001f, 0x760c, 0x09f1, 0x0041}, +{0x0020, 0x7a34, 0x0500, 0x0049}, +{0x0021, 0x7a34, 0x0280, 0x004d}, +{0x0022, 0x7a34, 0x03c0, 0x004f}, +{0x0023, 0x7a34, 0x0500, 0x0052}, +{0x0024, 0x7a34, 0x03c0, 0x0056}, +{0x0025, 0x7a34, 0x0280, 0x0059}, +{0x0026, 0x7a34, 0x0500, 0x005b}, +{0x0027, 0x7a34, 0x03f0, 0x005f}, +{0x0028, 0x7a34, 0x03c0, 0x0063}, +{0x0029, 0x7a34, 0x03c0, 0x0066}, +{0x002a, 0x7a34, 0x03c0, 0x0069}, +{0x002b, 0x7a34, 0x03c0, 0x006c}, +{0x002c, 0x7a34, 0x0500, 0x006f}, +{0x002d, 0x7a34, 0x0500, 0x0073}, +{0x002e, 0x7a34, 0x0500, 0x0077}, +{0x002f, 0x7a34, 0x0500, 0x007b}, +{0x0030, 0x7a34, 0x0500, 0x007f}, +{0x0031, 0x7a34, 0x0404, 0x0083}, +{0x0032, 0x7a34, 0x03c0, 0x0087}, +{0x0033, 0x7a34, 0x03c0, 0x008a}, +{0x0034, 0x7a34, 0x0280, 0x008d}, +{0x0035, 0x7a34, 0x03c0, 0x008f}, +{0x0036, 0x7a34, 0x03c0, 0x0092}, +{0x0037, 0x7a34, 0x0500, 0x0095}, +{0x0038, 0x7b96, 0x03c0, 0x0099}, +{0x0039, 0x766e, 0x013e, 0x009c}, +{0x006e, 0x04fe, 0x02fe, 0x009d}, +{0x006f, 0x07fe, 0x052b, 0x00a0}, +{0x0070, 0x07fe, 0x0280, 0x00a5}, +{0x0071, 0x07fe, 0x0280, 0x00a7}, +{0x0072, 0x07fe, 0x03ea, 0x00a9}, +{0x0073, 0x0506, 0x04f8, 0x00ad}, +{0x0074, 0x0400, 0x0189, 0x00b1}, +{0x0078, 0x01e0, 0x0782, 0x00b3}, +{0x0079, 0x05bc, 0x04dd, 0x00ba}, +{0x007a, 0x08b6, 0x01e8, 0x00be}, +{0x007b, 0x08b6, 0x01e8, 0x00c0}, +{0x007c, 0x08b6, 0x01e8, 0x00c2}, +{0x007d, 0x08b6, 0x01e8, 0x00c4}, +{0x007e, 0x0aa0, 0x0140, 0x00c6}, +{0x007f, 0x0aa0, 0x0140, 0x00c7}, +{0x0080, 0x0aa0, 0x0140, 0x00c8}, +{0x0081, 0x0aa0, 0x0140, 0x00c9}, +{0x0082, 0x0be2, 0x0140, 0x00ca}, +{0x0083, 0x08b6, 0x01e8, 0x00cb}, +{0x0084, 0x0aa0, 0x0140, 0x00cd}, +{0x008c, 0x0000, 0x0134, (int16)0x80ce}, +{0x008d, 0x0000, 0x0113, 0x00cf}, +{0x008e, 0x0000, 0x011f, 0x00d0}, +{0x008f, 0x0000, 0x009c, (int16)0x80d1}, +{0x0090, 0x0000, 0x00ab, 0x00d2}, +{0x0091, 0x0000, 0x016c, (int16)0x80d3}, +{0x0092, 0x0000, 0x0174, 0x00d5}, +{0x0093, 0x0000, 0x00b9, 0x00d7}, +{0x0094, 0x0000, 0x0003, (int16)0x80d8}, +{0x0095, 0x0000, 0x0003, 0x00d9}, +{0x0096, 0x00f0, 0x00ec, 0x00da}, +{0x0097, 0x00f0, 0x01a2, 0x00db}, +{0x0098, 0x00f0, 0x02b0, 0x00dd}, +{0x0099, 0x0000, 0x0113, 0x00cf}, +{0x009a, 0x0000, 0x00ab, 0x00d2}, +{0x009b, 0x0000, 0x00ab, 0x00d2}, +{0x009c, 0x0000, 0x00b9, 0x00d7}, +{0x009d, 0x0000, 0x00b9, 0x00d7}, +{0x00a0, 0x0000, 0x016c, 0x00e0}, +{0x00a1, 0x0000, 0x01c0, 0x00e2}, +{0x00cd, 0x11de, 0x0280, 0x00e4}, +{0x00ce, 0x01de, 0x11df, 0x00e6}, +{0x00cf, 0x01e0, 0x026b, 0x00f5}, +{0x00d0, 0x01e8, 0x00bb, 0x00f7}, +{0x00d1, 0x01e8, 0x005f, 0x00f8}, +{0x00d2, 0x01e8, 0x005f, 0x00f9}, +{0x00d3, 0x0280, 0x01d5, 0x00fa}, +{0x00d4, 0x0ad0, 0x0145, 0x00fc}, +{0x00d5, 0x0280, 0x01d6, 0x00fe}, +{0x00d6, 0x0280, 0x0113, 0x0100}, +{0x00d7, 0x0000, 0x0130, 0x0101}, +{0x00d8, 0x07a8, 0x0254, 0x0102}, +{0x00d9, 0x0280, 0x01d7, 0x0104}, +{0x00da, 0x0280, 0x01a0, 0x0106}, +{0x00db, 0x0282, 0x00a3, 0x0108}, +{0x00dc, 0x0458, 0x05a7, 0x0109}, +{0x00dd, 0x0280, 0x01d5, 0x010e}, +{0x00de, 0x0280, 0x01d6, 0x0110}, +{0x00df, 0x0280, 0x017c, 0x0112}, +{0x00e0, 0x0282, 0x0127, 0x0114}, +{0x00e1, 0x0280, 0x0196, 0x0115}, +{0x00e2, 0x0280, 0x01d8, 0x0117}, +{0x00e3, 0x0280, 0x0099, 0x0119}, +{0x00e4, 0x098a, 0x005f, 0x011a}, +{0x00e5, 0x098a, 0x0062, 0x011b}, +{0x00e6, 0x0eca, 0x03c1, 0x011c}, +{0x00e7, 0x0280, 0x00b8, 0x0120}, +{0x00e8, 0x0280, 0x017f, 0x0121}, +{0x00e9, 0x0280, 0x01d6, 0x0123}, +{0x00ea, 0x0280, 0x01d9, 0x0125}, +{0x00eb, 0x0280, 0x01d9, 0x0127}, +{0x00ec, 0x0280, 0x01ca, 0x0129}, +{0x00ed, 0x0280, 0x01c2, 0x012b}, +{0x00ee, 0x05dc, 0x0158, 0x012d}, +{0x00ef, 0x07ac, 0x0051, 0x012f}, +{0x00f0, 0x0280, 0x01af, 0x0130}, +{0x00f1, 0x12f4, 0x027f, 0x0132}, +{0x00f2, 0x0280, 0x01c7, 0x0134}, +{0x00f3, 0x07a8, 0x0052, 0x0136}, +{0x00f4, 0x0924, 0x005b, 0x0137}, +{0x00f5, 0x0886, 0x003d, 0x0138}, +{0x00f6, 0x0eca, 0x03b2, 0x0139}, diff --git a/Ibm1130/ibm1130_cpu.c b/Ibm1130/ibm1130_cpu.c index 926eac90..33d139e7 100644 --- a/Ibm1130/ibm1130_cpu.c +++ b/Ibm1130/ibm1130_cpu.c @@ -1063,7 +1063,7 @@ t_stat sim_instr (void) if (src2 == 0) { V = 1; /* divide by zero just sets overflow, ACC & EXT are undefined */ } - else if (src2 == -1 && src == 0x80000000) { + else if ((src2 == -1) && ((uint32)src == 0x80000000)) { V = 1; /* another special case: max negative int / -1 also overflows */ } else { diff --git a/Ibm1130/ibm1130_cr.c b/Ibm1130/ibm1130_cr.c index 427428e7..e7d06beb 100644 --- a/Ibm1130/ibm1130_cr.c +++ b/Ibm1130/ibm1130_cr.c @@ -514,212 +514,212 @@ typedef struct { static CPCODE cardcode_029[] = { - 0x0000, ' ', - 0x8000, '&', /* + in 026 Fortran */ - 0x4000, '-', - 0x2000, '0', - 0x1000, '1', - 0x0800, '2', - 0x0400, '3', - 0x0200, '4', - 0x0100, '5', - 0x0080, '6', - 0x0040, '7', - 0x0020, '8', - 0x0010, '9', - 0x9000, 'A', - 0x8800, 'B', - 0x8400, 'C', - 0x8200, 'D', - 0x8100, 'E', - 0x8080, 'F', - 0x8040, 'G', - 0x8020, 'H', - 0x8010, 'I', - 0x5000, 'J', - 0x4800, 'K', - 0x4400, 'L', - 0x4200, 'M', - 0x4100, 'N', - 0x4080, 'O', - 0x4040, 'P', - 0x4020, 'Q', - 0x4010, 'R', - 0x3000, '/', - 0x2800, 'S', - 0x2400, 'T', - 0x2200, 'U', - 0x2100, 'V', - 0x2080, 'W', - 0x2040, 'X', - 0x2020, 'Y', - 0x2010, 'Z', - 0x0820, ':', - 0x0420, '#', /* = in 026 Fortran */ - 0x0220, '@', /* ' in 026 Fortran */ - 0x0120, '\'', - 0x00A0, '=', - 0x0060, '"', - 0x8820, (unsigned char) '\xA2', /* cent, in MS-DOS encoding (this is in guess_cr_code as well) */ - 0x8420, '.', - 0x8220, '<', /* ) in 026 Fortran */ - 0x8120, '(', - 0x80A0, '+', - 0x8060, '|', - 0x4820, '!', - 0x4420, '$', - 0x4220, '*', - 0x4120, ')', - 0x40A0, ';', - 0x4060, (unsigned char) '\xAC', /* not, in MS-DOS encoding (this is in guess_cr_code as well) */ - 0x2420, ',', - 0x2220, '%', /* ( in 026 Fortran */ - 0x2120, '_', - 0x20A0, '>', - 0xB000, 'a', - 0xA800, 'b', - 0xA400, 'c', - 0xA200, 'd', - 0xA100, 'e', - 0xA080, 'f', - 0xA040, 'g', - 0xA020, 'h', - 0xA010, 'i', - 0xD000, 'j', - 0xC800, 'k', - 0xC400, 'l', - 0xC200, 'm', - 0xC100, 'n', - 0xC080, 'o', - 0xC040, 'p', - 0xC020, 'q', - 0xC010, 'r', - 0x6800, 's', - 0x6400, 't', - 0x6200, 'u', - 0x6100, 'v', - 0x6080, 'w', - 0x6040, 'x', - 0x6020, 'y', - 0x6010, 'z', /* these odd punch codes are used by APL: */ - 0x1010, '\001', /* no corresponding ASCII using ^A */ - 0x0810, '\002', /* SYN using ^B */ - 0x0410, '\003', /* no corresponding ASCII using ^C */ - 0x0210, '\004', /* PUNCH ON using ^D */ - 0x0110, '\005', /* READER STOP using ^E */ - 0x0090, '\006', /* UPPER CASE using ^F */ - 0x0050, '\013', /* EOT using ^K */ - 0x0030, '\016', /* no corresponding ASCII using ^N */ - 0x1030, '\017', /* no corresponding ASCII using ^O */ - 0x0830, '\020', /* no corresponding ASCII using ^P */ + {0x0000, ' '}, + {0x8000, '&'}, /* + in 026 Fortran */ + {0x4000, '-'}, + {0x2000, '0'}, + {0x1000, '1'}, + {0x0800, '2'}, + {0x0400, '3'}, + {0x0200, '4'}, + {0x0100, '5'}, + {0x0080, '6'}, + {0x0040, '7'}, + {0x0020, '8'}, + {0x0010, '9'}, + {0x9000, 'A'}, + {0x8800, 'B'}, + {0x8400, 'C'}, + {0x8200, 'D'}, + {0x8100, 'E'}, + {0x8080, 'F'}, + {0x8040, 'G'}, + {0x8020, 'H'}, + {0x8010, 'I'}, + {0x5000, 'J'}, + {0x4800, 'K'}, + {0x4400, 'L'}, + {0x4200, 'M'}, + {0x4100, 'N'}, + {0x4080, 'O'}, + {0x4040, 'P'}, + {0x4020, 'Q'}, + {0x4010, 'R'}, + {0x3000, '/'}, + {0x2800, 'S'}, + {0x2400, 'T'}, + {0x2200, 'U'}, + {0x2100, 'V'}, + {0x2080, 'W'}, + {0x2040, 'X'}, + {0x2020, 'Y'}, + {0x2010, 'Z'}, + {0x0820, ':'}, + {0x0420, '#'}, /* = in 026 Fortran */ + {0x0220, '@'}, /* ' in 026 Fortran */ + {0x0120, '\''}, + {0x00A0, '='}, + {0x0060, '"'}, + {0x8820, (unsigned char) '\xA2'}, /* cent, in MS-DOS encoding (this is in guess_cr_code as well) */ + {0x8420, '.'}, + {0x8220, '<'}, /* ) in 026 Fortran */ + {0x8120, '('}, + {0x80A0, '+'}, + {0x8060, '|'}, + {0x4820, '!'}, + {0x4420, '$'}, + {0x4220, '*'}, + {0x4120, ')'}, + {0x40A0, ';'}, + {0x4060, (unsigned char) '\xAC'}, /* not, in MS-DOS encoding (this is in guess_cr_code as well) */ + {0x2420, ','}, + {0x2220, '%'}, /* ( in 026 Fortran */ + {0x2120, '_'}, + {0x20A0, '>'}, + {0xB000, 'a'}, + {0xA800, 'b'}, + {0xA400, 'c'}, + {0xA200, 'd'}, + {0xA100, 'e'}, + {0xA080, 'f'}, + {0xA040, 'g'}, + {0xA020, 'h'}, + {0xA010, 'i'}, + {0xD000, 'j'}, + {0xC800, 'k'}, + {0xC400, 'l'}, + {0xC200, 'm'}, + {0xC100, 'n'}, + {0xC080, 'o'}, + {0xC040, 'p'}, + {0xC020, 'q'}, + {0xC010, 'r'}, + {0x6800, 's'}, + {0x6400, 't'}, + {0x6200, 'u'}, + {0x6100, 'v'}, + {0x6080, 'w'}, + {0x6040, 'x'}, + {0x6020, 'y'}, + {0x6010, 'z'}, /* these odd punch codes are used by APL: */ + {0x1010, '\001'}, /* no corresponding ASCII using ^A */ + {0x0810, '\002'}, /* SYN using ^B */ + {0x0410, '\003'}, /* no corresponding ASCII using ^C */ + {0x0210, '\004'}, /* PUNCH ON using ^D */ + {0x0110, '\005'}, /* READER STOP using ^E */ + {0x0090, '\006'}, /* UPPER CASE using ^F */ + {0x0050, '\013'}, /* EOT using ^K */ + {0x0030, '\016'}, /* no corresponding ASCII using ^N */ + {0x1030, '\017'}, /* no corresponding ASCII using ^O */ + {0x0830, '\020'}, /* no corresponding ASCII using ^P */ }; static CPCODE cardcode_026F[] = /* 026 fortran */ { - 0x0000, ' ', - 0x8000, '+', - 0x4000, '-', - 0x2000, '0', - 0x1000, '1', - 0x0800, '2', - 0x0400, '3', - 0x0200, '4', - 0x0100, '5', - 0x0080, '6', - 0x0040, '7', - 0x0020, '8', - 0x0010, '9', - 0x9000, 'A', - 0x8800, 'B', - 0x8400, 'C', - 0x8200, 'D', - 0x8100, 'E', - 0x8080, 'F', - 0x8040, 'G', - 0x8020, 'H', - 0x8010, 'I', - 0x5000, 'J', - 0x4800, 'K', - 0x4400, 'L', - 0x4200, 'M', - 0x4100, 'N', - 0x4080, 'O', - 0x4040, 'P', - 0x4020, 'Q', - 0x4010, 'R', - 0x3000, '/', - 0x2800, 'S', - 0x2400, 'T', - 0x2200, 'U', - 0x2100, 'V', - 0x2080, 'W', - 0x2040, 'X', - 0x2020, 'Y', - 0x2010, 'Z', - 0x0420, '=', - 0x0220, '\'', - 0x8420, '.', - 0x8220, ')', - 0x8220, '<', /* if ASCII has <, treat like ) */ - 0x4420, '$', - 0x4220, '*', - 0x2420, ',', - 0x2220, '(', - 0x2220, '%', /* if ASCII has %, treat like ) */ + {0x0000, ' '}, + {0x8000, '+'}, + {0x4000, '-'}, + {0x2000, '0'}, + {0x1000, '1'}, + {0x0800, '2'}, + {0x0400, '3'}, + {0x0200, '4'}, + {0x0100, '5'}, + {0x0080, '6'}, + {0x0040, '7'}, + {0x0020, '8'}, + {0x0010, '9'}, + {0x9000, 'A'}, + {0x8800, 'B'}, + {0x8400, 'C'}, + {0x8200, 'D'}, + {0x8100, 'E'}, + {0x8080, 'F'}, + {0x8040, 'G'}, + {0x8020, 'H'}, + {0x8010, 'I'}, + {0x5000, 'J'}, + {0x4800, 'K'}, + {0x4400, 'L'}, + {0x4200, 'M'}, + {0x4100, 'N'}, + {0x4080, 'O'}, + {0x4040, 'P'}, + {0x4020, 'Q'}, + {0x4010, 'R'}, + {0x3000, '/'}, + {0x2800, 'S'}, + {0x2400, 'T'}, + {0x2200, 'U'}, + {0x2100, 'V'}, + {0x2080, 'W'}, + {0x2040, 'X'}, + {0x2020, 'Y'}, + {0x2010, 'Z'}, + {0x0420, '='}, + {0x0220, '\''}, + {0x8420, '.'}, + {0x8220, ')'}, + {0x8220, '<'}, /* if ASCII has <, treat like ) */ + {0x4420, '$'}, + {0x4220, '*'}, + {0x2420, ','}, + {0x2220, '('}, + {0x2220, '%'}, /* if ASCII has %, treat like ) */ }; static CPCODE cardcode_026C[] = /* 026 commercial */ { - 0x0000, ' ', - 0x8000, '+', - 0x4000, '-', - 0x2000, '0', - 0x1000, '1', - 0x0800, '2', - 0x0400, '3', - 0x0200, '4', - 0x0100, '5', - 0x0080, '6', - 0x0040, '7', - 0x0020, '8', - 0x0010, '9', - 0x9000, 'A', - 0x8800, 'B', - 0x8400, 'C', - 0x8200, 'D', - 0x8100, 'E', - 0x8080, 'F', - 0x8040, 'G', - 0x8020, 'H', - 0x8010, 'I', - 0x5000, 'J', - 0x4800, 'K', - 0x4400, 'L', - 0x4200, 'M', - 0x4100, 'N', - 0x4080, 'O', - 0x4040, 'P', - 0x4020, 'Q', - 0x4010, 'R', - 0x3000, '/', - 0x2800, 'S', - 0x2400, 'T', - 0x2200, 'U', - 0x2100, 'V', - 0x2080, 'W', - 0x2040, 'X', - 0x2020, 'Y', - 0x2010, 'Z', - 0x0420, '=', - 0x0220, '\'', - 0x8420, '.', - 0x8220, '<', - 0x8220, ')', /* if ASCII has ), treat like < */ - 0x4420, '$', - 0x4220, '*', - 0x2420, ',', - 0x2220, '%', - 0x2220, '(', /* if ASCII has (, treat like % */ + {0x0000, ' '}, + {0x8000, '+'}, + {0x4000, '-'}, + {0x2000, '0'}, + {0x1000, '1'}, + {0x0800, '2'}, + {0x0400, '3'}, + {0x0200, '4'}, + {0x0100, '5'}, + {0x0080, '6'}, + {0x0040, '7'}, + {0x0020, '8'}, + {0x0010, '9'}, + {0x9000, 'A'}, + {0x8800, 'B'}, + {0x8400, 'C'}, + {0x8200, 'D'}, + {0x8100, 'E'}, + {0x8080, 'F'}, + {0x8040, 'G'}, + {0x8020, 'H'}, + {0x8010, 'I'}, + {0x5000, 'J'}, + {0x4800, 'K'}, + {0x4400, 'L'}, + {0x4200, 'M'}, + {0x4100, 'N'}, + {0x4080, 'O'}, + {0x4040, 'P'}, + {0x4020, 'Q'}, + {0x4010, 'R'}, + {0x3000, '/'}, + {0x2800, 'S'}, + {0x2400, 'T'}, + {0x2200, 'U'}, + {0x2100, 'V'}, + {0x2080, 'W'}, + {0x2040, 'X'}, + {0x2020, 'Y'}, + {0x2010, 'Z'}, + {0x0420, '='}, + {0x0220, '\''}, + {0x8420, '.'}, + {0x8220, '<'}, + {0x8220, ')'}, /* if ASCII has ), treat like < */ + {0x4420, '$'}, + {0x4220, '*'}, + {0x2420, ','}, + {0x2220, '%'}, + {0x2220, '('}, /* if ASCII has (, treat like % */ }; extern int cgi; diff --git a/Ibm1130/ibm1130_disk.c b/Ibm1130/ibm1130_disk.c index da76517e..96b86526 100644 --- a/Ibm1130/ibm1130_disk.c +++ b/Ibm1130/ibm1130_disk.c @@ -586,7 +586,7 @@ static struct { char *name; } phase[] = { # include "dmsr2v12phases.h" - 0xFFFF, "" + {0xFFFF, ""} }; #pragma pack(2) @@ -597,7 +597,7 @@ struct tag_slet { int16 nwords; int16 sector; } slet[MAXSLET] = { -# include "dmsr2v12slet.h" /* without RPG, use this info until overwritten by actual data from disk */ +#include "dmsr2v12slet.h" /* without RPG, use this info until overwritten by actual data from disk */ }; #pragma pack() diff --git a/Ibm1130/ibm1130_prt.c b/Ibm1130/ibm1130_prt.c index 61f53995..fcee8713 100644 --- a/Ibm1130/ibm1130_prt.c +++ b/Ibm1130/ibm1130_prt.c @@ -198,11 +198,11 @@ static struct tag_ccpunches { /* list of rows and punches on tape */ int row, channels; } ccpunches[] = { - 2, CC_CHANNEL_1, /* channel 1 = top of form */ - 62, CC_CHANNEL_12 /* channel 12 = bottom of form */ + { 2, CC_CHANNEL_1}, /* channel 1 = top of form */ + {62, CC_CHANNEL_12} /* channel 12 = bottom of form */ }, cccgi[] = { - 2, CC_CHANNEL_1 /* channel 1 = top of form; no bottom of form */ + {2, CC_CHANNEL_1} /* channel 1 = top of form; no bottom of form */ }; #include "ibm1130_prtwheel.h" @@ -505,7 +505,8 @@ static t_stat prt1132_svc (UNIT *uptr) void save_1403_prt_line (int32 addr) { - int i, j, r, ch, even = TRUE; + size_t j; + int i, r, ch, even = TRUE; unsigned char ebcdic; int32 wd; @@ -671,7 +672,7 @@ static t_stat delete_cmd (int32 flag, char *cptr) static t_stat prt_reset (DEVICE *dptr) { UNIT *uptr = &prt_unit[0]; - int i; + size_t i; /* add a DELETE filename command so we can be sure to have clean listings */ register_cmd("DELETE", &delete_cmd, 0, "del{ete} filename remove file\n"); diff --git a/Ibm1130/ibm1130_prtwheel.h b/Ibm1130/ibm1130_prtwheel.h index c39c1e59..617f693e 100644 --- a/Ibm1130/ibm1130_prtwheel.h +++ b/Ibm1130/ibm1130_prtwheel.h @@ -16,109 +16,109 @@ struct tag_codewheel { static struct tag_codewheel codewheel1132[] = { /* characters and EBCDIC codes in printwheel order */ - 'A', 0xC1, - 'B', 0xC2, - 'C', 0xC3, - 'D', 0xC4, - 'F', 0xC6, - 'H', 0xC8, - 'I', 0xC9, - 'S', 0xE2, - 'T', 0xE3, - 'U', 0xE4, - 'V', 0xE5, - '1', 0xF1, - '2', 0xF2, - '3', 0xF3, - '4', 0xF4, - '5', 0xF5, - '6', 0xF6, - '7', 0xF7, - '8', 0xF8, - '9', 0xF9, - '0', 0xF0, - '=', 0x7E, - '$', 0x5B, - '.', 0x4B, - '\'', 0x7D, - ',', 0x6B, - ')', 0x5D, - '-', 0x60, - '(', 0x4D, - '+', 0x4E, - '/', 0x61, - '*', 0x5C, - '&', 0x50, - 'J', 0xD1, - 'K', 0xD2, - 'L', 0xD3, - 'M', 0xD4, - 'N', 0xD5, - 'O', 0xD6, - 'P', 0xD7, - 'Q', 0xD8, - 'R', 0xD9, - 'E', 0xC5, - 'G', 0xC7, - 'W', 0xE6, - 'X', 0xE7, - 'Y', 0xE8, - 'Z', 0xE9, + {'A', 0xC1}, + {'B', 0xC2}, + {'C', 0xC3}, + {'D', 0xC4}, + {'F', 0xC6}, + {'H', 0xC8}, + {'I', 0xC9}, + {'S', 0xE2}, + {'T', 0xE3}, + {'U', 0xE4}, + {'V', 0xE5}, + {'1', 0xF1}, + {'2', 0xF2}, + {'3', 0xF3}, + {'4', 0xF4}, + {'5', 0xF5}, + {'6', 0xF6}, + {'7', 0xF7}, + {'8', 0xF8}, + {'9', 0xF9}, + {'0', 0xF0}, + {'=', 0x7E}, + {'$', 0x5B}, + {'.', 0x4B}, + {'\'', 0x7D}, + {',', 0x6B}, + {')', 0x5D}, + {'-', 0x60}, + {'(', 0x4D}, + {'+', 0x4E}, + {'/', 0x61}, + {'*', 0x5C}, + {'&', 0x50}, + {'J', 0xD1}, + {'K', 0xD2}, + {'L', 0xD3}, + {'M', 0xD4}, + {'N', 0xD5}, + {'O', 0xD6}, + {'P', 0xD7}, + {'Q', 0xD8}, + {'R', 0xD9}, + {'E', 0xC5}, + {'G', 0xC7}, + {'W', 0xE6}, + {'X', 0xE7}, + {'Y', 0xE8}, + {'Z', 0xE9}, }; #define WHEELCHARS_1132 (sizeof(codewheel1132)/sizeof(codewheel1132[0])) static struct tag_codewheel codewheel1403[] = { - 'A', 0x64, - 'B', 0x25, - 'C', 0x26, - 'D', 0x67, - 'E', 0x68, - 'F', 0x29, - 'G', 0x2A, - 'H', 0x6B, - 'I', 0x2C, - 'J', 0x58, - 'K', 0x19, - 'L', 0x1A, - 'M', 0x5B, - 'N', 0x1C, - 'O', 0x5D, - 'P', 0x5E, - 'Q', 0x1F, - 'R', 0x20, - 'S', 0x0D, - 'T', 0x0E, - 'U', 0x4F, - 'V', 0x10, - 'W', 0x51, - 'X', 0x52, - 'Y', 0x13, - 'Z', 0x54, - '0', 0x49, - '1', 0x40, - '2', 0x01, - '3', 0x02, - '4', 0x43, - '5', 0x04, - '6', 0x45, - '7', 0x46, - '8', 0x07, - '9', 0x08, - ' ', 0x7F, - '.', 0x6E, - '(', 0x57, - '+', 0x6D, - '&', 0x15, - '$', 0x62, - '*', 0x23, - ')', 0x2F, - '-', 0x61, - '/', 0x4C, - ',', 0x16, - '\'', 0x0B, - '=', 0x4A, + {'A', 0x64}, + {'B', 0x25}, + {'C', 0x26}, + {'D', 0x67}, + {'E', 0x68}, + {'F', 0x29}, + {'G', 0x2A}, + {'H', 0x6B}, + {'I', 0x2C}, + {'J', 0x58}, + {'K', 0x19}, + {'L', 0x1A}, + {'M', 0x5B}, + {'N', 0x1C}, + {'O', 0x5D}, + {'P', 0x5E}, + {'Q', 0x1F}, + {'R', 0x20}, + {'S', 0x0D}, + {'T', 0x0E}, + {'U', 0x4F}, + {'V', 0x10}, + {'W', 0x51}, + {'X', 0x52}, + {'Y', 0x13}, + {'Z', 0x54}, + {'0', 0x49}, + {'1', 0x40}, + {'2', 0x01}, + {'3', 0x02}, + {'4', 0x43}, + {'5', 0x04}, + {'6', 0x45}, + {'7', 0x46}, + {'8', 0x07}, + {'9', 0x08}, + {' ', 0x7F}, + {'.', 0x6E}, + {'(', 0x57}, + {'+', 0x6D}, + {'&', 0x15}, + {'$', 0x62}, + {'*', 0x23}, + {')', 0x2F}, + {'-', 0x61}, + {'/', 0x4C}, + {',', 0x16}, + {'\'', 0x0B}, + {'=', 0x4A}, }; #define WHEELCHARS_1403 (sizeof(codewheel1403)/sizeof(codewheel1403[0])) diff --git a/Ibm1130/ibm1130_stddev.c b/Ibm1130/ibm1130_stddev.c index 2a350741..adc66f57 100644 --- a/Ibm1130/ibm1130_stddev.c +++ b/Ibm1130/ibm1130_stddev.c @@ -518,18 +518,18 @@ static struct { /* default input mapping for APL */ unsigned char out; } conin_to_APL[] = { /* these map input keys to those in like positions on 1130 keyboard */ - '[', '\r', /* enter (EOF) is APL left arrow */ - ';', '\b', /* backspace is APL [ */ - '\'', '\x15', /* ctrl-U, erase field, is APL ]*/ - '2', '@', /* APL upshift */ - '3', '%', /* APL rightshift */ - '4', '*', /* APL + and - */ - '5', '<', /* APL x and divide */ - '8', '-', /* APL return */ - '9', '/', /* APL backspace */ - '-', IRQ_KEY, /* ctrl-q (INT REQ), APL ATTN */ - '\r', '-', /* APL return */ - '\b', '/' /* APL backspace */ + {'[', '\r'}, /* enter (EOF) is APL left arrow */ + {';', '\b'}, /* backspace is APL [ */ + {'\'', '\x15'}, /* ctrl-U, erase field, is APL ]*/ + {'2', '@'}, /* APL upshift */ + {'3', '%'}, /* APL rightshift */ + {'4', '*'}, /* APL + and - */ + {'5', '<'}, /* APL x and divide */ + {'8', '-'}, /* APL return */ + {'9', '/'}, /* APL backspace */ + {'-', IRQ_KEY}, /* ctrl-q (INT REQ), APL ATTN */ + {'\r', '-'}, /* APL return */ + {'\b', '/'} /* APL backspace */ }; #define NCONIN_TO_APL (sizeof(conin_to_APL)/sizeof(conin_to_APL[0])) @@ -539,136 +539,136 @@ static struct { /* default output mapping for APLPLUS font */ unsigned char out; } conout_to_APL[] = { - '\x01', IGNR_, /* controls */ - '\x03', '\n', - '\x05', IGNR_, /* (black and red are handled by ansi sequences) */ - '\x09', IGNR_, - '\x11', '\b', - '\x21', ' ', - '\x41', '\t', - '\x81', CRLF_, + {'\x01', IGNR_}, /* controls */ + {'\x03', '\n'}, + {'\x05', IGNR_}, /* (black and red are handled by ansi sequences) */ + {'\x09', IGNR_}, + {'\x11', '\b'}, + {'\x21', ' '}, + {'\x41', '\t'}, + {'\x81', CRLF_}, - '\xC4', '\x30', /* (if you're curious, order here is position on APL typeball) */ - '\xE4', '\x38', - '\xD4', '\x37', - '\xF4', '\x35', - '\xDC', '\x33', - '\xFC', '\x31', - '\xC2', '\x29', - '\xE2', '\x9F', - '\xD2', '\x89', - '\xF2', '\x88', - '\xDA', '\xAF', - '\xC6', '\x5E', - '\xE6', '\xAC', - '\xD6', '\x3E', - '\xF6', '\x3D', - '\xDE', '\x3C', - '\xFE', '\xA8', - '\xC0', '\x5D', - '\xE0', '\x39', - '\xD0', '\x36', - '\xF0', '\x34', - '\xD8', '\x32', + {'\xC4', '\x30'}, /* (if you're curious, order here is position on APL typeball) */ + {'\xE4', '\x38'}, + {'\xD4', '\x37'}, + {'\xF4', '\x35'}, + {'\xDC', '\x33'}, + {'\xFC', '\x31'}, + {'\xC2', '\x29'}, + {'\xE2', '\x9F'}, + {'\xD2', '\x89'}, + {'\xF2', '\x88'}, + {'\xDA', '\xAF'}, + {'\xC6', '\x5E'}, + {'\xE6', '\xAC'}, + {'\xD6', '\x3E'}, + {'\xF6', '\x3D'}, + {'\xDE', '\x3C'}, + {'\xFE', '\xA8'}, + {'\xC0', '\x5D'}, + {'\xE0', '\x39'}, + {'\xD0', '\x36'}, + {'\xF0', '\x34'}, + {'\xD8', '\x32'}, - '\x84', '\x84', - '\xA4', '\x59', - '\x94', '\x58', - '\xB4', '\x56', - '\x9C', '\x54', - '\xBC', '\x2F', - '\x82', '\x3B', - '\xA2', '\x9B', - '\x92', '\xBE', - '\xB2', '\x87', - '\x9A', '\x97', - '\x86', '\x85', - '\xA6', '\x86', - '\x96', '\x9C', - '\xB6', '\x9E', - '\x9E', '\x7E', - '\xBE', '\x5C', - '\x80', '\x2C', - '\xA0', '\x5A', - '\x90', '\x57', - '\xB0', '\x55', - '\x98', '\x53', + {'\x84', '\x84'}, + {'\xA4', '\x59'}, + {'\x94', '\x58'}, + {'\xB4', '\x56'}, + {'\x9C', '\x54'}, + {'\xBC', '\x2F'}, + {'\x82', '\x3B'}, + {'\xA2', '\x9B'}, + {'\x92', '\xBE'}, + {'\xB2', '\x87'}, + {'\x9A', '\x97'}, + {'\x86', '\x85'}, + {'\xA6', '\x86'}, + {'\x96', '\x9C'}, + {'\xB6', '\x9E'}, + {'\x9E', '\x7E'}, + {'\xBE', '\x5C'}, + {'\x80', '\x2C'}, + {'\xA0', '\x5A'}, + {'\x90', '\x57'}, + {'\xB0', '\x55'}, + {'\x98', '\x53'}, - '\x44', '\x2B', - '\x64', '\x51', - '\x54', '\x50', - '\x74', '\x4E', - '\x5C', '\x4C', - '\x7C', '\x4A', - '\x42', '\x28', - '\x62', '\xBD', - '\x52', '\xB1', - '\x72', '\x7C', - '\x5A', '\x27', - '\x46', '\x2D', - '\x66', '\x3F', - '\x56', '\x2A', - '\x76', '\x82', - '\x5E', '\x8C', - '\x7E', '\xB0', - '\x40', '\x5B', - '\x60', '\x52', - '\x50', '\x4F', - '\x70', '\x4D', - '\x58', '\x4B', + {'\x44', '\x2B'}, + {'\x64', '\x51'}, + {'\x54', '\x50'}, + {'\x74', '\x4E'}, + {'\x5C', '\x4C'}, + {'\x7C', '\x4A'}, + {'\x42', '\x28'}, + {'\x62', '\xBD'}, + {'\x52', '\xB1'}, + {'\x72', '\x7C'}, + {'\x5A', '\x27'}, + {'\x46', '\x2D'}, + {'\x66', '\x3F'}, + {'\x56', '\x2A'}, + {'\x76', '\x82'}, + {'\x5E', '\x8C'}, + {'\x7E', '\xB0'}, + {'\x40', '\x5B'}, + {'\x60', '\x52'}, + {'\x50', '\x4F'}, + {'\x70', '\x4D'}, + {'\x58', '\x4B'}, - '\x04', '\xD7', - '\x24', '\x48', - '\x14', '\x47', - '\x34', '\x45', - '\x1C', '\x43', - '\x3C', '\x41', - '\x02', '\x3A', - '\x22', '\xBC', - '\x12', '\x5F', - '\x32', '\x98', - '\x1A', '\x83', - '\x06', '\xF7', - '\x26', '\x91', - '\x16', '\x92', - '\x36', '\xB9', - '\x1E', '\x9D', - '\x3E', '\xB8', - '\x00', '\x2E', - '\x20', '\x49', - '\x10', '\x46', - '\x30', '\x44', - '\x18', '\x42', + {'\x04', '\xD7'}, + {'\x24', '\x48'}, + {'\x14', '\x47'}, + {'\x34', '\x45'}, + {'\x1C', '\x43'}, + {'\x3C', '\x41'}, + {'\x02', '\x3A'}, + {'\x22', '\xBC'}, + {'\x12', '\x5F'}, + {'\x32', '\x98'}, + {'\x1A', '\x83'}, + {'\x06', '\xF7'}, + {'\x26', '\x91'}, + {'\x16', '\x92'}, + {'\x36', '\xB9'}, + {'\x1E', '\x9D'}, + {'\x3E', '\xB8'}, + {'\x00', '\x2E'}, + {'\x20', '\x49'}, + {'\x10', '\x46'}, + {'\x30', '\x44'}, + {'\x18', '\x42'}, }; #define NCONOUT_TO_APL (sizeof(conout_to_APL)/sizeof(conout_to_APL[0])) static OS_MAP default_os_map[] = /* overstrike mapping for APLPLUS font */ { - '\x8a', 2, "\x5e\x7e", - '\x8b', 2, "\x9f\x7e", - '\x8d', 2, "\x8c\x27", - '\x8e', 3, "\x8c\x2d\x3a", - '\x8f', 2, "\x91\x5f", - '\x90', 2, "\x92\x7e", - '\x93', 2, "\x91\x7c", - '\x94', 2, "\x92\x7c", - '\x95', 2, "\xb0\x82", - '\x96', 2, "\xb0\x83", - '\x99', 2, "\x2d\x5c", - '\x9a', 2, "\x2d\x2f", - '\xae', 2, "\x2c\x2d", - '\xb2', 2, "\xb1\x7c", - '\xb3', 2, "\xb1\x5c", - '\xb4', 2, "\xb1\x2d", - '\xb5', 2, "\xb1\x2a", - '\xba', 2, "\xb9\x5f", - '\xd0', 2, "\x30\x7e", - '\xd8', 2, "\x4f\x2f", - '\x21', 2, "\x27\x2e", - '\xa4', 2, "\xb0\xb1", /* map degree in circle to circle cross (APL uses this as character error symbol) */ - '\xf0', 2, "\xb0\xa8", - '\xfe', 2, "\x3a\xa8", + {'\x8a', 2, "\x5e\x7e"}, + {'\x8b', 2, "\x9f\x7e"}, + {'\x8d', 2, "\x8c\x27"}, + {'\x8e', 3, "\x8c\x2d\x3a"}, + {'\x8f', 2, "\x91\x5f"}, + {'\x90', 2, "\x92\x7e"}, + {'\x93', 2, "\x91\x7c"}, + {'\x94', 2, "\x92\x7c"}, + {'\x95', 2, "\xb0\x82"}, + {'\x96', 2, "\xb0\x83"}, + {'\x99', 2, "\x2d\x5c"}, + {'\x9a', 2, "\x2d\x2f"}, + {'\xae', 2, "\x2c\x2d"}, + {'\xb2', 2, "\xb1\x7c"}, + {'\xb3', 2, "\xb1\x5c"}, + {'\xb4', 2, "\xb1\x2d"}, + {'\xb5', 2, "\xb1\x2a"}, + {'\xba', 2, "\xb9\x5f"}, + {'\xd0', 2, "\x30\x7e"}, + {'\xd8', 2, "\x4f\x2f"}, + {'\x21', 2, "\x27\x2e"}, + {'\xa4', 2, "\xb0\xb1"}, /* map degree in circle to circle cross (APL uses this as character error symbol) */ + {'\xf0', 2, "\xb0\xa8"}, + {'\xfe', 2, "\x3a\xa8"}, }; #ifdef __SUNPRO_C diff --git a/Interdata/id16_cpu.c b/Interdata/id16_cpu.c index bfcc6d45..beb5ff49 100644 --- a/Interdata/id16_cpu.c +++ b/Interdata/id16_cpu.c @@ -193,7 +193,7 @@ uint32 GREG[16] = { 0 }; /* general registers */ uint16 *M = NULL; /* memory */ uint32 *R = &GREG[0]; /* register set ptr */ uint32 F[8] = { 0 }; /* sp fp registers */ -dpr_t D[8] = { 0 }; /* dp fp registers */ +dpr_t D[8] = { {0, 0} }; /* dp fp registers */ uint32 PSW = 0; /* processor status word */ uint32 psw_mask = PSW_x16; /* PSW mask */ uint32 PC = 0; /* program counter */ diff --git a/Interdata/id16_sys.c b/Interdata/id16_sys.c index 9489d0c6..358cc666 100644 --- a/Interdata/id16_sys.c +++ b/Interdata/id16_sys.c @@ -352,9 +352,8 @@ return -1; t_stat fprint_sym_m (FILE *of, t_addr addr, t_value *val) { -uint32 i, j, inst, r1, r2, ea, vp; +uint32 i, j, inst, r1, r2, ea; -vp = 0; inst = val[0]; /* first 16b */ ea = val[1]; /* second 16b */ for (i = 0; opcode[i] != NULL; i++) { /* loop thru ops */ @@ -570,7 +569,7 @@ return -1; t_stat parse_sym_m (char *cptr, t_addr addr, t_value *val) { uint32 i, j, t, df, db, inst; -int32 st, r1, r2; +int32 r1, r2; t_stat r; char *tptr, gbuf[CBUFSIZE]; @@ -627,7 +626,6 @@ switch (j) { /* case on class */ r = get_addr (gbuf, &tptr, &t, addr); /* get addr */ if ((r != SCPE_OK) || (t & 1) || *tptr) /* error if odd */ return SCPE_ARG; - st = t; /* signed version */ db = (addr - t) & 0x1F; /* back displ */ df = (t - addr) & 0x1F; /* fwd displ */ if ((t == ((addr - db) & VAMASK16)) && /* back work and */ diff --git a/Interdata/id32_cpu.c b/Interdata/id32_cpu.c index 3f3e356d..ef7520ca 100644 --- a/Interdata/id32_cpu.c +++ b/Interdata/id32_cpu.c @@ -2315,7 +2315,7 @@ t_stat cpu_set_size (UNIT *uptr, int32 val, char *cptr, void *desc) uint32 mc = 0; uint32 i; -if ((val <= 0) || (val > MAXMEMSIZE32) || ((val & 0xFFFF) != 0)) +if ((val <= 0) || (((unsigned)val) > MAXMEMSIZE32) || ((val & 0xFFFF) != 0)) return SCPE_ARG; for (i = val; i < MEMSIZE; i = i + 4) mc = mc | M[i >> 2]; diff --git a/Interdata/id32_sys.c b/Interdata/id32_sys.c index 7f85fa83..288fd890 100644 --- a/Interdata/id32_sys.c +++ b/Interdata/id32_sys.c @@ -669,12 +669,11 @@ return -3; t_stat parse_sym_m (char *cptr, t_addr addr, t_value *val) { -uint32 i, j, df, db, t, inst, vp; +uint32 i, j, df, db, t, inst; int32 st, r1, r2, rx2; t_stat r; char *tptr, gbuf[CBUFSIZE]; -vp = 0; cptr = get_glyph (cptr, gbuf, 0); /* get opcode */ for (i = 0; (opcode[i] != NULL) && (strcmp (opcode[i], gbuf) != 0) ; i++) ; if (opcode[i] == NULL) diff --git a/Interdata/id_dp.c b/Interdata/id_dp.c index de31cfbf..33bd84a9 100644 --- a/Interdata/id_dp.c +++ b/Interdata/id_dp.c @@ -392,7 +392,6 @@ t_stat dp_svc (UNIT *uptr) uint32 u = uptr - dp_dev.units; /* get unit number */ int32 cyl = uptr->CYL; /* get cylinder */ uint32 dtype = GET_DTYPE (uptr->flags); /* get drive type */ -uint32 t; t_stat r; if (uptr->STD & STD_MOV) { /* seek? */ @@ -421,7 +420,7 @@ switch (dp_cmd & 0x7) { /* case on func */ if ((r = dp_rds (uptr))) /* read sec, err? */ return r; dp_1st = 0; - t = sch_wrmem (dp_dib.sch, dpxb, DP_NUMBY); /* write to memory */ + sch_wrmem (dp_dib.sch, dpxb, DP_NUMBY); /* write to memory */ if (sch_actv (dp_dib.sch, dp_dib.dno)) { /* more to do? */ sim_activate (uptr, dp_rtime); /* reschedule */ return SCPE_OK; diff --git a/Interdata/id_idc.c b/Interdata/id_idc.c index f888ba6a..ccd4f487 100644 --- a/Interdata/id_idc.c +++ b/Interdata/id_idc.c @@ -503,7 +503,6 @@ t_stat idc_svc (UNIT *uptr) int32 diff; uint32 f, u = uptr - idc_dev.units; /* get unit number */ uint32 dtype = GET_DTYPE (uptr->flags); /* get drive type */ -uint32 t; t_stat r; if (uptr->FNC & CMC_DRV) { /* drive cmd? */ @@ -579,7 +578,7 @@ switch (uptr->FNC & CMC_MASK) { /* case on func */ if ((r = idc_rds (uptr))) /* read sec, err? */ return r; idc_1st = 0; - t = sch_wrmem (idc_dib.sch, idcxb, IDC_NUMBY); /* write mem */ + sch_wrmem (idc_dib.sch, idcxb, IDC_NUMBY); /* write mem */ if (sch_actv (idc_dib.sch, idc_dib.dno)) { /* more to do? */ sim_activate (uptr, idc_rtime); /* reschedule */ return SCPE_OK; diff --git a/NOVA/eclipse_cpu.c b/NOVA/eclipse_cpu.c index 8c0b8166..ddc0e788 100644 --- a/NOVA/eclipse_cpu.c +++ b/NOVA/eclipse_cpu.c @@ -5925,7 +5925,7 @@ static const int32 boot_rom[] = { t_stat cpu_boot (int32 unitno, DEVICE *dptr) { -int32 i; +size_t i; extern int32 saved_PC; for (i = 0; i < BOOT_LEN; i++) M[BOOT_START + i] = boot_rom[i]; diff --git a/NOVA/nova_qty.c b/NOVA/nova_qty.c index 1f14de1a..7a3b0acc 100644 --- a/NOVA/nova_qty.c +++ b/NOVA/nova_qty.c @@ -133,7 +133,7 @@ int32 qty_auto = 0 ; /* QTY auto disconnect int32 qty_polls = 0 ; /* total 'qty_svc' polls */ -TMLN qty_ldsc[ QTY_MAX ] = { 0 } ; /* QTY line descriptors */ +TMLN qty_ldsc[ QTY_MAX ] = { {0} } ; /* QTY line descriptors */ TMXR qty_desc = { QTY_MAX, 0, 0, qty_ldsc } ; /* mux descriptor */ int32 qty_status[ QTY_MAX ] = { 0 } ; /* QTY line status */ /* (must be at least 32 bits) */ diff --git a/PDP1/pdp1_cpu.c b/PDP1/pdp1_cpu.c index a6a76a14..b59c469e 100644 --- a/PDP1/pdp1_cpu.c +++ b/PDP1/pdp1_cpu.c @@ -1606,7 +1606,7 @@ t_stat cpu_set_size (UNIT *uptr, int32 val, char *cptr, void *desc) int32 mc = 0; uint32 i; -if ((val <= 0) || (val > MAXMEMSIZE) || ((val & 07777) != 0)) +if ((val <= 0) || (((size_t)val) > MAXMEMSIZE) || ((val & 07777) != 0)) return SCPE_ARG; for (i = val; i < MEMSIZE; i++) mc = mc | M[i]; diff --git a/PDP10/pdp10_cpu.c b/PDP10/pdp10_cpu.c index b8c22e43..5bae639c 100644 --- a/PDP10/pdp10_cpu.c +++ b/PDP10/pdp10_cpu.c @@ -2385,7 +2385,7 @@ a10 ea; d10 inst, indrct; int32 i, pflgs = 0; t_addr adn, max_returns = MAX_SUB_RETURN_SKIP; -int32 xr, ac; +int32 xr; if (!caveats_displayed) { caveats_displayed = TRUE; @@ -2400,7 +2400,6 @@ switch (GET_OP(inst)) case 0265: /* JSP */ case 0266: /* JSA */ case 0267: /* JRA */ - ac = GET_AC (inst); /* get AC */ for (indrct = inst, i = 0; i < ind_max; i++) {/* calc eff addr */ ea = GET_ADDR (indrct); xr = GET_XR (indrct); diff --git a/PDP10/pdp10_lp20.c b/PDP10/pdp10_lp20.c index 79f3f31e..36b7db1f 100644 --- a/PDP10/pdp10_lp20.c +++ b/PDP10/pdp10_lp20.c @@ -1110,7 +1110,7 @@ while (!feof(vfile)) { c = fscanf (vfile, " %u:", &line); if (c == EOF) break; - if ((c < 1) || (line < 0) || (line >= (sizeof (davfu)/sizeof davfu[0]))) + if ((c < 1) || (line < 0) || (((size_t)line) >= (sizeof (davfu)/sizeof davfu[0]))) goto fmt_err; if (line+1 > dvlnt) dvlnt = line+1; diff --git a/PDP10/pdp10_rp.c b/PDP10/pdp10_rp.c index 5adab55d..a8049ab9 100644 --- a/PDP10/pdp10_rp.c +++ b/PDP10/pdp10_rp.c @@ -615,12 +615,11 @@ return SCPE_OK; t_stat rp_wr (int32 data, int32 PA, int32 access) { -int32 cs1f, drv, dtype, i, j; +int32 cs1f, drv, i, j; UNIT *uptr; cs1f = 0; /* no int on cs1 upd */ drv = GET_UNIT (rpcs2); /* get current unit */ -dtype = GET_DTYPE (rp_unit[drv].flags); /* get drive type */ uptr = rp_dev.units + drv; /* get unit */ j = (PA >> 1) & 037; /* get reg offset */ if (reg_in_drive[j] && (rp_unit[drv].flags & UNIT_DIS)) { /* nx disk */ diff --git a/PDP10/pdp10_sys.c b/PDP10/pdp10_sys.c index 30b5ee23..cd8cdef9 100644 --- a/PDP10/pdp10_sys.c +++ b/PDP10/pdp10_sys.c @@ -700,11 +700,10 @@ static const char *devnam[NUMDEV] = { t_stat fprint_sym (FILE *of, t_addr addr, t_value *val, UNIT *uptr, int32 sw) { -int32 i, j, c, cflag, ac, xr, y, dev; +int32 i, j, c, ac, xr, y, dev; d10 inst; inst = val[0]; -cflag = (uptr == NULL) || (uptr == &cpu_unit); if (sw & SWMASK ('A')) { /* ASCII? */ if (inst > 0377) return SCPE_ARG; @@ -827,12 +826,11 @@ return (ind | (xr << 18) | val); t_stat parse_sym (char *cptr, t_addr addr, UNIT *uptr, t_value *val, int32 sw) { -int32 cflag, i, j; +int32 i, j; t_value ac, dev; t_stat r; char gbuf[CBUFSIZE]; -cflag = (uptr == NULL) || (uptr == &cpu_unit); while (isspace (*cptr)) cptr++; for (i = 0; i < 6; i++) { if (cptr[i] == 0) { diff --git a/PDP11/pdp11_cis.c b/PDP11/pdp11_cis.c index 24d33997..b0ef550b 100644 --- a/PDP11/pdp11_cis.c +++ b/PDP11/pdp11_cis.c @@ -203,98 +203,99 @@ extern int32 calc_ints (int32 nipl, int32 trq); /* Table of instruction operands */ static int32 opntab[128][MAXOPN] = { - 0, 0, 0, 0, 0, 0, 0, 0, /* 000 - 007 */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, /* 010 - 017 */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, /* LD2R */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, /* MOVC */ - 0, 0, 0, 0, /* MOVRC */ - 0, 0, 0, 0, /* MOVTC */ - 0, 0, 0, 0, /* 033 */ - 0, 0, 0, 0, 0, 0, 0, 0, /* 034 - 037 */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, /* LOCC */ - 0, 0, 0, 0, /* SKPC */ - 0, 0, 0, 0, /* SCANC */ - 0, 0, 0, 0, /* SPANC */ - 0, 0, 0, 0, /* CMPC */ - 0, 0, 0, 0, /* MATC */ - 0, 0, 0, 0, 0, 0, 0, 0, /* 046 - 047 */ - R0_DESC, R2_DESC, R4_DESC, 0, /* ADDN */ - R0_DESC, R2_DESC, R4_DESC, 0, /* SUBN */ - R0_DESC, R2_DESC, 0, 0, /* CMPN */ - R0_DESC, 0, 0, 0, /* CVTNL */ - R0_DESC, R2_DESC, 0, 0, /* CVTPN */ - R0_DESC, R2_DESC, 0, 0, /* CVTNP */ - R0_DESC, R2_DESC, R4_ARG, 0, /* ASHN */ - R0_DESC, 0, 0, 0, /* CVTLN */ - 0, 0, 0, 0, 0, 0, 0, 0, /* LD3R */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - R0_DESC, R2_DESC, R4_DESC, 0, /* ADDP */ - R0_DESC, R2_DESC, R4_DESC, 0, /* SUBP */ - R0_DESC, R2_DESC, 0, 0, /* CMPP */ - R0_DESC, 0, 0, 0, /* CVTPL */ - R0_DESC, R2_DESC, R4_DESC, 0, /* MULP */ - R0_DESC, R2_DESC, R4_DESC, 0, /* DIVP */ - R0_DESC, R2_DESC, R4_ARG, 0, /* ASHP */ - R0_DESC, 0, 0, 0, /* CVTLP */ - 0, 0, 0, 0, 0, 0, 0, 0, /* 100 - 107 */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, /* 110 - 117 */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, /* 120 - 127 */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - IN_DESC, IN_DESC, IN_ARG, 0, /* MOVCI */ - IN_DESC, IN_DESC, IN_ARG, 0, /* MOVRCI */ - IN_DESC, IN_DESC, IN_ARG, IN_ARG, /* MOVTCI */ - 0, 0, 0, 0, /* 133 */ - 0, 0, 0, 0, 0, 0, 0, 0, /* 134 - 137 */ - 0, 0, 0, 0, 0, 0, 0, 0, - IN_DESC, IN_ARG, 0, 0, /* LOCCI */ - IN_DESC, IN_ARG, 0, 0, /* SKPCI */ - IN_DESC, IN_DESC, 0, 0, /* SCANCI */ - IN_DESC, IN_DESC, 0, 0, /* SPANCI */ - IN_DESC, IN_DESC, IN_ARG, 0, /* CMPCI */ - IN_DESC, IN_DESC, 0, 0, /* MATCI */ - 0, 0, 0, 0, 0, 0, 0, 0, /* 146 - 147 */ - IN_DESC, IN_DESC, IN_DESC, 0, /* ADDNI */ - IN_DESC, IN_DESC, IN_DESC, 0, /* SUBNI */ - IN_DESC, IN_DESC, 0, 0, /* CMPNI */ - IN_DESC, IN_ARG, 0, 0, /* CVTNLI */ - IN_DESC, IN_DESC, 0, 0, /* CVTPNI */ - IN_DESC, IN_DESC, 0, 0, /* CVTNPI */ - IN_DESC, IN_DESC, IN_ARG, 0, /* ASHNI */ - IN_DESC, IN_DESC, 0, 0, /* CVTLNI */ - 0, 0, 0, 0, 0, 0, 0, 0, /* 160 - 167 */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - IN_DESC, IN_DESC, IN_DESC, 0, /* ADDPI */ - IN_DESC, IN_DESC, IN_DESC, 0, /* SUBPI */ - IN_DESC, IN_DESC, 0, 0, /* CMPPI */ - IN_DESC, IN_ARG, 0, 0, /* CVTPLI */ - IN_DESC, IN_DESC, IN_DESC, 0, /* MULPI */ - IN_DESC, IN_DESC, IN_DESC, 0, /* DIVPI */ - IN_DESC, IN_DESC, IN_ARG, 0, /* ASHPI */ - IN_DESC, IN_DESC, 0, 0 /* CVTLPI */ + {0, 0, 0, 0}, {0, 0, 0, 0}, /* 000 - 007 */ + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, /* 010 - 017 */ + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, /* LD2R */ + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, /* MOVC */ + {0, 0, 0, 0}, /* MOVRC */ + {0, 0, 0, 0}, /* MOVTC */ + {0, 0, 0, 0}, /* 033 */ + {0, 0, 0, 0}, {0, 0, 0, 0}, /* 034 - 037 */ + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, /* LOCC */ + {0, 0, 0, 0}, /* SKPC */ + {0, 0, 0, 0}, /* SCANC */ + {0, 0, 0, 0}, /* SPANC */ + {0, 0, 0, 0}, /* CMPC */ + {0, 0, 0, 0}, /* MATC */ + {0, 0, 0, 0}, {0, 0, 0, 0}, /* 046 - 047 */ + {R0_DESC, R2_DESC, R4_DESC, 0}, /* ADDN */ + {R0_DESC, R2_DESC, R4_DESC, 0}, /* SUBN */ + {R0_DESC, R2_DESC, 0, 0}, /* CMPN */ + {R0_DESC, 0, 0, 0}, /* CVTNL */ + {R0_DESC, R2_DESC, 0, 0}, /* CVTPN */ + {R0_DESC, R2_DESC, 0, 0}, /* CVTNP */ + {R0_DESC, R2_DESC, R4_ARG, 0}, /* ASHN */ + {R0_DESC, 0, 0, 0}, /* CVTLN */ + {0, 0, 0, 0}, {0, 0, 0, 0}, /* LD3R */ + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {R0_DESC, R2_DESC, R4_DESC, 0}, /* ADDP */ + {R0_DESC, R2_DESC, R4_DESC, 0}, /* SUBP */ + {R0_DESC, R2_DESC, 0, 0}, /* CMPP */ + {R0_DESC, 0, 0, 0}, /* CVTPL */ + {R0_DESC, R2_DESC, R4_DESC, 0}, /* MULP */ + {R0_DESC, R2_DESC, R4_DESC, 0}, /* DIVP */ + {R0_DESC, R2_DESC, R4_ARG, 0}, /* ASHP */ + {R0_DESC, 0, 0, 0}, /* CVTLP */ + {0, 0, 0, 0}, {0, 0, 0, 0}, /* 100 - 107 */ + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, /* 110 - 117 */ + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, /* 120 - 127 */ + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {IN_DESC, IN_DESC, IN_ARG, 0}, /* MOVCI */ + {IN_DESC, IN_DESC, IN_ARG, 0}, /* MOVRCI */ + {IN_DESC, IN_DESC, IN_ARG, IN_ARG}, /* MOVTCI */ + {0, 0, 0, 0}, /* 133 */ + {0, 0, 0, 0}, {0, 0, 0, 0}, /* 134 - 137 */ + {0, 0, 0, 0}, {0, 0, 0, 0}, + {IN_DESC, IN_ARG, 0, 0}, /* LOCCI */ + {IN_DESC, IN_ARG, 0, 0}, /* SKPCI */ + {IN_DESC, IN_DESC, 0, 0}, /* SCANCI */ + {IN_DESC, IN_DESC, 0, 0}, /* SPANCI */ + {IN_DESC, IN_DESC, IN_ARG, 0}, /* CMPCI */ + {IN_DESC, IN_DESC, 0, 0}, /* MATCI */ + {0, 0, 0, 0}, {0, 0, 0, 0}, /* 146 - 147 */ + {IN_DESC, IN_DESC, IN_DESC, 0}, /* ADDNI */ + {IN_DESC, IN_DESC, IN_DESC, 0}, /* SUBNI */ + {IN_DESC, IN_DESC, 0, 0}, /* CMPNI */ + {IN_DESC, IN_ARG, 0, 0}, /* CVTNLI */ + {IN_DESC, IN_DESC, 0, 0}, /* CVTPNI */ + {IN_DESC, IN_DESC, 0, 0}, /* CVTNPI */ + {IN_DESC, IN_DESC, IN_ARG, 0}, /* ASHNI */ + {IN_DESC, IN_DESC, 0, 0}, /* CVTLNI */ + {0, 0, 0, 0}, {0, 0, 0, 0}, /* 160 - 167 */ + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {IN_DESC, IN_DESC, IN_DESC, 0}, /* ADDPI */ + {IN_DESC, IN_DESC, IN_DESC, 0}, /* SUBPI */ + {IN_DESC, IN_DESC, 0, 0}, /* CMPPI */ + {IN_DESC, IN_ARG, 0, 0}, /* CVTPLI */ + {IN_DESC, IN_DESC, IN_DESC, 0}, /* MULPI */ + {IN_DESC, IN_DESC, IN_DESC, 0}, /* DIVPI */ + {IN_DESC, IN_DESC, IN_ARG, 0}, /* ASHPI */ + {IN_DESC, IN_DESC, 0, 0} /* CVTLPI */ }; + /* ASCII to overpunch table: sign is <7>, digit is <4:0> */ static int32 overbin[128] = { diff --git a/PDP11/pdp11_cpu.c b/PDP11/pdp11_cpu.c index de457252..968519d9 100644 --- a/PDP11/pdp11_cpu.c +++ b/PDP11/pdp11_cpu.c @@ -1523,7 +1523,7 @@ while (reason == 0) { Z = V = C = 1; /* N = 0, Z = 1 */ break; } - if ((src == 020000000000) && (src2 == 0177777)) { + if ((((uint32)src) == 020000000000) && (src2 == 0177777)) { V = 1; /* J11,11/70 compat */ N = Z = C = 0; /* N = Z = 0 */ break; diff --git a/PDP11/pdp11_cr.c b/PDP11/pdp11_cr.c index 06e6ff18..439bd9e3 100644 --- a/PDP11/pdp11_cr.c +++ b/PDP11/pdp11_cr.c @@ -1426,7 +1426,7 @@ t_stat cr_reset ( DEVICE *dptr ) fprintf (sim_deb, "cr_reset\n"); if (!translation_help) { - int i; + size_t i; const char trans_hlp[] = "TRANSLATION={"; size_t size = sizeof(trans_hlp) +1; @@ -1729,7 +1729,7 @@ t_stat cr_set_trans ( UNIT *uptr, char *cptr, void *desc ) { - int i; + size_t i; if (!cptr) return (SCPE_MISVAL); @@ -1750,7 +1750,8 @@ t_stat cr_show_trans ( FILE *st, int32 val, void *desc ) { - int i; + size_t i; + for (i = 1; i < NTRANS; i++ ) if (transcodes[i].table == codeTbl) { fprintf (st, "translation=%s", transcodes[i].name); diff --git a/PDP11/pdp11_kmc.c b/PDP11/pdp11_kmc.c index 04c17fb9..da0f2ede 100644 --- a/PDP11/pdp11_kmc.c +++ b/PDP11/pdp11_kmc.c @@ -1998,7 +1998,7 @@ static void kdp_receive(int32 dupidx, int count) { UNIT *rxup; UNUSED_ARG (count); - assert ((dupidx >= 0) && (dupidx < DIM(dupState))); + assert ((dupidx >= 0) && (((size_t)dupidx) < DIM(dupState))); d = &dupState[dupidx]; assert (dupidx == d->dupidx); k = d->kmc; diff --git a/PDP11/pdp11_rf.c b/PDP11/pdp11_rf.c index 106feb8b..46a5f60b 100644 --- a/PDP11/pdp11_rf.c +++ b/PDP11/pdp11_rf.c @@ -563,7 +563,7 @@ text3 = "\n" " RF11 data files are buffered in memory; therefore, end of file and OS\n" " I/O errors cannot occur.\n"; -fprintf (st, "%s", text2); +fprintf (st, "%s", text3); return SCPE_OK; } diff --git a/PDP11/pdp11_rs.c b/PDP11/pdp11_rs.c index 8cc5b86c..9d9d6ea8 100644 --- a/PDP11/pdp11_rs.c +++ b/PDP11/pdp11_rs.c @@ -200,21 +200,21 @@ char *rs_description (DEVICE *dptr); DIB rs_dib = { MBA_RS, 0, &rs_mbrd, &rs_mbwr, 0, 0, 0, { &rs_abort } }; UNIT rs_unit[] = { - { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO+ + { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO| UNIT_BUFABLE|UNIT_MUSTBUF|(RS04_DTYPE << UNIT_V_DTYPE), RS04_SIZE) }, - { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO+ + { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO| UNIT_BUFABLE|UNIT_MUSTBUF|(RS04_DTYPE << UNIT_V_DTYPE), RS04_SIZE) }, - { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO+ + { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO| UNIT_BUFABLE|UNIT_MUSTBUF|(RS04_DTYPE << UNIT_V_DTYPE), RS04_SIZE) }, - { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO+ + { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO| UNIT_BUFABLE|UNIT_MUSTBUF|(RS04_DTYPE << UNIT_V_DTYPE), RS04_SIZE) }, - { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO+ + { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO| UNIT_BUFABLE|UNIT_MUSTBUF|(RS04_DTYPE << UNIT_V_DTYPE), RS04_SIZE) }, - { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO+ + { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO| UNIT_BUFABLE|UNIT_MUSTBUF|(RS04_DTYPE << UNIT_V_DTYPE), RS04_SIZE) }, - { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO+ + { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO| UNIT_BUFABLE|UNIT_MUSTBUF|(RS04_DTYPE << UNIT_V_DTYPE), RS04_SIZE) }, - { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO+ + { UDATA (&rs_svc, UNIT_FIX|UNIT_ATTABLE|UNIT_DISABLE|UNIT_AUTO| UNIT_BUFABLE|UNIT_MUSTBUF|(RS04_DTYPE << UNIT_V_DTYPE), RS04_SIZE) } }; @@ -330,7 +330,6 @@ return SCPE_OK; t_stat rs_mbwr (int32 data, int32 ofs, int32 drv) { -int32 dtype; UNIT *uptr; uptr = rs_dev.units + drv; /* get unit */ @@ -341,7 +340,6 @@ if ((ofs != RS_AS_OF) && sim_is_active (uptr)) { /* unit busy? */ rs_update_ds (0, drv); return SCPE_OK; } -dtype = GET_DTYPE (uptr->flags); /* get drive type */ ofs = ofs & MBA_RMASK; /* mask offset */ switch (ofs) { /* decode PA<5:1> */ @@ -382,7 +380,7 @@ return SCPE_OK; t_stat rs_go (int32 drv) { -int32 fnc, dtype, t; +int32 fnc, t; UNIT *uptr; fnc = GET_FNC (rscs1[drv]); /* get function */ @@ -391,7 +389,6 @@ if (DEBUG_PRS (rs_dev)) drv, rs_fname[fnc], rsds[drv], rsda[drv], rser[drv]); uptr = rs_dev.units + drv; /* get unit */ rs_clr_as (AS_U0 << drv); /* clear attention */ -dtype = GET_DTYPE (uptr->flags); /* get drive type */ if ((fnc != FNC_DCLR) && (rsds[drv] & DS_ERR)) { /* err & ~clear? */ rs_set_er (ER_ILF, drv); /* not allowed */ rs_update_ds (DS_ATA, drv); /* set attention */ diff --git a/PDP11/pdp11_ts.c b/PDP11/pdp11_ts.c index 164e72b0..e9a97855 100644 --- a/PDP11/pdp11_ts.c +++ b/PDP11/pdp11_ts.c @@ -1,6 +1,6 @@ /* pdp11_ts.c: TS11/TSV05 magnetic tape simulator - Copyright (c) 1993-2013, Robert M Supnik + Copyright (c) 1993-2014, Robert M Supnik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -25,6 +25,7 @@ ts TS11/TSV05 magtape + 27-Oct-14 RMS Fixed bug in read forward with byte swap 23-Oct-13 RMS Revised for new boot setup routine 19-Mar-12 RMS Fixed declaration of cpu_opt (Mark Pizzolato) 22-May-10 RMS Fixed t_addr printouts for 64b big-endian systems @@ -591,7 +592,7 @@ msgxs0 = msgxs0 | XS0_MOT; /* tape has moved */ if (cmdhdr & CMD_SWP) { /* swapped? */ for (i = 0; i < wbc; i++) { /* copy buffer */ wa = tsba ^ 1; /* apply OPP */ - if (Map_WriteB (tsba, 1, &tsxb[i])) { /* store byte, nxm? */ + if (Map_WriteB (wa, 1, &tsxb[i])) { /* store byte, nxm? */ tssr = ts_updtssr (tssr | TSSR_NXM); /* set error */ return (XTC (XS0_RLS, TC4)); } @@ -627,7 +628,7 @@ if (st != MTSE_OK) /* error? */ return ts_map_status (st); if (fc == 0) /* byte count */ fc = 0200000; -tsba = (cmdadh << 16) | cmdadl + fc; /* buf addr */ +tsba = ((cmdadh << 16) | cmdadl) + fc; /* buf addr */ wbc = (tbc > fc)? fc: tbc; /* cap buf size */ msgxs0 = msgxs0 | XS0_MOT; /* tape has moved */ for (i = wbc; i > 0; i--) { /* copy buffer */ diff --git a/VAX/vax750_cmi.c b/VAX/vax750_cmi.c index 2251b0a2..bac47aa6 100644 --- a/VAX/vax750_cmi.c +++ b/VAX/vax750_cmi.c @@ -515,8 +515,7 @@ return; int32 machine_check (int32 p1, int32 opc, int32 cc, int32 delta) { -int32 acc, err; -err = (GET_TRAP (trpirq) << 4) | (pme << 3) | ASTLVL; /* error word */ +int32 acc; if (p1 == MCHK_BPE) /* bus error? */ cc = intexc (SCB_MCHK, cc, 0, IE_EXC); /* take normal exception */ else diff --git a/VAX/vax750_mem.c b/VAX/vax750_mem.c index 9ae672a1..63b6544c 100644 --- a/VAX/vax750_mem.c +++ b/VAX/vax750_mem.c @@ -234,7 +234,6 @@ return "Memory controller"; t_stat cpu_show_memory (FILE* st, UNIT* uptr, int32 val, void* desc) { -uint32 memsize = (uint32)(MEMSIZE>>10); uint32 baseaddr = 0; struct { uint32 capacity; diff --git a/VAX/vax_cpu.c b/VAX/vax_cpu.c index 53a73897..64485fc0 100644 --- a/VAX/vax_cpu.c +++ b/VAX/vax_cpu.c @@ -554,7 +554,7 @@ return buf; t_stat sim_instr (void) { -volatile int32 opc, cc; /* used by setjmp */ +volatile int32 opc = 0, cc; /* used by setjmp */ volatile int32 acc; /* set by setjmp */ int abortval; t_stat r; diff --git a/scp.c b/scp.c index 6abfb583..6f4e627e 100644 --- a/scp.c +++ b/scp.c @@ -3244,8 +3244,8 @@ return SCPE_OK; t_stat send_cmd (int32 flag, char *cptr) { -char gbuf[CBUFSIZE], *gptr = gbuf, *tptr; -uint8 dbuf[CBUFSIZE], *dptr = dbuf; +char gbuf[CBUFSIZE], *tptr; +uint8 dbuf[CBUFSIZE]; uint32 dsize = 0; uint32 delay = 0; uint32 after = 0; @@ -4696,14 +4696,16 @@ if (dir) { #endif t_offset FileSize, TotalSize = 0; int DirCount = 0, FileCount = 0; - char FileName[PATH_MAX + 1], *MatchName; + char FileName[PATH_MAX + 1]; +#if defined (HAVE_FNMATCH) + char *MatchName = 1 + strrchr (cptr, '/');; +#endif char *c; struct tm *local; #if defined (HAVE_GLOB) - int i; + size_t i; #endif - MatchName = 1 + strrchr (cptr, '/'); sim_printf (" Directory of %s\n\n", DirName[0] ? DirName : "/"); #if defined (HAVE_GLOB) for (i=0; iafter; int32 cnt = 0; diff --git a/sim_console.c b/sim_console.c index efa3445f..374132f2 100644 --- a/sim_console.c +++ b/sim_console.c @@ -611,11 +611,14 @@ t_stat stat_nomessage = stat & SCPE_NOMESSAGE; /* extract possible message supr cmdp = find_cmd (cmd); stat = SCPE_BARE_STATUS(stat); /* remove possible flag */ -if (cmdp && (cmdp->message)) /* special message handler? */ - cmdp->message (NULL, stat); /* let it deal with display */ -else - if (stat >= SCPE_BASE) /* error? */ - sim_printf ("%s\r\n", sim_error_text (stat)); +if (!stat_nomessage) { + if (cmdp && (cmdp->message)) /* special message handler? */ + cmdp->message (NULL, stat); /* let it deal with display */ + else { + if (stat >= SCPE_BASE) /* error? */ + sim_printf ("%s\r\n", sim_error_text (stat)); + } + } return stat; } diff --git a/sim_disk.c b/sim_disk.c index b3602746..b9511b53 100644 --- a/sim_disk.c +++ b/sim_disk.c @@ -374,10 +374,10 @@ t_offset capac = ((t_offset)uptr->capac)*((dptr->flags & DEV_SECTORS) ? 512 : 1) if (ctx->capac_factor == 2) cap_units = "W"; if (capac) { - if (capac >= (t_addr) 1000000) - fprintf (st, "capacity=%dM%s", (uint32) (capac / ((t_addr) 1000000)), cap_units); + if (capac >= (t_offset) 1000000) + fprintf (st, "capacity=%dM%s", (uint32) (capac / ((t_offset) 1000000)), cap_units); else if (uptr->capac >= (t_addr) 1000) - fprintf (st, "capacity=%dK%s", (uint32) (capac / ((t_addr) 1000)), cap_units); + fprintf (st, "capacity=%dK%s", (uint32) (capac / ((t_offset) 1000)), cap_units); else fprintf (st, "capacity=%d%s", (uint32) capac, cap_units); } else fprintf (st, "undefined capacity"); diff --git a/sim_tmxr.c b/sim_tmxr.c index 28ec87d9..1cde9162 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -630,7 +630,7 @@ static int32 loop_read (TMLN *lp, char *buf, int32 bufsize) if (lp->datagram) { int32 pktsize; - if (lp->lpbcnt < sizeof(pktsize)) + if (lp->lpbcnt < (int32)sizeof(pktsize)) return 0; if ((sizeof(pktsize) != loop_read_ex (lp, (char *)&pktsize, sizeof(pktsize))) || (pktsize > bufsize))