diff --git a/sim_card.c b/sim_card.c index 95e3c1ba..d1bf4d78 100644 --- a/sim_card.c +++ b/sim_card.c @@ -22,7 +22,7 @@ This is the standard card reader. This is the standard card punch. - Input formats are accepted in a variaty of formats: + Input formats are accepted in a variety of formats: Standard ASCII: one record per line. returns are ignored. tabs are expanded to modules 8 characters. @@ -46,7 +46,7 @@ Bits 5-0 are character. CBN Format: - Each record 160 charaters. + Each record 160 characters. First char has bit 7 set. Rest set to 0. Bit 6 is odd parity. Bit 5-0 of first character are top 6 bits @@ -62,7 +62,7 @@ is not enough octal numbers to span a full card the remainder of the card will not be punched. - Also ~eor, will generate a 7/8/9 punch card. An ~eof will gernerate a + Also ~eor, will generate a 7/8/9 punch card. An ~eof will generate a 6/7/9 punch card, and a ~eoi will generate a 6/7/8/9 punch. A single line of ~ will set the EOF flag when that card is read. @@ -251,7 +251,10 @@ static const uint16 ascii_to_dec_029[128] = { 0x604, 0x602, 0x601, 0xA00, 0xC00, 0x600, 0x700,0xf000 }; - +#if SIMH_EVER_USES_THIS +/* This is a static const that isn't referenced in this code. + * Kept for historical reference. + */ static const uint16 ascii_to_hol_ebcdic[128] = { /* Control */ 0xf000,0xf000,0xf000,0xf000,0xf000,0xf000,0xf000,0xf000, /*0-37*/ @@ -295,6 +298,7 @@ static const uint16 ascii_to_hol_ebcdic[128] = { /* X18 X78 Y18 XYT18 */ 0x604, 0x602, 0x601, 0x902, 0x806, 0x502, 0xF02,0xf000 }; +#endif const char sim_ascii_to_six[128] = { /* Control */ @@ -431,7 +435,7 @@ static struct card_formats fmts[] = { /* Conversion routines */ -/* Convert BCD character into hollerith code */ +/* Convert BCD character into Hollerith code */ uint16 sim_bcd_to_hol(uint8 bcd) { uint16 hol; @@ -476,7 +480,7 @@ sim_bcd_to_hol(uint8 bcd) { return hol; } -/* Returns the BCD of the hollerith code or 0x7f if error */ +/* Returns the BCD of the Hollerith code or 0x7f if error */ uint8 sim_hol_to_bcd(uint16 hol) { uint8 bcd; @@ -526,7 +530,7 @@ sim_hol_to_bcd(uint16 hol) { return bcd; } -/* Convert EBCDIC character into hollerith code */ +/* Convert EBCDIC character into Hollerith code */ uint16 sim_ebcdic_to_hol(uint8 ebcdic) { return ebcdic_to_hol[ebcdic]; @@ -534,7 +538,7 @@ sim_ebcdic_to_hol(uint8 ebcdic) { -/* Returns the BCD of the hollerith code or 0x7f if error */ +/* Returns the BCD of the Hollerith code or 0x7f if error */ uint16 sim_hol_to_ebcdic(uint16 hol) { return hol_to_ebcdic[hol]; @@ -984,7 +988,7 @@ _sim_read_deck(UNIT * uptr, int eof) buf.len = 0; buf.size = 0; - buf.buffer[0] = 0; /* Initialize bufer to empty */ + buf.buffer[0] = 0; /* Initialize buffer to empty */ /* Slurp up current file */ do { @@ -1011,7 +1015,7 @@ _sim_read_deck(UNIT * uptr, int eof) sim_uname(uptr), uptr->filename, sim_error_text(r), cards); } data->hopper_cards++; - /* Move data to start at begining of buffer */ + /* Move data to start at beginning of buffer */ /* Data is moved down to simplify the decoding of one card */ l = buf.len - buf.size; j = buf.size; @@ -1056,7 +1060,7 @@ sim_punch_card(UNIT * uptr, uint16 image[80]) /* Convert word record into column image */ /* Check output type, if auto or text, try and convert record to bcd first */ /* If failed and text report error and dump what we have */ -/* Else if binary or not convertable, dump as image */ +/* Else if binary or not convertible, dump as image */ /* Try to convert to text */ uint8 out[512]; diff --git a/sim_card.h b/sim_card.h index 8ae61a48..19fdd025 100644 --- a/sim_card.h +++ b/sim_card.h @@ -22,7 +22,7 @@ This is the standard card reader. This is the standard card punch. - Input formats are accepted in a variaty of formats: + Input formats are accepted in a variety of formats: Standard ASCII: one record per line. returns are ignored. tabs are expanded to modules 8 characters. @@ -47,7 +47,7 @@ Bits 5-0 are character. CBN Format: - Each record 160 charaters. + Each record 160 characters. First char has bit 7 set. Rest set to 0. Bit 6 is odd parity. Bit 5-0 of first character are top 6 bits @@ -70,7 +70,7 @@ is not enough octal numbers to span a full card the remainder of the card will not be punched. - Also ~eor, will generate a 7/8/9 punch card. An ~eof will gernerate a + Also ~eor, will generate a 7/8/9 punch card. An ~eof will generate a 6/7/9 punch card, and a ~eoi will generate a 6/7/8/9 punch. A single line of ~ will set the EOF flag when that card is read.