1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-05-05 15:35:19 +00:00

Sim_card: Fixed errors in processing of CBN & BCD format.

This commit is contained in:
Richard Cornwell
2017-06-11 21:50:00 -04:00
parent 5e5ea995cb
commit 3b05584b76
2 changed files with 16 additions and 11 deletions

View File

@@ -708,7 +708,9 @@ sim_read_card(UNIT * uptr)
case MODE_CBN:
sim_debug(DEBUG_CARD, dptr, "cbn\n");
/* Check if first character is a tape mark */
if (size == 1 && ((uint8)data->cbuff[0]) == 0217) {
if (((uint8)data->cbuff[0]) == 0217 &&
(size == 1 || (((uint8)data->cbuff[0]) & 0200) != 0)) {
i = 1;
r = SCPE_EOF;
break;
}
@@ -748,7 +750,9 @@ sim_read_card(UNIT * uptr)
case MODE_BCD:
sim_debug(DEBUG_CARD, dptr, "bcd [");
/* Check if first character is a tape mark */
if (size == 1 && ((uint8)data->cbuff[0]) == 0217) {
if (((uint8)data->cbuff[0]) == 0217 &&
(size == 1 || (((uint8)data->cbuff[0]) & 0200) != 0)) {
i = 1;
r = SCPE_EOF;
break;
}