Skip to content

Commit e36f30d

Browse files
committed
I650: changes derived from review comments.
I will probably later merge these into the main commit.
1 parent dcecaff commit e36f30d

4 files changed

Lines changed: 55 additions & 76 deletions

File tree

I650/i650_cdp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ uint32 cdp_cmd(UNIT * uptr, uint16 cmd, uint16 addr)
14031403
image[i] = 0;
14041404
} else {
14051405
// punch char
1406-
h = sim_ascii_to_hol(c);
1406+
h = ascii_to_hol(c);
14071407
image[i] = h;
14081408
}
14091409
}

I650/i650_cdr.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ int decode_8word_wiring(uint16 image[80], int bCheckForHiPunch)
103103
// read word digits
104104
for (iDigit=0;iDigit<10;iDigit++) {
105105
c1 = image[iCol++];
106-
c2 = sim_hol_to_ascii(c1); // convert to ascii
106+
c2 = hol_to_ascii(c1); // convert to ascii
107107
if ((c1 == 0xA00) || (c2 == '?')) {
108108
c1 = 0xA00; c2 = '?'; // the punched value +0 should be represented by ascii ?
109109
}
@@ -120,7 +120,7 @@ int decode_8word_wiring(uint16 image[80], int bCheckForHiPunch)
120120
if ((iCol==10) &&
121121
(c2 == '-')) NegPunch= 1; // allow a minus on col 10
122122
c1 = c1 & 0x3FF; // remove X and Y punches
123-
c2 = sim_hol_to_ascii(c1); // convert to ascii again
123+
c2 = hol_to_ascii(c1); // convert to ascii again
124124
c2 = c2 - '0'; // convert ascii to binary digit
125125
if (c2 > 9) c2 = 0; // nondigits chars interpreted as zero
126126
d = d * 10 + c2;
@@ -174,7 +174,7 @@ void decode_soap_symb_info(uint16 image[80])
174174
i2=0;
175175
for (i=40;i<80;i++) {
176176
c1 = image[i];
177-
c2 = sim_hol_to_ascii(c1);
177+
c2 = hol_to_ascii(c1);
178178
c2 = (strchr(mem_to_ascii, toupper(c2))) ? c2:' ';
179179
if (c2 == '~') c2 = ' ';
180180
if ((i==47) || (i==50) || (i==56)) buf[i2++] = ' '; // add space separation between op, da, ia fields
@@ -267,7 +267,7 @@ void decode_soap_wiring(uint16 image[80], int bMultiPass)
267267
// keep 026 fortran charset
268268
for (i=0;i<80;i++) {
269269
c1 = image[i];
270-
c2 = sim_hol_to_ascii(c1);
270+
c2 = hol_to_ascii(c1);
271271
c2 = (strchr(mem_to_ascii, toupper(c2))) ? c2:' ';
272272
if (c2 == '~') c2 = ' ';
273273
buf[i] = (char) c2;
@@ -348,7 +348,7 @@ void decode_supersoap_wiring(uint16 image[80])
348348
// keep 026 fortran charset
349349
for (i=0;i<80;i++) {
350350
c1 = image[i];
351-
c2 = sim_hol_to_ascii(c1);
351+
c2 = hol_to_ascii(c1);
352352
c2 = (strchr(mem_to_ascii, toupper(c2))) ? c2:' ';
353353
if (c2 == '~') c2 = ' ';
354354
buf[i] = (char) c2;
@@ -456,7 +456,7 @@ void decode_is_wiring(uint16 image[80])
456456
// keep 0..9,+,-,<space>, replace anything else by <space>
457457
for (i=0;i<80;i++) {
458458
c1 = image[i];
459-
c2 = sim_hol_to_ascii(c1);
459+
c2 = hol_to_ascii(c1);
460460
buf[i] = (strchr("+-0123456789", c2)) ? ((char) (c2)):' ';
461461
}
462462
buf[80] = 0; // terminate string
@@ -582,7 +582,7 @@ void decode_it_wiring(uint16 image[80])
582582
// keep 026 fortran charset
583583
for (i=0;i<80;i++) {
584584
c1 = image[i];
585-
c2 = sim_hol_to_ascii(c1);
585+
c2 = hol_to_ascii(c1);
586586
c2 = (strchr(mem_to_ascii, toupper(c2))) ? c2:' ';
587587
if (c2 == '~') c2 = ' ';
588588
buf[i] = (char) c2;
@@ -732,7 +732,7 @@ int decode_ra_wiring(uint16 image[80], int HiPunch)
732732
for (i=0;i<80;i++) {
733733
IsNeg = hbuf[i]=0;
734734
c1 = image[i];
735-
c2 = sim_hol_to_ascii(c1);
735+
c2 = hol_to_ascii(c1);
736736
c2 = toupper(c2);
737737
if ((c1 == 0xA00) || (c2 == '?') || c2 == '+') {
738738
hbuf[i]=1; c2='0'; // '0' or blank + HiPunch Y(12)
@@ -888,7 +888,7 @@ int decode_fds_wiring(uint16 image[80], int HiPunch)
888888
for (i=0;i<80;i++) {
889889
IsNeg =0;
890890
c1 = image[i];
891-
c2 = sim_hol_to_ascii(c1);
891+
c2 = hol_to_ascii(c1);
892892
c2 = toupper(c2);
893893
if ((c1 == 0xA00) || (c2 == '?') || c2 == '+') {
894894
c2='0'; // '0' or blank + HiPunch Y(12)
@@ -1063,7 +1063,7 @@ void decode_fortransit_wiring(uint16 image[80])
10631063
// keep 026 fortran charset
10641064
for (i=0;i<80;i++) {
10651065
c1 = image[i];
1066-
c2 = sim_hol_to_ascii(c1);
1066+
c2 = hol_to_ascii(c1);
10671067
c2 = toupper(c2);
10681068
c2 = (strchr(mem_to_ascii, c2)) ? c2:' ';
10691069
if (c2 == '~') c2 = ' ';
@@ -1156,7 +1156,7 @@ uint32 cdr_cmd(UNIT * uptr, uint16 cmd, uint16 addr)
11561156

11571157
// make local copy of card for debug output
11581158
for (i=0; i<80; i++)
1159-
cbuf[i] = sim_hol_to_ascii(image[i]);
1159+
cbuf[i] = hol_to_ascii(image[i]);
11601160
cbuf[80] = 0; // terminate string
11611161
sim_debug(DEBUG_DETAIL, &cpu_dev, "Read Card: %s\n", sim_trim_endspc(cbuf));
11621162

I650/i650_defs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ extern struct card_wirings {
172172
extern char digits_ascii[31];
173173
extern char mem_to_ascii[101];
174174
extern int ascii_to_NN(int ch);
175-
extern uint16 sim_ascii_to_hol(char c);
176-
extern char sim_hol_to_ascii(uint16 hol);
175+
extern uint16 ascii_to_hol(char c);
176+
extern char hol_to_ascii(uint16 hol);
177177

178178
/* Generic devices common to all */
179179
extern DEVICE cpu_dev;

0 commit comments

Comments
 (0)