Compiler indicated cleanups
This commit is contained in:
parent
9b3694b102
commit
a262dd9c14
15 changed files with 61 additions and 58 deletions
|
@ -722,9 +722,10 @@ static int32 sio0dCore(const int32 port, const int32 io, const int32 data) {
|
||||||
if (io == 0) { /* IN */
|
if (io == 0) { /* IN */
|
||||||
if ((sio_unit.flags & UNIT_ATT) && (!sio_unit.u4))
|
if ((sio_unit.flags & UNIT_ATT) && (!sio_unit.u4))
|
||||||
return mapCharacter(tmxr_getc_ln(&TerminalLines[spi.terminalLine]));
|
return mapCharacter(tmxr_getc_ln(&TerminalLines[spi.terminalLine]));
|
||||||
if (!sio_unit.u3)
|
if (!sio_unit.u3) {
|
||||||
sim_debug(BUFFER_EMPTY_MSG, &sio_dev, "\tSIO_D: " ADDRESS_FORMAT
|
sim_debug(BUFFER_EMPTY_MSG, &sio_dev, "\tSIO_D: " ADDRESS_FORMAT
|
||||||
" IN(0x%03x) for empty character buffer\n", PCX, port);
|
" IN(0x%03x) for empty character buffer\n", PCX, port);
|
||||||
|
}
|
||||||
sio_unit.u3 = FALSE; /* no character is available any more */
|
sio_unit.u3 = FALSE; /* no character is available any more */
|
||||||
return mapCharacter(sio_unit.buf); /* return previous character */
|
return mapCharacter(sio_unit.buf); /* return previous character */
|
||||||
} /* OUT follows, no fall-through from IN */
|
} /* OUT follows, no fall-through from IN */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* hp2100_cpu.c: HP 21xx/1000 CPU simulator
|
/* hp2100_cpu.c: HP 21xx/1000 CPU simulator
|
||||||
|
|
||||||
Copyright (c) 1993-2012, Robert M. Supnik
|
Copyright (c) 1993-2013, Robert M. Supnik
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
copy of this software and associated documentation files (the "Software"),
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
@ -29,6 +29,7 @@
|
||||||
DMA1,DMA2 12607B/12578A/12895A direct memory access controller
|
DMA1,DMA2 12607B/12578A/12895A direct memory access controller
|
||||||
DCPC1,DCPC2 12897B dual channel port controller
|
DCPC1,DCPC2 12897B dual channel port controller
|
||||||
|
|
||||||
|
18-Mar-13 JDB Removed redundant extern declarations
|
||||||
09-May-12 JDB Separated assignments from conditional expressions
|
09-May-12 JDB Separated assignments from conditional expressions
|
||||||
13-Jan-12 JDB Minor speedup in "is_mapped"
|
13-Jan-12 JDB Minor speedup in "is_mapped"
|
||||||
Added casts to cpu_mod, dmasio, dmapio, cpu_reset, dma_reset
|
Added casts to cpu_mod, dmasio, dmapio, cpu_reset, dma_reset
|
||||||
|
@ -444,6 +445,7 @@
|
||||||
|
|
||||||
#include "hp2100_defs.h"
|
#include "hp2100_defs.h"
|
||||||
#include "hp2100_cpu.h"
|
#include "hp2100_cpu.h"
|
||||||
|
#include "hp2100_cpu1.h"
|
||||||
|
|
||||||
|
|
||||||
/* Memory protect constants */
|
/* Memory protect constants */
|
||||||
|
@ -561,8 +563,9 @@ uint16 dms_map[MAP_NUM * MAP_LNT] = { 0 }; /* dms maps */
|
||||||
|
|
||||||
/* External data */
|
/* External data */
|
||||||
|
|
||||||
extern char halt_msg[];
|
extern char halt_msg []; /* halt message */
|
||||||
extern DIB clk_dib; /* CLK DIB for idle check */
|
extern DIB clk_dib; /* CLK DIB for idle check */
|
||||||
|
extern const BOOT_ROM ptr_rom, dq_rom, ms_rom, ds_rom; /* boot ROMs for cpu_boot routine */
|
||||||
|
|
||||||
/* CPU local routines */
|
/* CPU local routines */
|
||||||
|
|
||||||
|
@ -601,14 +604,6 @@ IOHANDLER dmapio;
|
||||||
IOHANDLER dmasio;
|
IOHANDLER dmasio;
|
||||||
IOHANDLER nullio;
|
IOHANDLER nullio;
|
||||||
|
|
||||||
/* External routines */
|
|
||||||
|
|
||||||
extern t_stat cpu_eau (uint32 IR, uint32 intrq);
|
|
||||||
extern t_stat cpu_uig_0 (uint32 IR, uint32 intrq, uint32 iotrap);
|
|
||||||
extern t_stat cpu_uig_1 (uint32 IR, uint32 intrq, uint32 iotrap);
|
|
||||||
|
|
||||||
extern void (*sim_vm_post) (t_bool from_scp);
|
|
||||||
|
|
||||||
|
|
||||||
/* Table of CPU features by model.
|
/* Table of CPU features by model.
|
||||||
|
|
||||||
|
@ -3959,7 +3954,6 @@ t_stat cpu_show_idle (FILE *st, UNIT *uptr, int32 val, void *desc)
|
||||||
|
|
||||||
t_stat cpu_boot (int32 unitno, DEVICE *dptr)
|
t_stat cpu_boot (int32 unitno, DEVICE *dptr)
|
||||||
{
|
{
|
||||||
extern const BOOT_ROM ptr_rom, dq_rom, ms_rom, ds_rom;
|
|
||||||
int32 dev = (SR >> IBL_V_DEV) & I_DEVMASK;
|
int32 dev = (SR >> IBL_V_DEV) & I_DEVMASK;
|
||||||
int32 sel = (SR >> IBL_V_SEL) & IBL_M_SEL;
|
int32 sel = (SR >> IBL_V_SEL) & IBL_M_SEL;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* hp2100_cpu.h: HP 2100 CPU definitions
|
/* hp2100_cpu.h: HP 2100 CPU definitions
|
||||||
|
|
||||||
Copyright (c) 2005-2010, Robert M. Supnik
|
Copyright (c) 2005-2013, Robert M. Supnik
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
copy of this software and associated documentation files (the "Software"),
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
be used in advertising or otherwise to promote the sale, use or other dealings
|
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||||
in this Software without prior written authorization from Robert M Supnik.
|
in this Software without prior written authorization from Robert M Supnik.
|
||||||
|
|
||||||
|
18-Mar-13 JDB Added declarations for the MP abort handler and CPU registers
|
||||||
03-Jan-10 RMS Changed declarations of mp_control, mp_mefvv, for VMS compiler
|
03-Jan-10 RMS Changed declarations of mp_control, mp_mefvv, for VMS compiler
|
||||||
15-Jul-08 JDB Rearranged declarations with hp2100_cpu.c and hp2100_defs.h
|
15-Jul-08 JDB Rearranged declarations with hp2100_cpu.c and hp2100_defs.h
|
||||||
26-Jun-08 JDB Added mp_control to CPU state externals
|
26-Jun-08 JDB Added mp_control to CPU state externals
|
||||||
|
@ -298,6 +299,7 @@ extern uint32 pcq_p;
|
||||||
extern uint32 stop_inst;
|
extern uint32 stop_inst;
|
||||||
extern UNIT cpu_unit;
|
extern UNIT cpu_unit;
|
||||||
extern DEVICE cpu_dev;
|
extern DEVICE cpu_dev;
|
||||||
|
extern REG cpu_reg [];
|
||||||
extern jmp_buf save_env;
|
extern jmp_buf save_env;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -305,11 +305,17 @@ extern t_stat cpu_signal (uint32 IR, uint32 intrq); /* [7] SIGNA
|
||||||
|
|
||||||
/* Microcode helper functions */
|
/* Microcode helper functions */
|
||||||
|
|
||||||
OP ReadOp (uint32 va, OPSIZE precision); /* generalized operand read */
|
extern OP ReadOp (uint32 va, OPSIZE precision); /* generalized operand read */
|
||||||
void WriteOp (uint32 va, OP operand, OPSIZE precision); /* generalized operand write */
|
extern void WriteOp (uint32 va, OP operand, OPSIZE precision); /* generalized operand write */
|
||||||
t_stat cpu_ops (OP_PAT pattern, OPS op, uint32 irq); /* operand processor */
|
extern t_stat cpu_ops (OP_PAT pattern, OPS op, uint32 irq); /* operand processor */
|
||||||
|
|
||||||
void fprint_ops (OP_PAT pattern, OPS op); /* debug print operands */
|
extern void fprint_ops (OP_PAT pattern, OPS op); /* debug print operands */
|
||||||
void fprint_regs (char *caption, uint32 regs, uint32 base); /* debug print CPU registers */
|
extern void fprint_regs (char *caption, uint32 regs, uint32 base); /* debug print CPU registers */
|
||||||
|
|
||||||
|
/* implemented in hp2100_cpu5.c (RTE-IV EMA functions) */
|
||||||
|
|
||||||
|
extern t_stat cpu_ema_eres (uint32 *rtn, uint32 dtbl, uint32 atbl, t_bool debug);
|
||||||
|
extern t_stat cpu_ema_eseg (uint32 *rtn, uint32 ir, uint32 tbl, t_bool debug);
|
||||||
|
extern t_stat cpu_ema_vset (uint32 *rtn, OPS op, t_bool debug);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* hp2100_cpu6.c: HP 1000 RTE-6/VM OS instructions
|
/* hp2100_cpu6.c: HP 1000 RTE-6/VM OS instructions
|
||||||
|
|
||||||
Copyright (c) 2006-2012, J. David Bryan
|
Copyright (c) 2006-2013, J. David Bryan
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
copy of this software and associated documentation files (the "Software"),
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
CPU6 RTE-6/VM OS instructions
|
CPU6 RTE-6/VM OS instructions
|
||||||
|
|
||||||
|
18-Mar-13 JDB Use MP abort handler declaration in hp2100_cpu.h
|
||||||
09-May-12 JDB Separated assignments from conditional expressions
|
09-May-12 JDB Separated assignments from conditional expressions
|
||||||
29-Oct-10 JDB DMA channels renamed from 0,1 to 1,2 to match documentation
|
29-Oct-10 JDB DMA channels renamed from 0,1 to 1,2 to match documentation
|
||||||
18-Sep-08 JDB Corrected .SIP debug formatting
|
18-Sep-08 JDB Corrected .SIP debug formatting
|
||||||
|
@ -53,11 +54,6 @@
|
||||||
#include "hp2100_cpu1.h"
|
#include "hp2100_cpu1.h"
|
||||||
|
|
||||||
|
|
||||||
/* external variables */
|
|
||||||
|
|
||||||
extern jmp_buf save_env; /* MP abort handler */
|
|
||||||
|
|
||||||
|
|
||||||
/* Offsets to data and addresses within RTE. */
|
/* Offsets to data and addresses within RTE. */
|
||||||
|
|
||||||
static const uint32 xi = 0001647; /* XI address */
|
static const uint32 xi = 0001647; /* XI address */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* hp2100_cpu7.c: HP 1000 VIS and SIGNAL/1000 microcode
|
/* hp2100_cpu7.c: HP 1000 VIS and SIGNAL/1000 microcode
|
||||||
|
|
||||||
Copyright (c) 2008, Holger Veit
|
Copyright (c) 2008, Holger Veit
|
||||||
Copyright (c) 2006-2012, J. David Bryan
|
Copyright (c) 2006-2013, J. David Bryan
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
copy of this software and associated documentation files (the "Software"),
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
CPU7 Vector Instruction Set and SIGNAL firmware
|
CPU7 Vector Instruction Set and SIGNAL firmware
|
||||||
|
|
||||||
|
18-Mar-13 JDB Moved EMA helper declarations to hp2100_cpu1.h
|
||||||
09-May-12 JDB Separated assignments from conditional expressions
|
09-May-12 JDB Separated assignments from conditional expressions
|
||||||
06-Feb-12 JDB Corrected "opsize" parameter type in vis_abs
|
06-Feb-12 JDB Corrected "opsize" parameter type in vis_abs
|
||||||
11-Sep-08 JDB Moved microcode function prototypes to hp2100_cpu1.h
|
11-Sep-08 JDB Moved microcode function prototypes to hp2100_cpu1.h
|
||||||
|
@ -123,11 +124,6 @@ static const OP zero = { { 0, 0, 0, 0, 0 } }; /* DEC 0.0D0 */
|
||||||
- VIS Microcode Source (12824-18059, revision 3).
|
- VIS Microcode Source (12824-18059, revision 3).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* implemented in hp2100_cpu5.c (RTE-IV EMA functions) */
|
|
||||||
extern t_stat cpu_ema_eres(uint32* rtn,uint32 dtbl,uint32 atbl, t_bool debug);
|
|
||||||
extern t_stat cpu_ema_eseg(uint32* rtn,uint32 ir,uint32 tbl, t_bool debug);
|
|
||||||
extern t_stat cpu_ema_vset(uint32* rtn,OPS op, t_bool debug);
|
|
||||||
|
|
||||||
static const OP_PAT op_vis[16] = {
|
static const OP_PAT op_vis[16] = {
|
||||||
OP_N, OP_AAKAKAKK,OP_AKAKK, OP_AAKK, /* .VECT VPIV VABS VSUM */
|
OP_N, OP_AAKAKAKK,OP_AKAKK, OP_AAKK, /* .VECT VPIV VABS VSUM */
|
||||||
OP_AAKK, OP_AAKAKK, OP_AAKK, OP_AAKK, /* VNRM VDOT VMAX VMAB */
|
OP_AAKK, OP_AAKAKK, OP_AAKK, OP_AAKK, /* VNRM VDOT VMAX VMAB */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* hp2100_defs.h: HP 2100 simulator definitions
|
/* hp2100_defs.h: HP 2100 simulator definitions
|
||||||
|
|
||||||
Copyright (c) 1993-2012, Robert M. Supnik
|
Copyright (c) 1993-2013, Robert M. Supnik
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
copy of this software and associated documentation files (the "Software"),
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
be used in advertising or otherwise to promote the sale, use or other dealings
|
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||||
in this Software without prior written authorization from Robert M Supnik.
|
in this Software without prior written authorization from Robert M Supnik.
|
||||||
|
|
||||||
|
18-Mar-13 JDB Added "-Wdangling-else" to the suppression pragmas
|
||||||
14-Dec-12 JDB Added "-Wbitwise-op-parentheses" to the suppression pragmas
|
14-Dec-12 JDB Added "-Wbitwise-op-parentheses" to the suppression pragmas
|
||||||
12-May-12 JDB Added pragmas to suppress logical operator precedence warnings
|
12-May-12 JDB Added pragmas to suppress logical operator precedence warnings
|
||||||
10-Feb-12 JDB Added hp_setsc, hp_showsc functions to support SC modifier
|
10-Feb-12 JDB Added hp_setsc, hp_showsc functions to support SC modifier
|
||||||
|
@ -81,6 +82,7 @@
|
||||||
#pragma GCC diagnostic ignored "-Wpragmas"
|
#pragma GCC diagnostic ignored "-Wpragmas"
|
||||||
#pragma GCC diagnostic ignored "-Wlogical-op-parentheses"
|
#pragma GCC diagnostic ignored "-Wlogical-op-parentheses"
|
||||||
#pragma GCC diagnostic ignored "-Wbitwise-op-parentheses"
|
#pragma GCC diagnostic ignored "-Wbitwise-op-parentheses"
|
||||||
|
#pragma GCC diagnostic ignored "-Wdangling-else"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* hp2100_ds.c: HP 13037D/13175D disc controller/interface simulator
|
/* hp2100_ds.c: HP 13037D/13175D disc controller/interface simulator
|
||||||
|
|
||||||
Copyright (c) 2004-2012, Robert M. Supnik
|
Copyright (c) 2004-2012, Robert M. Supnik
|
||||||
Copyright (c) 2012 J. David Bryan
|
Copyright (c) 2012-2013 J. David Bryan
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
copy of this software and associated documentation files (the "Software"),
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
DS 13037D/13175D disc controller/interface
|
DS 13037D/13175D disc controller/interface
|
||||||
|
|
||||||
|
18-Mar-13 JDB Fixed poll_drives definition to match declaration
|
||||||
24-Oct-12 JDB Changed CNTLR_OPCODE to title case to avoid name clash
|
24-Oct-12 JDB Changed CNTLR_OPCODE to title case to avoid name clash
|
||||||
29-Mar-12 JDB Rewritten to use the MAC/ICD disc controller library
|
29-Mar-12 JDB Rewritten to use the MAC/ICD disc controller library
|
||||||
ioIOO now notifies controller service of parameter output
|
ioIOO now notifies controller service of parameter output
|
||||||
|
@ -1337,7 +1338,7 @@ return;
|
||||||
sets the flag to notify the CPU.
|
sets the flag to notify the CPU.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void poll_drives (void)
|
static void poll_drives (void)
|
||||||
{
|
{
|
||||||
if (mac_cntlr.state == cntlr_idle && ds.control == SET) /* is the controller idle and interrupts are allowed? */
|
if (mac_cntlr.state == cntlr_idle && ds.control == SET) /* is the controller idle and interrupts are allowed? */
|
||||||
if (dl_poll_drives (&mac_cntlr, ds_unit, DL_MAXDRIVE)) /* poll the drives; was Attention seen? */
|
if (dl_poll_drives (&mac_cntlr, ds_unit, DL_MAXDRIVE)) /* poll the drives; was Attention seen? */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* hp2100_fp1.c: HP 1000 multiple-precision floating point routines
|
/* hp2100_fp1.c: HP 1000 multiple-precision floating point routines
|
||||||
|
|
||||||
Copyright (c) 2005-2012, J. David Bryan
|
Copyright (c) 2005-2013, J. David Bryan
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
copy of this software and associated documentation files (the "Software"),
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
in advertising or otherwise to promote the sale, use or other dealings in
|
in advertising or otherwise to promote the sale, use or other dealings in
|
||||||
this Software without prior written authorization from the author.
|
this Software without prior written authorization from the author.
|
||||||
|
|
||||||
|
18-Mar-13 JDB Changed type of mantissa masks array to to unsigned
|
||||||
06-Feb-12 JDB Added missing precision on constant "one" in fp_trun
|
06-Feb-12 JDB Added missing precision on constant "one" in fp_trun
|
||||||
21-Jun-11 JDB Completed the comments for divide; no code changes
|
21-Jun-11 JDB Completed the comments for divide; no code changes
|
||||||
08-Jun-08 JDB Quieted bogus gcc warning in fp_exec
|
08-Jun-08 JDB Quieted bogus gcc warning in fp_exec
|
||||||
|
@ -309,7 +310,7 @@ static const uint32 op_start[6] = { IN_V_SNUM,
|
||||||
FP_V_TMANT,
|
FP_V_TMANT,
|
||||||
FP_V_EMANT };
|
FP_V_EMANT };
|
||||||
|
|
||||||
static const t_int64 mant_mask[6] = { IN_SSMAGN,
|
static const t_uint64 mant_mask[6] = { IN_SSMAGN,
|
||||||
IN_SDMAGN,
|
IN_SDMAGN,
|
||||||
FP_SFMANT,
|
FP_SFMANT,
|
||||||
FP_SXMANT,
|
FP_SXMANT,
|
||||||
|
@ -439,7 +440,7 @@ FPU unpacked;
|
||||||
unpacked.precision = precision; /* set value's precision */
|
unpacked.precision = precision; /* set value's precision */
|
||||||
|
|
||||||
unpacked.mantissa = /* unpack and mask mantissa */
|
unpacked.mantissa = /* unpack and mask mantissa */
|
||||||
unpack_int (packed, precision) & mant_mask[precision];
|
unpack_int (packed, precision) & (t_int64) mant_mask[precision];
|
||||||
|
|
||||||
switch (precision) {
|
switch (precision) {
|
||||||
|
|
||||||
|
@ -596,11 +597,11 @@ sign = (unpacked->mantissa < 0); /* save mantissa sign */
|
||||||
if (sign) /* round and mask the number */
|
if (sign) /* round and mask the number */
|
||||||
unpacked->mantissa =
|
unpacked->mantissa =
|
||||||
(unpacked->mantissa + n_half_lsb[unpacked->precision]) &
|
(unpacked->mantissa + n_half_lsb[unpacked->precision]) &
|
||||||
mant_mask[unpacked->precision];
|
(t_int64) mant_mask[unpacked->precision];
|
||||||
else
|
else
|
||||||
unpacked->mantissa =
|
unpacked->mantissa =
|
||||||
(unpacked->mantissa + p_half_lsb[unpacked->precision]) &
|
(unpacked->mantissa + p_half_lsb[unpacked->precision]) &
|
||||||
mant_mask[unpacked->precision];
|
(t_int64) mant_mask[unpacked->precision];
|
||||||
|
|
||||||
if (sign != (unpacked->mantissa < 0)) /* mantissa overflow? */
|
if (sign != (unpacked->mantissa < 0)) /* mantissa overflow? */
|
||||||
lsrx (unpacked, 1); /* correct by shifting */
|
lsrx (unpacked, 1); /* correct by shifting */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* hp2100_sys.c: HP 2100 simulator interface
|
/* hp2100_sys.c: HP 2100 simulator interface
|
||||||
|
|
||||||
Copyright (c) 1993-2012, Robert M. Supnik
|
Copyright (c) 1993-2013, Robert M. Supnik
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
copy of this software and associated documentation files (the "Software"),
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
used in advertising or otherwise to promote the sale, use or other dealings
|
used in advertising or otherwise to promote the sale, use or other dealings
|
||||||
in this Software without prior written authorization from Robert M Supnik.
|
in this Software without prior written authorization from Robert M Supnik.
|
||||||
|
|
||||||
|
18-Mar-13 JDB Moved CPU state variable declarations to hp2100_cpu.h
|
||||||
09-May-12 JDB Quieted warnings for assignments in conditional expressions
|
09-May-12 JDB Quieted warnings for assignments in conditional expressions
|
||||||
10-Feb-12 JDB Deprecated DEVNO in favor of SC
|
10-Feb-12 JDB Deprecated DEVNO in favor of SC
|
||||||
Added hp_setsc, hp_showsc functions to support SC modifier
|
Added hp_setsc, hp_showsc functions to support SC modifier
|
||||||
|
@ -61,9 +62,6 @@
|
||||||
#include "hp2100_cpu.h"
|
#include "hp2100_cpu.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
extern DEVICE cpu_dev;
|
|
||||||
extern UNIT cpu_unit;
|
|
||||||
extern REG cpu_reg[];
|
|
||||||
|
|
||||||
extern DEVICE mp_dev;
|
extern DEVICE mp_dev;
|
||||||
extern DEVICE dma1_dev, dma2_dev;
|
extern DEVICE dma1_dev, dma2_dev;
|
||||||
|
|
|
@ -602,6 +602,7 @@ t_stat qty_common_svc( DIB * dibp, UNIT * unitp )
|
||||||
++qty_polls ; /* another time 'round the track */
|
++qty_polls ; /* another time 'round the track */
|
||||||
newln = tmxr_poll_conn( &qty_desc ) ; /* anybody knocking at the door? */
|
newln = tmxr_poll_conn( &qty_desc ) ; /* anybody knocking at the door? */
|
||||||
if ( (newln >= 0) && qty_mdm )
|
if ( (newln >= 0) && qty_mdm )
|
||||||
|
{
|
||||||
if ( newln >= qty_max )
|
if ( newln >= qty_max )
|
||||||
{
|
{
|
||||||
return SCPE_IERR; /* WTF - sanity check failed, over? */
|
return SCPE_IERR; /* WTF - sanity check failed, over? */
|
||||||
|
@ -615,6 +616,7 @@ t_stat qty_common_svc( DIB * dibp, UNIT * unitp )
|
||||||
* manipulation with modem control signals
|
* manipulation with modem control signals
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tmxr_poll_rx( &qty_desc ) ; /* poll input */
|
tmxr_poll_rx( &qty_desc ) ; /* poll input */
|
||||||
qty_update_rcvi( &qty_desc ) ; /* update receiver interrupt status */
|
qty_update_rcvi( &qty_desc ) ; /* update receiver interrupt status */
|
||||||
|
|
7
scp.c
7
scp.c
|
@ -2196,7 +2196,7 @@ return SCPE_OK;
|
||||||
|
|
||||||
t_stat set_cmd (int32 flag, char *cptr)
|
t_stat set_cmd (int32 flag, char *cptr)
|
||||||
{
|
{
|
||||||
int32 lvl;
|
uint32 lvl;
|
||||||
t_stat r;
|
t_stat r;
|
||||||
char gbuf[CBUFSIZE], *cvptr, *svptr;
|
char gbuf[CBUFSIZE], *cvptr, *svptr;
|
||||||
DEVICE *dptr;
|
DEVICE *dptr;
|
||||||
|
@ -2486,7 +2486,7 @@ return r;
|
||||||
|
|
||||||
t_stat show_cmd_fi (FILE *ofile, int32 flag, char *cptr)
|
t_stat show_cmd_fi (FILE *ofile, int32 flag, char *cptr)
|
||||||
{
|
{
|
||||||
int32 lvl;
|
uint32 lvl;
|
||||||
char gbuf[CBUFSIZE], *cvptr;
|
char gbuf[CBUFSIZE], *cvptr;
|
||||||
DEVICE *dptr;
|
DEVICE *dptr;
|
||||||
UNIT *uptr;
|
UNIT *uptr;
|
||||||
|
@ -2966,6 +2966,7 @@ else return SCPE_NOFNC;
|
||||||
t_stat show_on (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr)
|
t_stat show_on (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr)
|
||||||
{
|
{
|
||||||
int32 lvl, i;
|
int32 lvl, i;
|
||||||
|
|
||||||
if (cptr && (*cptr != 0)) return SCPE_2MARG; /* now eol? */
|
if (cptr && (*cptr != 0)) return SCPE_2MARG; /* now eol? */
|
||||||
for (lvl=sim_do_depth; lvl >= 0; --lvl) {
|
for (lvl=sim_do_depth; lvl >= 0; --lvl) {
|
||||||
if (lvl > 0)
|
if (lvl > 0)
|
||||||
|
@ -3020,7 +3021,7 @@ for (mptr = dptr->modifiers; mptr->mask != 0; mptr++) {
|
||||||
if (mptr->pstring &&
|
if (mptr->pstring &&
|
||||||
((mptr->mask & MTAB_XTD)?
|
((mptr->mask & MTAB_XTD)?
|
||||||
(MODMASK(mptr,flag) && !MODMASK(mptr,MTAB_NMO)):
|
(MODMASK(mptr,flag) && !MODMASK(mptr,MTAB_NMO)):
|
||||||
((MTAB_VUN == flag) && ((uptr->flags & mptr->mask) == mptr->match)))) {
|
((MTAB_VUN == (uint32)flag) && ((uptr->flags & mptr->mask) == mptr->match)))) {
|
||||||
if (*toks > 2) {
|
if (*toks > 2) {
|
||||||
fprintf (st, "\n");
|
fprintf (st, "\n");
|
||||||
*toks = 0;
|
*toks = 0;
|
||||||
|
|
|
@ -559,7 +559,7 @@ struct sim_mtab {
|
||||||
#define MTAB_NMO (0020 | MTAB_XTD) /* only if named */
|
#define MTAB_NMO (0020 | MTAB_XTD) /* only if named */
|
||||||
#define MTAB_NC (0040 | MTAB_XTD) /* no UC conversion */
|
#define MTAB_NC (0040 | MTAB_XTD) /* no UC conversion */
|
||||||
#define MTAB_SHP (0100 | MTAB_XTD) /* show takes parameter */
|
#define MTAB_SHP (0100 | MTAB_XTD) /* show takes parameter */
|
||||||
#define MODMASK(mptr,flag) (((mptr)->mask & flag) == flag)/* flag mask test */
|
#define MODMASK(mptr,flag) (((mptr)->mask & (uint32)(flag)) == (uint32)(flag))/* flag mask test */
|
||||||
|
|
||||||
/* Search table */
|
/* Search table */
|
||||||
|
|
||||||
|
|
|
@ -524,11 +524,12 @@ if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "HARDWARE\\DEVICEMAP\\SERIALCOMM", 0, KEY_
|
||||||
/* Enumerate all the values underneath HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM */
|
/* Enumerate all the values underneath HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM */
|
||||||
while (RegEnumValueA(hSERIALCOMM, dwIndex, list[ports].desc, &dwValueNameSize, NULL, &dwType, (BYTE *)list[ports].name, &dwDataSize) == ERROR_SUCCESS) {
|
while (RegEnumValueA(hSERIALCOMM, dwIndex, list[ports].desc, &dwValueNameSize, NULL, &dwType, (BYTE *)list[ports].name, &dwDataSize) == ERROR_SUCCESS) {
|
||||||
/* String values with non-zero size are the interesting ones */
|
/* String values with non-zero size are the interesting ones */
|
||||||
if ((dwType == REG_SZ) && (dwDataSize > 0))
|
if ((dwType == REG_SZ) && (dwDataSize > 0)) {
|
||||||
if (ports < max)
|
if (ports < max)
|
||||||
++ports;
|
++ports;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
/* Besure to clear the working entry before trying again */
|
/* Besure to clear the working entry before trying again */
|
||||||
memset(list[ports].name, 0, sizeof(list[ports].name));
|
memset(list[ports].name, 0, sizeof(list[ports].name));
|
||||||
memset(list[ports].desc, 0, sizeof(list[ports].desc));
|
memset(list[ports].desc, 0, sizeof(list[ports].desc));
|
||||||
|
|
|
@ -511,6 +511,7 @@ while (diff->tv_nsec > 1000000000) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(SIM_ASYNCH_IO) && defined(SIM_ASYNCH_CLOCKS)
|
||||||
static int sim_timespec_compare (struct timespec *a, struct timespec *b)
|
static int sim_timespec_compare (struct timespec *a, struct timespec *b)
|
||||||
{
|
{
|
||||||
while (a->tv_nsec > 1000000000) {
|
while (a->tv_nsec > 1000000000) {
|
||||||
|
@ -532,6 +533,7 @@ if (a->tv_nsec > b->tv_nsec)
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif /* defined(SIM_ASYNCH_IO) && defined(SIM_ASYNCH_CLOCKS) */
|
||||||
|
|
||||||
/* OS independent clock calibration package */
|
/* OS independent clock calibration package */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue