TAPE: Corrected debug output of tape position to be independent of the size of t_addr
This commit is contained in:
parent
7258490c42
commit
20637cc0df
2 changed files with 8 additions and 4 deletions
|
@ -203,9 +203,11 @@ typedef uint32 t_value;
|
||||||
#if defined (USE_INT64) && defined (USE_ADDR64) /* 64b address */
|
#if defined (USE_INT64) && defined (USE_ADDR64) /* 64b address */
|
||||||
typedef t_uint64 t_addr;
|
typedef t_uint64 t_addr;
|
||||||
#define T_ADDR_W 64
|
#define T_ADDR_W 64
|
||||||
|
#define T_ADDR_FMT LL_FMT
|
||||||
#else /* 32b address */
|
#else /* 32b address */
|
||||||
typedef uint32 t_addr;
|
typedef uint32 t_addr;
|
||||||
#define T_ADDR_W 32
|
#define T_ADDR_W 32
|
||||||
|
#define T_ADDR_FMT ""
|
||||||
#endif /* end 64b address */
|
#endif /* end 64b address */
|
||||||
|
|
||||||
#if defined (_WIN32)
|
#if defined (_WIN32)
|
||||||
|
@ -698,10 +700,12 @@ struct sim_debtab {
|
||||||
char *desc; /* description */
|
char *desc; /* description */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Deprecated Debug macros. Use sim_debug() */
|
||||||
|
|
||||||
#define DEBUG_PRS(d) (sim_deb && d.dctrl)
|
#define DEBUG_PRS(d) (sim_deb && d.dctrl)
|
||||||
#define DEBUG_PRD(d) (sim_deb && d->dctrl)
|
#define DEBUG_PRD(d) (sim_deb && d->dctrl)
|
||||||
#define DEBUG_PRI(d,m) (sim_deb && (d.dctrl & (m)))
|
#define DEBUG_PRI(d,m) (sim_deb && (d.dctrl & (m)))
|
||||||
#define DEBUG_PRJ(d,m) (sim_deb && (d->dctrl & (m)))
|
#define DEBUG_PRJ(d,m) (sim_deb && ((d)->dctrl & (m)))
|
||||||
|
|
||||||
#define SIM_DBG_EVENT 0x10000
|
#define SIM_DBG_EVENT 0x10000
|
||||||
#define SIM_DBG_ACTIVATE 0x20000
|
#define SIM_DBG_ACTIVATE 0x20000
|
||||||
|
|
|
@ -662,7 +662,7 @@ switch (f) { /* switch on fmt */
|
||||||
default:
|
default:
|
||||||
return MTSE_FMT;
|
return MTSE_FMT;
|
||||||
}
|
}
|
||||||
sim_debug (MTSE_DBG_STR, ctx->dptr, "rd_lnt: st: %d, lnt: %d, pos: %d\n", r, *bc, uptr->pos);
|
sim_debug (MTSE_DBG_STR, ctx->dptr, "rd_lnt: st: %d, lnt: %d, pos: %" T_ADDR_FMT "u\n", r, *bc, uptr->pos);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -786,7 +786,7 @@ switch (f) { /* switch on fmt */
|
||||||
default:
|
default:
|
||||||
return MTSE_FMT;
|
return MTSE_FMT;
|
||||||
}
|
}
|
||||||
sim_debug (MTSE_DBG_STR, ctx->dptr, "rd_lnt: st: %d, lnt: %d, pos: %d\n", r, *bc, uptr->pos);
|
sim_debug (MTSE_DBG_STR, ctx->dptr, "rd_lnt: st: %d, lnt: %d, pos: %" T_ADDR_FMT "u\n", r, *bc, uptr->pos);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1001,7 +1001,7 @@ if (ferror (uptr->fileref)) { /* error? */
|
||||||
MT_SET_PNU (uptr);
|
MT_SET_PNU (uptr);
|
||||||
return sim_tape_ioerr (uptr);
|
return sim_tape_ioerr (uptr);
|
||||||
}
|
}
|
||||||
sim_debug (MTSE_DBG_STR, ctx->dptr, "wr_lnt: lnt: %d, pos: %d\n", dat, uptr->pos);
|
sim_debug (MTSE_DBG_STR, ctx->dptr, "wr_lnt: lnt: %d, pos: %" T_ADDR_FMT "u\n", dat, uptr->pos);
|
||||||
uptr->pos = uptr->pos + sizeof (t_mtrlnt); /* move tape */
|
uptr->pos = uptr->pos + sizeof (t_mtrlnt); /* move tape */
|
||||||
return MTSE_OK;
|
return MTSE_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue