Compiler suggested cleanups
This commit is contained in:
parent
c548b34772
commit
f3f0d074e0
2 changed files with 76 additions and 76 deletions
|
@ -346,7 +346,7 @@ int32 i;
|
||||||
if (s2sel) uptr = &stack_unit[0]; /* stacker 1? */
|
if (s2sel) uptr = &stack_unit[0]; /* stacker 1? */
|
||||||
else uptr = &stack_unit[0]; /* then default */
|
else uptr = &stack_unit[0]; /* then default */
|
||||||
if ((uptr -> flags & UNIT_ATT) == 0) return SCPE_OK; /* attached? */
|
if ((uptr -> flags & UNIT_ATT) == 0) return SCPE_OK; /* attached? */
|
||||||
for (i = 0; i < CDR_WIDTH; i++) rbuf[i] = ebcdic_to_ascii[rbuf[i]];
|
for (i = 0; (size_t)i < CDR_WIDTH; i++) rbuf[i] = ebcdic_to_ascii[rbuf[i]];
|
||||||
for (i = CDR_WIDTH - 1; (i >= 0) && (rbuf[i] == ' '); i--) rbuf[i] = 0;
|
for (i = CDR_WIDTH - 1; (i >= 0) && (rbuf[i] == ' '); i--) rbuf[i] = 0;
|
||||||
rbuf[CDR_WIDTH] = 0; /* null at end */
|
rbuf[CDR_WIDTH] = 0; /* null at end */
|
||||||
fputs (rbuf, uptr -> fileref); /* write card */
|
fputs (rbuf, uptr -> fileref); /* write card */
|
||||||
|
|
150
S3/s3_sys.c
150
S3/s3_sys.c
|
@ -122,81 +122,81 @@ const char *sim_stop_messages[] = {
|
||||||
|
|
||||||
int32 nopcode = 75;
|
int32 nopcode = 75;
|
||||||
struct opdef opcode[75] = {
|
struct opdef opcode[75] = {
|
||||||
"HPL", 0x00,0,0,0, /* Halt Program Level */
|
{"HPL", 0x00,0,0,0}, /** Halt Program Level */
|
||||||
"A", 0x06,0,1,3, /* Add to Register: A R,AADD */
|
{"A", 0x06,0,1,3}, /** Add to Register: A R,AADD */
|
||||||
"ST", 0x04,0,1,3, /* Store Register */
|
{"ST", 0x04,0,1,3}, /** Store Register */
|
||||||
"L", 0x05,0,1,3, /* Load Register */
|
{"L", 0x05,0,1,3}, /** Load Register */
|
||||||
"LA", 0x02,0,1,1, /* Load Address */
|
{"LA", 0x02,0,1,1}, /** Load Address */
|
||||||
"ZAZ", 0x04,0,2,2, /* Zero and Add Zoned */
|
{"ZAZ", 0x04,0,2,2}, /** Zero and Add Zoned */
|
||||||
"AZ", 0x06,0,2,2, /* Add Zoned Decimal */
|
{"AZ", 0x06,0,2,2}, /** Add Zoned Decimal */
|
||||||
"SZ", 0x07,0,2,2, /* Subtract Zoned Decimal */
|
{"SZ", 0x07,0,2,2}, /** Subtract Zoned Decimal */
|
||||||
"ALC", 0x0E,0,2,2, /* Add Logical: ALC BADD,AADD,LEN */
|
{"ALC", 0x0E,0,2,2}, /** Add Logical: ALC BADD,AADD,LEN */
|
||||||
"SLC", 0x0F,0,2,2, /* Sub Logical: SLC BADD,AADD,LEN */
|
{"SLC", 0x0F,0,2,2}, /** Sub Logical: SLC BADD,AADD,LEN */
|
||||||
"MVC", 0x0C,0,2,2, /* Move Chars MVX BADD,AADD,LEN */
|
{"MVC", 0x0C,0,2,2}, /** Move Chars MVX BADD,AADD,LEN */
|
||||||
"ED", 0x0A,0,2,2, /* Edit: ED BADD,AADD,LEN */
|
{"ED", 0x0A,0,2,2}, /** Edit: ED BADD,AADD,LEN */
|
||||||
"ITC", 0x0B,0,2,2, /* Insert Chars: ITC BADD,AADD,LEN */
|
{"ITC", 0x0B,0,2,2}, /** Insert Chars: ITC BADD,AADD,LEN */
|
||||||
"CLC", 0x0D,0,2,2, /* Compare Logical: CLC BADD,AADD,LEN */
|
{"CLC", 0x0D,0,2,2}, /** Compare Logical: CLC BADD,AADD,LEN */
|
||||||
"MVI", 0x0C,0,3,3, /* Move Immediate */
|
{"MVI", 0x0C,0,3,3}, /** Move Immediate */
|
||||||
"SBN", 0x0A,0,3,3, /* Set Bits On */
|
{"SBN", 0x0A,0,3,3}, /** Set Bits On */
|
||||||
"SBF", 0x0B,0,3,3, /* Set Bits Off */
|
{"SBF", 0x0B,0,3,3}, /** Set Bits Off */
|
||||||
"CLI", 0x0D,0,3,3, /* Compare Immediate */
|
{"CLI", 0x0D,0,3,3}, /** Compare Immediate */
|
||||||
"TBN", 0x08,0,3,3, /* Test Bits On */
|
{"TBN", 0x08,0,3,3}, /** Test Bits On */
|
||||||
"TBF", 0x09,0,3,3, /* Test Bits Off */
|
{"TBF", 0x09,0,3,3}, /** Test Bits Off */
|
||||||
"APL", 0x01,0,4,0, /* Advance Program Level */
|
{"APL", 0x01,0,4,0}, /** Advance Program Level */
|
||||||
"SIO", 0x03,0,5,0, /* Start I/O */
|
{"SIO", 0x03,0,5,0}, /** Start I/O */
|
||||||
"SNS", 0x00,0,6,3, /* Sense I/O */
|
{"SNS", 0x00,0,6,3}, /** Sense I/O */
|
||||||
"LIO", 0x01,0,6,3, /* Load I/O */
|
{"LIO", 0x01,0,6,3}, /** Load I/O */
|
||||||
"TIO", 0x01,0,6,1, /* Test I/O */
|
{"TIO", 0x01,0,6,1}, /** Test I/O */
|
||||||
"J", 0x02,0,7,0, /* Jump Unconditional */
|
{"J", 0x02,0,7,0}, /** Jump Unconditional */
|
||||||
"J", 0x02,0x87,7,0, /* Alternate J */
|
{"J", 0x02,0x87,7,0}, /* Alternate J */
|
||||||
"JH", 0x02,132,7,0, /* Jump if High */
|
{"JH", 0x02,132,7,0}, /* Jump if High */
|
||||||
"JL", 0x02,130,7,0, /* Jump if Low */
|
{"JL", 0x02,130,7,0}, /* Jump if Low */
|
||||||
"JE", 0x02,129,7,0, /* Jump if Equal */
|
{"JE", 0x02,129,7,0}, /* Jump if Equal */
|
||||||
"JNH", 0x02,4,7,0, /* Jump if Not High */
|
{"JNH", 0x02,4,7,0}, /** Jump if Not High */
|
||||||
"JNL", 0x02,2,7,0, /* Jump if Not Low */
|
{"JNL", 0x02,2,7,0}, /** Jump if Not Low */
|
||||||
"JNE", 0x02,1,7,0, /* Jump if Not Equal */
|
{"JNE", 0x02,1,7,0}, /** Jump if Not Equal */
|
||||||
"JOZ", 0x02,136,7,0, /* Jump if Overflow Zoned */
|
{"JOZ", 0x02,136,7,0}, /* Jump if Overflow Zoned */
|
||||||
"JOL", 0x02,160,7,0, /* Jump if Overflow Logical */
|
{"JOL", 0x02,160,7,0}, /* Jump if Overflow Logical */
|
||||||
"JNOZ", 0x02,8,7,0, /* Jump if No Overflow Zoned */
|
{"JNOZ", 0x02,8,7,0}, /** Jump if No Overflow Zoned */
|
||||||
"JNOL", 0x02,32,7,0, /* Jump if No Overflow Logical */
|
{"JNOL", 0x02,32,7,0}, /* Jump if No Overflow Logical */
|
||||||
"JT", 0x02,16,7,0, /* Jump if True */
|
{"JT", 0x02,16,7,0}, /* Jump if True */
|
||||||
"JF", 0x02,144,7,0, /* Jump if False */
|
{"JF", 0x02,144,7,0}, /* Jump if False */
|
||||||
"JP", 0x02,132,7,0, /* Jump if Plus */
|
{"JP", 0x02,132,7,0}, /* Jump if Plus */
|
||||||
"JM", 0x02,130,7,0, /* Jump if Minus */
|
{"JM", 0x02,130,7,0}, /* Jump if Minus */
|
||||||
"JZ", 0x02,129,7,0, /* Jump if Zero */
|
{"JZ", 0x02,129,7,0}, /* Jump if Zero */
|
||||||
"JNP", 0x02,4,7,0, /* Jump if Not Plus */
|
{"JNP", 0x02,4,7,0}, /** Jump if Not Plus */
|
||||||
"JNM", 0x02,2,7,0, /* Jump if Not Minus */
|
{"JNM", 0x02,2,7,0}, /** Jump if Not Minus */
|
||||||
"JNZ", 0x02,1,7,0, /* Jump if Not Zero */
|
{"JNZ", 0x02,1,7,0}, /** Jump if Not Zero */
|
||||||
"NOPJ", 0x02,0x80,7,0, /* Never Jump - NOP */
|
{"NOPJ", 0x02,0x80,7,0}, /* Never Jump - NOP */
|
||||||
"B", 0x00,0x00,8,1, /* Branch Unconditional */
|
{"B", 0x00,0x00,8,1}, /* Branch Unconditional */
|
||||||
"B", 0x00,0x87,8,1, /* Alternate B */
|
{"B", 0x00,0x87,8,1}, /* Alternate B */
|
||||||
"BH", 0x00,0x84,8,1, /* Branch if High */
|
{"BH", 0x00,0x84,8,1}, /* Branch if High */
|
||||||
"BL", 0x00,0x82,8,1, /* Branch if Low */
|
{"BL", 0x00,0x82,8,1}, /* Branch if Low */
|
||||||
"BE", 0x00,0x81,8,1, /* Branch if Equal */
|
{"BE", 0x00,0x81,8,1}, /* Branch if Equal */
|
||||||
"BNH", 0x00,0x04,8,1, /* Branch if Not High */
|
{"BNH", 0x00,0x04,8,1}, /* Branch if Not High */
|
||||||
"BNL", 0x00,0x02,8,1, /* Branch if Not Low */
|
{"BNL", 0x00,0x02,8,1}, /* Branch if Not Low */
|
||||||
"BNE", 0x00,0x01,8,1, /* Branch if Not Equal */
|
{"BNE", 0x00,0x01,8,1}, /* Branch if Not Equal */
|
||||||
"BOZ", 0x00,0x88,8,1, /* Branch if Overflow Zoned */
|
{"BOZ", 0x00,0x88,8,1}, /* Branch if Overflow Zoned */
|
||||||
"BOL", 0x00,0xA0,8,1, /* Branch if Overflow Logical */
|
{"BOL", 0x00,0xA0,8,1}, /* Branch if Overflow Logical */
|
||||||
"BNOZ", 0x00,0x08,8,1, /* Branch if No Overflow Zoned */
|
{"BNOZ", 0x00,0x08,8,1}, /* Branch if No Overflow Zoned */
|
||||||
"BNOL", 0x00,0x20,8,1, /* Branch if No Overflow Logical */
|
{"BNOL", 0x00,0x20,8,1}, /* Branch if No Overflow Logical */
|
||||||
"BT", 0x00,0x10,8,1, /* Branch if True */
|
{"BT", 0x00,0x10,8,1}, /* Branch if True */
|
||||||
"BF", 0x00,0x90,8,1, /* Branch if False */
|
{"BF", 0x00,0x90,8,1}, /* Branch if False */
|
||||||
"BP", 0x00,0x84,8,1, /* Branch if Plus */
|
{"BP", 0x00,0x84,8,1}, /* Branch if Plus */
|
||||||
"BM", 0x00,0x82,8,1, /* Branch if Minus */
|
{"BM", 0x00,0x82,8,1}, /* Branch if Minus */
|
||||||
"BZ", 0x00,0x81,8,1, /* Branch if Zero */
|
{"BZ", 0x00,0x81,8,1}, /* Branch if Zero */
|
||||||
"BNP", 0x00,0x04,8,1, /* Branch if Not Plus */
|
{"BNP", 0x00,0x04,8,1}, /* Branch if Not Plus */
|
||||||
"BNM", 0x00,0x02,8,1, /* Branch if Not Minus */
|
{"BNM", 0x00,0x02,8,1}, /* Branch if Not Minus */
|
||||||
"BNZ", 0x00,0x01,8,1, /* Branch if Not Zero */
|
{"BNZ", 0x00,0x01,8,1}, /* Branch if Not Zero */
|
||||||
"NOPB", 0x00,0x80,8,1, /* Never Branch - NOP */
|
{"NOPB", 0x00,0x80,8,1}, /* Never Branch - NOP */
|
||||||
"MZZ", 0x08,0,9,2, /* Move Zone to Zone */
|
{"MZZ", 0x08,0,9,2}, /** Move Zone to Zone */
|
||||||
"MNZ", 0x08,1,9,2, /* Move Numeric to Zone */
|
{"MNZ", 0x08,1,9,2}, /** Move Numeric to Zone */
|
||||||
"MZN", 0x08,2,9,2, /* Move Zone to Numeric */
|
{"MZN", 0x08,2,9,2}, /** Move Zone to Numeric */
|
||||||
"MNN", 0x08,3,9,2, /* Move Numeric to Numeric */
|
{"MNN", 0x08,3,9,2}, /** Move Numeric to Numeric */
|
||||||
"MVX", 0x08,0,2,2, /* Move Hex: MVX BADD,AADD,CODE */
|
{"MVX", 0x08,0,2,2}, /** Move Hex: MVX BADD,AADD,CODE */
|
||||||
"JC", 0x02,0,3,0, /* Jump on Specified Condition bits */
|
{"JC", 0x02,0,3,0}, /** Jump on Specified Condition bits */
|
||||||
"BC", 0x00,0,3,1, /* Branch on Specified Condition */
|
{"BC", 0x00,0,3,1}, /** Branch on Specified Condition */
|
||||||
"***", 0x00,0,0,0
|
{"***", 0x00,0,0,0}
|
||||||
};
|
};
|
||||||
|
|
||||||
int32 regcode[15] = { 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01,
|
int32 regcode[15] = { 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01,
|
||||||
|
|
Loading…
Add table
Reference in a new issue