Skip to content

Commit 6a47e48

Browse files
committed
Import open-simh PR 504 card format comment fixes
Import the comment and indentation cleanup from open-simh PR 504, which responds to upstream issue 503. The upstream change corrects the binary card format description in sim_card.c and sim_card.h so both files describe the byte order and zero bits consistently. It also removes two stray tabs in the PDP-10 KA10 CPU source. This commit changes only comments and indentation. No runtime behavior is changed.
1 parent d106b1e commit 6a47e48

3 files changed

Lines changed: 16 additions & 11 deletions

File tree

simulators/PDP10/kx10_cpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ DEVICE cpu_dev = {
781781
#if PIDP10
782782
/* Update MI register if address matches */
783783
#define UPDATE_MI(a) if (!MI_flag && a == AS) { \
784-
MI = MB; \
784+
MI = MB; \
785785
}
786786
#else
787787
#define UPDATE_MI(a)
@@ -2331,7 +2331,7 @@ int Mem_write(int flag, int cur_context) {
23312331
if (sim_brk_summ && sim_brk_test(last_addr, SWMASK('W')))
23322332
watch_stop = 1;
23332333
M[last_addr] = MB;
2334-
UPDATE_MI(last_addr);
2334+
UPDATE_MI(last_addr);
23352335
modify = 0;
23362336
return 0;
23372337
}

src/runtime/sim_card.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
First characters 6789----
1818
Second character 21012345
1919
111
20-
Top 4 bits of second character are 0.
21-
It is unlikely that any other format could
22-
look like this.
20+
The lower order 4 bits of first word are all
21+
zero. It is unlikely that any other format could
22+
look like this. An ASCII card could match this
23+
if it is all blank, but the trailing return would
24+
cause it to fail this test.
2325
2426
BCD Format:
2527
Each record variable length (80 chars or less).

src/runtime/sim_card.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@
1414
1515
Binary Card format:
1616
Each record 160 characters.
17-
First character 21012345
18-
111
19-
Second characters 6789----
20-
Top 4 bits of second character are 0.
21-
It is unlikely that ascii text or BCD format
22-
text could produce similar profile.
17+
First characters 6789----
18+
Second character 21012345
19+
111
20+
21+
The lower order 4 bits of first word are all
22+
zero. It is unlikely that any other format could
23+
look like this. An ASCII card could match this
24+
if it is all blank, but the trailing return would
25+
cause it to fail this test.
2326
2427
BCD Format:
2528
Each record variable length (80 chars or less).

0 commit comments

Comments
 (0)