1
0
mirror of https://github.com/simh/simh.git synced 2026-05-01 05:48:35 +00:00

Notes For V3.5-1

The source set has been extensively overhauled.  For correct
viewing, set Visual C++ or Emacs to have tab stops every 4
characters.

1. New Features

1.1 3.5-0

1.1.1 All Ethernet devices

- Added Windows user-defined adapter names (from Timothe Litt)

1.1.2 Interdata, SDS, HP, PDP-8, PDP-18b terminal multiplexors

- Added support for SET <unit>n DISCONNECT

1.1.3 VAX

- Added latent QDSS support
- Revised autoconfigure to handle QDSS

1.1.4 PDP-11

- Revised autoconfigure to handle more casees

2. Bugs Fixed

2.1 3.5-0

2.1.1 SCP and libraries

- Trim trailing spaces on all input (for example, attach file names)
- Fixed sim_sock spurious SIGPIPE error in Unix/Linux
- Fixed sim_tape misallocation of TPC map array for 64b simulators

2.1.2 1401

- Fixed bug, CPU reset was clearing SSB through SSG

2.1.3 PDP-11

- Fixed bug in VH vector display routine
- Fixed XU runt packet processing (found by Tim Chapman)

2.1.4 Interdata

- Fixed bug in SHOW PAS CONN/STATS
- Fixed potential integer overflow exception in divide

2.1.5 SDS

- Fixed bug in SHOW MUX CONN/STATS

2.1.6 HP

- Fixed bug in SHOW MUX CONN/STATS

2.1.7 PDP-8

- Fixed bug in SHOW TTIX CONN/STATS
- Fixed bug in SET/SHOW TTOXn LOG

2.1.8 PDP-18b

- Fixed bug in SHOW TTIX CONN/STATS
- Fixed bug in SET/SHOW TTOXn LOG

2.1.9 Nova, Eclipse

- Fixed potential integer overflow exception in divide

2.2 3.5-1

2.2.1 1401

- Changed character encodings to be compatible with Pierce 709X simulator
- Added mode for old/new character encodings

2.2.2 1620

- Changed character encodings to be compatible with Pierce 709X simulator

2.2.3 PDP-10

- Changed MOVNI to eliminate GCC warning

2.2.4 VAX

- Fixed bug in structure definitions with 32b compilation options
- Fixed bug in autoconfiguration table

2.2.5 PDP-11

- Fixed bug in autoconfiguration table
This commit is contained in:
Bob Supnik
2005-10-15 15:38:00 -07:00
committed by Mark Pizzolato
parent b7c1eae41f
commit 1e704bf185
49 changed files with 646 additions and 294 deletions

View File

@@ -26,6 +26,7 @@
cdr 1622 card reader
cdp 1622 card punch
21-Sep-05 RMS Revised translation tables for 7094/1401 compatibility
25-Apr-03 RMS Revised for extended file support
Cards are represented as ASCII text streams terminated by newlines.
@@ -112,25 +113,25 @@ const char cdr_to_num[128] = {
-1, 0x00, 0x00, -1, -1, 0x00, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, /* 10 */
-1, -1, -1, -1, -1, -1, -1, -1,
0x00, 0x1A, 0x1F, 0x00, 0x1B, 0x0A, 0x0F, 0x0A, /* !"#$%&' */
0x00, 0x1A, 0x0F, 0x0B, 0x1B, 0x0C, 0x00, 0x0C, /* !"#$%&' */
0x0C, 0x0C, 0x1C, 0x00, 0x0B, 0x10, 0x1B, 0x01, /* ()*+,-./ */
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 01234567 */
0x08, 0x09, 0x00, 0x1E, 0x1E, 0x0B, 0x0E, 0x1A, /* 89:;<=>? */
0x0C, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* @ABCDEFG */
0x08, 0x09, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, /* HIJKLMNO */
0x17, 0x18, 0x19, 0x02, 0x03, 0x04, 0x05, 0x06, /* PQRSTUVW */
0x07, 0x08, 0x09, 0x00, 0x0E, 0x10, 0x0F, 0x1F, /* XYZ[\]^_ */
-1, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* abcdefg */
0x07, 0x08, 0x09, 0x00, 0x0E, 0x10, 0x0A, 0x1F, /* XYZ[\]^_ */
-1, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* `abcdefg */
0x08, 0x09, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, /* hijklmno */
0x17, 0x18, 0x19, 0x02, 0x03, 0x04, 0x05, 0x06, /* pqrstuvw */
0x07, 0x08, 0x09, -1, -1, -1, -1, -1 /* xyz */
0x07, 0x08, 0x09, 0x0F, 0x0A, 0x1F, 0x00, -1 /* xyz{|}~ */
};
/* Numeric (flag + digit) to card punch (ASCII) */
const char num_to_cdp[32] = {
'0', '1', '2', '3', '4', '5', '6', '7', /* 0 */
'8', '9', '\'', ',', ' ', '&', ' ', '&',
'8', '9', '|', ',', ' ', '"', ' ', '"',
']', 'J', 'K', 'L', 'M', 'N', 'O', 'P', /* F + 0 */
'Q', 'R', '!', '$', -1, -1, -1, '"'
};
@@ -141,7 +142,7 @@ const char num_to_cdp[32] = {
11-7-8 (_) reads as 5F
12-2-8 (?) reads inconsistently (here 02)
12-6-8 (<) reads inconsistently (here 5E)
12-7-8 (") reads as 5F
12-7-8 (}) reads as 5F
*/
const char cdr_to_alp[128] = {
@@ -149,53 +150,53 @@ const char cdr_to_alp[128] = {
-1, 0x00, 0x00, -1, -1, 0x00, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, /* 10 */
-1, -1, -1, -1, -1, -1, -1, -1,
0x00, 0x5A, 0x5F, 0x60, 0x13, 0x0A, 0x0F, 0x0A, /* !"#$%&' */
0x00, 0x5A, 0x0F, 0x33, 0x13, 0x24, 0x10, 0x34, /* !"#$%&' */
0x24, 0x04, 0x14, 0x10, 0x23, 0x20, 0x03, 0x21, /* ()*+,-./ */
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 01234567 */
0x78, 0x79, 0x70, 0x5E, 0x5E, 0x33, 0x0E, 0x02, /* 89:;<=>? */
0x34, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* @ABCDEFG */
0x48, 0x49, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, /* HIJKLMNO */
0x57, 0x58, 0x59, 0x62, 0x63, 0x64, 0x65, 0x66, /* PQRSTUVW */
0x67, 0x68, 0x69, 0x40, 0x0E, 0x50, 0x0F, 0x5F, /* XYZ[\]^_ */
-1, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* abcdefg */
0x67, 0x68, 0x69, 0x40, 0x0E, 0x50, 0x0A, 0x5F, /* XYZ[\]^_ */
0x50, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* `abcdefg */
0x48, 0x49, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, /* hijklmno */
0x57, 0x58, 0x59, 0x62, 0x63, 0x64, 0x65, 0x66, /* pqrstuvw */
0x67, 0x68, 0x69, -1, -1, -1, -1, -1 /* xyz */
0x67, 0x68, 0x69, 0x0F, 0x0A, 0x5F, 0x60, -1 /* xyz{|}~ */
};
/* Alphameric (two digits) to card punch (ASCII). Oddities:
02 -> 12-2-8 (?), symmetric
07 -> 12-7-8 ("), reads as 5F
07 -> 12-7-8 (}), reads as 5F
12 -> 11-2-8 (!), reads as 5A
15 -> 11,0 (]), reads as 50
22 -> 0-2-8 ('), reads as 0A
32 -> 2-8 (%), reads as 0A
15 -> 11,0 (`), reads as 50
22 -> 0-2-8 (|), reads as 0A
32 -> 2-8 (^), reads as 0A
5B -> 11-3-8 (=), reads as 13
6A -> 0-2-8 ('), reads as 0A
6A -> 0-2-8 (|), reads as 0A
6B -> 0-3-8 (,), reads as 23
AA -> 0-2-8 ('), reads as 0A
AA -> 0-2-8 (|), reads as 0A
There is no way to punch 0-5-8 (#), 0-6-8 (\),
There is no way to punch 0-5-8 (~), 0-6-8 (\),
11-5-8 (]), 11-6-8 (;), 11-7-8 (_),
12-5-8 ([), or 12-6-8 (<)
*/
const char alp_to_cdp[256] = {
' ', -1, '?', '.', ')', -1, -1, '"', /* 00 */
-1, -1, '\'', -1, -1, -1, -1, '&',
' ', -1, '?', '.', ')', -1, -1, '}', /* 00 */
-1, -1, '\'', -1, -1, -1, -1, '"',
'+', -1, '!', '$', '*', ']', -1, -1, /* 10 */
-1, -1, -1, -1, -1, -1, -1, -1,
'-', '/', '\'', ',', '(', -1, -1, -1, /* 20 */
'-', '/', '|', ',', '(', -1, -1, -1, /* 20 */
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, '%', '=', '@', ':', ' ', -1, /* 30 */
-1, -1, '\'', -1, -1, -1, -1, '&',
-1, -1, '^', '=', '@', ':', ' ', -1, /* 30 */
-1, -1, '|', -1, -1, -1, -1, '"',
-1, 'A', 'B', 'C', 'D', 'E', 'F', 'G', /* 40 */
'H', 'I', -1, -1, -1, -1, -1, -1,
'_', 'J', 'K', 'L', 'M', 'N', 'O', 'P', /* 50 */
'Q', 'R', '?', '=', -1, -1, -1, '"',
'Q', 'R', '?', '=', -1, -1, -1, '}',
-1, '/', 'S', 'T', 'U', 'V', 'W', 'X', /* 60 */
'Y', 'Z', '\'', ',', -1, -1, -1, -1,
'Y', 'Z', '|', ',', -1, -1, -1, -1,
'0', '1', '2', '3', '4', '5', '6', '7', /* 70 */
'8', '9', -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, /* 80 */
@@ -203,7 +204,7 @@ const char alp_to_cdp[256] = {
-1, -1, -1, -1, -1, -1, -1, -1, /* 90 */
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, /* A0 */
-1, -1, '\'', -1, -1, -1, -1, -1,
-1, -1, '|', -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, /* B0 */
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, /* C0 */
@@ -227,8 +228,9 @@ t_stat cdr (uint32 op, uint32 pa, uint32 f0, uint32 f1)
{
int32 i;
int8 cdc;
t_stat r, inv = SCPE_OK;
t_stat r, sta;
sta = SCPE_OK; /* assume ok */
switch (op) { /* case on op */
case OP_RN: /* read numeric */
@@ -238,7 +240,7 @@ switch (op) { /* case on op */
cdc = cdr_to_num[cdr_buf[i]]; /* translate */
if (cdc < 0) { /* invalid? */
ind[IN_RDCHK] = 1; /* set read check */
inv = STOP_INVCHR; /* set return status */
if (io_stop) sta = STOP_INVCHR; /* set return status */
cdc = 0;
}
M[pa] = cdc; /* store digit */
@@ -253,7 +255,7 @@ switch (op) { /* case on op */
cdc = cdr_to_alp[cdr_buf[i]]; /* translate */
if (cdc < 0) { /* invalid? */
ind[IN_RDCHK] = 1; /* set read check */
inv = STOP_INVCHR; /* set return status */
if (io_stop) sta = STOP_INVCHR; /* set return status */
cdc = 0;
};
M[pa] = (M[pa] & FLAG) | (cdc & DIGIT); /* store 2 digits */
@@ -266,7 +268,7 @@ switch (op) { /* case on op */
return STOP_INVFNC;
}
CRETIOE (io_stop, inv);
return sta;
}
/* Fill card reader buffer - all errors are hard errors */
@@ -366,7 +368,7 @@ switch (op) { /* decode op */
if (cdc < 0) { /* bad char? */
ind[IN_WRCHK] = 1; /* set write check */
CRETIOE (io_stop, STOP_INVCHR);
}
}
cdp_buf[i] = cdc; /* store in buf */
pa = ADDR_A (pa, 2); /* incr mem addr */
}

View File

@@ -26,6 +26,7 @@
This CPU module incorporates code and comments from the 1620 simulator by
Geoff Kuenning, with his permission.
22-Sep-05 RMS Fixed declarations (from Sterling Garwood)
16-Aug-05 RMS Fixed C++ declaration and cast problems
07-Nov-04 RMS Added instruction history
26-Mar-04 RMS Fixed warnings with -std=c99
@@ -131,7 +132,7 @@ uint8 ind[NUM_IND] = { 0 }; /* indicators */
extern int32 sim_int_char;
extern int32 sim_interval;
extern int32 sim_brk_types, sim_brk_dflt, sim_brk_summ; /* breakpoint info */
extern uint32 sim_brk_types, sim_brk_dflt, sim_brk_summ; /* breakpoint info */
extern FILE *sim_log;
t_stat cpu_ex (t_value *vptr, t_addr addr, UNIT *uptr, int32 sw);

View File

@@ -1,7 +1,7 @@
To: Users
From: Bob Supnik
Subj: IBM 1620 Simulator Usage
Date: 15-Nov-2004
Date: 15-Sep-2005
COPYRIGHT NOTICE
@@ -209,8 +209,8 @@ registers are:
COL 7 current column
TIME 24 polling interval
When the 1620 CPU requests input from the keyboard, a reverse apostrophe
(`) is printed. The CPU hangs waiting for input until the return/enter
When the 1620 CPU requests input from the keyboard, a greater than sign
(>) is printed. The CPU hangs waiting for input until the return/enter
key is pressed. The typewriter has no errors.
2.3 1621 Paper Tape Reader (PTR)
@@ -407,21 +407,19 @@ controlled by command line switches:
-c display as single character (alphameric
for CPU and DP, ASCII for others)
-s display as flag terminated numeric string
-s display as flag terminated alphameric string
(CPU and DP only)
-m display instruction mnemonics
(CPU and DP only)
-d display 50 characters per line, with word
marks denoted by "_" on the line above
In a CPU string display, word marks are denoted by ~.
Input parsing is controlled by the first character typed in or by command
line switches:
' or -c character (alphameric for CPU and DP, ASCII
for others)
" or -s numeric string (CPU and DP only)
" or -s alphameric string (CPU and DP only)
alphabetic instruction mnemonic (CPU and DP only)
numeric octal number
@@ -462,9 +460,6 @@ are accepted on input as equivalent to upper case.
Card code PT code RA RN LPT WA ASCII representation
<blank> C 0 0 blank blank
12 XOC 10 0 + +
11 X 20 F+0 - -
0 O 70 0 0 0
1 1 71 1 1 1
2 2 72 2 2 2
3 C21 73 3 3 3
@@ -474,6 +469,13 @@ Card code PT code RA RN LPT WA ASCII representation
7 421 77 7 7 7
8 8 78 8 8 8
9 C81 79 9 9 9
2 + 8 C82 ? 0A A na ^
3 + 8 821 33 B = = (or #)
4 + 8 C84 34 C @ @ (or ')
5 + 8 841 70 0 0 :
6 + 8 842 ? 0E E na >
7 + 8 C8421 ? 0F F na {
12 XOC 10 0 + + (or &)
12 + 1 XO1 41 1 A A
12 + 2 XO2 42 2 B B
12 + 3 XOC21 43 3 C C
@@ -483,6 +485,13 @@ Card code PT code RA RN LPT WA ASCII representation
12 + 7 XO421 47 7 G G
12 + 8 XO8 48 8 H H
12 + 9 XOC81 49 9 I I
12 + 2 + 8 XOC82 ? 5A ? F+A na ?
12 + 3 + 8 XO821 3 ? F+B . .
12 + 4 + 8 XOC84 4 C ) )
12 + 5 + 8 XO841 40 0 na [
12 + 6 + 8 XO842 ? 5E ? F+E na <
12 + 7 + 8 XOC8421 5F F+F na }
11 X 20 F+0 - -
11 + 1 XC1 51 F+1 J J
11 + 2 XC2 52 F+2 K K
11 + 3 X21 53 F+3 L L
@@ -492,6 +501,13 @@ Card code PT code RA RN LPT WA ASCII representation
11 + 7 XC421 57 F+7 P P
11 + 8 XC8 58 F+8 Q Q
11 + 9 X81 59 F+9 R R
11 + 2 + 8 X82 5A F+A na !
11 + 3 + 8 XC821 13 F+B $ $
11 + 4 + 8 X84 14 F+C * *
11 + 5 + 8 XC841 50 F+0 - ]
11 + 6 + 8 XC842 ? 5E ? F+E na ;
11 + 7 + 8 X8421 5F F+F na _
0 O 70 0 0 0
0 + 1 OC1 21 1 / /
0 + 2 OC2 62 2 S S
0 + 3 O21 63 3 T T
@@ -501,35 +517,17 @@ Card code PT code RA RN LPT WA ASCII representation
0 + 7 OC421 67 7 X X
0 + 8 OC8 68 8 Y Y
0 + 9 O81 69 9 Z Z
2 + 8 C82 ? 0A A na %
3 + 8 821 33 B = =
4 + 8 C84 34 C @ @
5 + 8 841 70 0 0 :
6 + 8 842 ? 0E E na >
7 + 8 C8421 ? 0F F na ^
12 + 2 + 8 XOC82 ? 5A ? F+A na ?
12 + 3 + 8 XO821 3 ? F+B . .
12 + 4 + 8 XOC84 4 C ) )
12 + 5 + 8 XO841 40 0 na [
12 + 6 + 8 XO842 ? 5E ? F+E na <
12 + 7 + 8 XOC8421 5F F+F na "
11 + 2 + 8 X82 5A F+A na !
11 + 3 + 8 XC821 13 F+B $ $
11 + 4 + 8 X84 14 F+C * *
11 + 5 + 8 XC841 50 F+0 - ]
11 + 6 + 8 XC842 ? 5E ? F+E na ;
11 + 7 + 8 X8421 5F F+F na _
0 + 2 + 8 O82 0A A na '
0 + 2 + 8 O82 0A A na |
0 + 3 + 8 OC821 23 B , ,
0 + 4 + 8 O84 24 C ( (
0 + 5 + 8 OC841 60 0 na #
0 + 4 + 8 O84 24 C ( ( (or %)
0 + 5 + 8 OC841 60 0 na ~
0 + 6 + 8 OC842 0E E na \
0 + 7 + 8 O8421 0F F na &
0 + 7 + 8 O8421 0F F na "
2 ?
12 !
22 '
22 |
32 0
35 :
36 blank
11 + 0 50 - ]
11 + 0 50 - `

View File

@@ -25,6 +25,7 @@
lpt 1443 line printer
21-Sep-05 RMS Revised translation tables for 7094/1401 compatibility
29-Dec-03 RMS Fixed bug in scheduling
25-Apr-03 RMS Revised for extended file support
*/
@@ -99,7 +100,7 @@ DEVICE lpt_dev = {
const char num_to_lpt[32] = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', '\'', ' ', '@', ':', ' ', 'G',
'8', '9', '|', ' ', '@', ':', ' ', 'G',
'-', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'W', ' ', '*', ' ', -1, 'X'
};
@@ -111,7 +112,7 @@ const char alp_to_lpt[256] = {
-1, -1, -1, -1, -1, -1, -1, -1,
'+', -1, '!', '$', '*', ' ', -1, -1, /* 10 */
-1, -1, -1, -1, -1, -1, -1, -1,
'-', '/', '\'', ',', '(', -1, -1, -1, /* 20 */
'-', '/', '|', ',', '(', -1, -1, -1, /* 20 */
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, '0', '=', '@', ':', -1, -1, /* 30 */
-1, -1, -1, -1, -1, -1, -1, -1,
@@ -152,8 +153,9 @@ t_stat lpt (uint32 op, uint32 pa, uint32 f0, uint32 f1)
{
int8 lpc;
uint8 z, d;
t_stat r, inv = SCPE_OK;
t_stat r, sta;
sta = SCPE_OK;
sim_cancel (&lpt_unit); /* "stall" until */
ind[IN_PRBSY] = 0; /* printer free */
@@ -178,8 +180,8 @@ switch (op) { /* decode op */
lpc = alp_to_lpt[(z << 4) | d]; /* translate pair */
if (lpc < 0) { /* bad char? */
ind[IN_WRCHK] = ind[IN_PRCHK] = 1; /* wr chk */
inv = STOP_INVCHR; /* set return status */
}
if (io_stop) sta = STOP_INVCHR; /* set return status */
}
lpt_buf[lpt_bptr] = lpc & 0x7F; /* fill buffer */
pa = ADDR_A (pa, 2); /* incr mem addr */
}
@@ -187,7 +189,7 @@ switch (op) { /* decode op */
r = lpt_print (); /* print line */
if (r != SCPE_OK) return r;
}
CRETIOE (io_stop, inv);
return sta;
default: /* invalid function */
return STOP_INVFNC;
@@ -203,8 +205,9 @@ t_stat lpt_num (uint32 pa, uint32 len, uint32 f1)
uint32 end;
uint8 d;
int8 lpc;
t_stat r, inv = SCPE_OK;
t_stat r, sta;
sta = SCPE_OK;
end = pa + len;
for ( ; lpt_bptr < LPT_BSIZE; lpt_bptr++) { /* only fill buf */
d = M[pa]; /* get digit */
@@ -213,7 +216,7 @@ for ( ; lpt_bptr < LPT_BSIZE; lpt_bptr++) { /* only fill buf */
lpc = num_to_lpt[d]; /* translate */
if (lpc < 0) { /* bad char? */
ind[IN_WRCHK] = ind[IN_PRCHK] = 1; /* wr chk */
inv = STOP_INVCHR; /* set return status */
if (io_stop) sta = STOP_INVCHR; /* set return status */
}
lpt_buf[lpt_bptr++] = lpc & 0x7F; /* fill buffer */
PP (pa); /* incr mem addr */
@@ -222,7 +225,7 @@ if ((f1 & 1) == 0) { /* print now? */
r = lpt_print (); /* print line */
if (r != SCPE_OK) return r;
}
CRETIOE (io_stop, inv);
return sta;
}
/* Print and space */
@@ -268,7 +271,7 @@ if (lpt_savctrl & K_CH10) { /* chan 10-12? */
if ((chan == 0) || (chan > 12)) return STOP_INVFNC;
for (i = 1; i < cct_lnt + 1; i++) { /* sweep thru cct */
if (CHP (chan, cct[(cct_ptr + i) % cct_lnt]))
return lpt_space (i, TRUE);
return lpt_space (i, TRUE);
}
return STOP_CCT; /* runaway channel */
}

View File

@@ -26,6 +26,7 @@
ptr 1621 paper tape reader
ptp 1624 paper tape punch
21-Sep-05 RMS Revised translation tables for 7094/1401 compatibility
25-Apr-03 RMS Revised for extended file support
*/
@@ -213,8 +214,9 @@ t_stat ptr (uint32 op, uint32 pa, uint32 f0, uint32 f1)
uint32 i;
int8 mc;
uint8 ptc;
t_stat r, inv = SCPE_OK;
t_stat r, sta;
sta = SCPE_OK;
switch (op) { /* case on op */
case OP_RN: /* read numeric */
@@ -223,11 +225,11 @@ switch (op) { /* case on op */
if (r != SCPE_OK) return r; /* error? */
if (ptc & PT_EL) { /* end record? */
M[pa] = REC_MARK; /* store rec mark */
CRETIOE (io_stop, inv); /* done */
return sta; /* done */
}
if (bad_par[ptc]) { /* bad parity? */
ind[IN_RDCHK] = 1; /* set read check */
inv = STOP_INVCHR; /* set return status */
if (io_stop) sta = STOP_INVCHR; /* set return status */
M[pa] = 0; /* store zero */
}
else M[pa] = ptr_to_num[ptc]; /* translate, store */
@@ -242,12 +244,12 @@ switch (op) { /* case on op */
if (ptc & PT_EL) { /* end record? */
M[pa] = REC_MARK; /* store rec mark */
M[pa - 1] = 0;
CRETIOE (io_stop, inv); /* done */
return sta; /* done */
}
mc = ptr_to_alp[ptc]; /* translate */
if (bad_par[ptc] || (mc < 0)) { /* bad par or char? */
ind[IN_RDCHK] = 1; /* set read check */
inv = STOP_INVCHR; /* set return status */
if (io_stop) sta = STOP_INVCHR; /* set return status */
mc = 0; /* store blank */
}
M[pa] = (M[pa] & FLAG) | (mc & DIGIT); /* store 2 digits */
@@ -269,10 +271,11 @@ t_stat btr (uint32 op, uint32 pa, uint32 f0, uint32 f1)
{
uint32 i;
uint8 ptc;
t_stat r, inv = SCPE_OK;
t_stat r, sta;
if ((cpu_unit.flags & IF_BIN) == 0) return STOP_INVIO;
sta = SCPE_OK;
switch (op) { /* case on op */
case OP_RA: /* read alphameric */
@@ -282,11 +285,11 @@ switch (op) { /* case on op */
if (ptc & PT_EL) { /* end record? */
M[pa] = REC_MARK; /* store rec mark */
M[pa - 1] = 0;
CRETIOE (io_stop, inv); /* done */
return sta; /* done */
}
if (bad_par[ptc]) { /* bad parity? */
ind[IN_RDCHK] = 1; /* set read check */
inv = STOP_INVCHR; /* set return status */
if (io_stop) sta = STOP_INVCHR; /* set return status */
}
M[pa] = (M[pa] & FLAG) | (ptc & 07); /* store 2 digits */
M[pa - 1] = (M[pa - 1] & FLAG) |

View File

@@ -25,6 +25,7 @@
tty console typewriter
21-Sep-05 RMS Revised translation tables for 7094/1401 compatibility
22-Dec-02 RMS Added break test
*/
@@ -74,7 +75,7 @@ DEVICE tty_dev = {
/* Keyboard to numeric */
const char *tti_to_num = "0123456789'=@:;\"";
const char *tti_to_num = "0123456789|=@:;}";
/* Keyboard to alphameric (digit pair) - translates LC to UC */
@@ -83,7 +84,7 @@ const int8 tti_to_alp[128] = {
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, /* 10 */
-1, -1, -1, -1, -1, -1, -1, -1,
0x00, 0x02, 0x0F, -1, 0x13, -1, -1, -1, /* !"#$%&' */
0x00, 0x02, -1, 0x33, 0x13, 0x24, 0x10, 0x34, /* !"#$%&' */
0x24, 0x04, 0x14, 0x10, 0x23, 0x20, 0x03, 0x21, /* ()*+,-./ */
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 01234567 */
0x78, 0x79, -1, -1, -1, 0x33, -1, -1, /* 89:;<=>? */
@@ -91,17 +92,17 @@ const int8 tti_to_alp[128] = {
0x48, 0x49, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, /* HIJKLMNO */
0x57, 0x58, 0x59, 0x62, 0x63, 0x64, 0x65, 0x66, /* PQRSTUVW */
0x67, 0x68, 0x69, -1, -1, -1, -1, -1, /* XYZ[\]^_ */
-1, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* abcdefg */
-1, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* `abcdefg */
0x48, 0x49, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, /* hijklmno */
0x57, 0x58, 0x59, 0x62, 0x63, 0x64, 0x65, 0x66, /* pqrstuvw */
0x67, 0x68, 0x69, -1, -1, -1, -1, -1 /* xyz */
0x67, 0x68, 0x69, -1, -1, 0x0F, -1, -1 /* xyz{|}~ */
};
/* Numeric (digit) to typewriter */
const char num_to_tto[16] = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', '\'', '=', '@', ':', ';', '"'
'8', '9', '|', '=', '@', ':', ';', '}'
};
/* Alphameric (digit pair) to typewriter */
@@ -111,7 +112,7 @@ const char alp_to_tto[256] = {
-1, -1, -1, -1, -1, -1, -1, -1,
'+', -1, '!', '$', '*', ' ', -1, -1, /* 10 */
-1, -1, -1, -1, -1, -1, -1, -1,
'-', '/', '\'', ',', '(', -1, -1, -1, /* 20 */
'-', '/', '|', ',', '(', -1, -1, -1, /* 20 */
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, '0', '=', '@', ':', -1, -1, /* 30 */
-1, -1, -1, -1, -1, -1, -1, -1,
@@ -154,8 +155,9 @@ t_stat tty (uint32 op, uint32 pa, uint32 f0, uint32 f1)
t_addr i;
uint8 d;
int8 ttc;
t_stat r, inv = SCPE_OK;
t_stat r, sta;
sta = SCPE_OK;
switch (op) { /* case on op */
case OP_K: /* control */
@@ -214,13 +216,12 @@ switch (op) { /* case on op */
case OP_WA:
for (i = 0; i < MEMSIZE; i = i + 2) { /* stop runaway */
d = M[pa] & DIGIT; /* get digit */
if ((d & 0xA) == REC_MARK) /* 8-2 char? */
CRETIOE (io_stop, inv); /* end record */
if ((d & 0xA) == REC_MARK) return sta; /* 8-2 char? done */
d = ((M[pa - 1] & DIGIT) << 4) | d; /* get digit pair */
ttc = alp_to_tto[d]; /* translate */
if (ttc < 0) { /* bad char? */
ind[IN_WRCHK] = 1; /* set write check */
inv = STOP_INVCHR; /* set return status */
if (io_stop) sta = STOP_INVCHR; /* set return status */
}
tto_write (ttc & 0x7F); /* write */
pa = ADDR_A (pa, 2); /* incr mem addr */
@@ -247,7 +248,7 @@ do {
r = tti_read (&raw); /* get char */
if (r != SCPE_OK) return r; /* error? */
if (raw == '\r') *c = 0x7F; /* return? mark */
else if (raw == '~') flg = FLAG; /* flag? mark */
else if ((raw == '~') || (raw == '`')) flg = FLAG; /* flag? mark */
else if (cp = strchr (tti_to_num, raw)) /* legal? */
*c = ((int8) (cp - tti_to_num)) | flg; /* assemble char */
else raw = 007; /* beep! */
@@ -283,7 +284,7 @@ t_stat tti_read (int8 *c)
int32 t;
do {
t = sim_poll_kbd (); /* get character */
t = sim_poll_kbd (); /* get character */
} while ((t == SCPE_OK) || (t & SCPE_BREAK)); /* ignore break */
if (t < SCPE_KFLAG) return t; /* error? */
*c = t & 0177; /* store character */
@@ -304,7 +305,7 @@ for (i = 0; i < MEMSIZE; i++) { /* (stop runaway) */
if (len? (pa >= end): /* dump: end reached? */
((d & REC_MARK) == REC_MARK)) /* write: rec mark? */
return SCPE_OK; /* end operation */
if (d & FLAG) tto_write ('~'); /* flag? */
if (d & FLAG) tto_write ('`'); /* flag? */
r = tto_write (num_to_tto[d & DIGIT]); /* write */
if (r != SCPE_OK) return r; /* error? */
PP (pa); /* incr mem addr */
@@ -369,6 +370,6 @@ return SCPE_OK;
void tti_unlock (void)
{
tto_write ('`');
tto_write ('>');
return;
}