SDS: Allow LOAD command to accept a more flexible boot sequence
The canonical boot sequence uses WIM 0,2 in location 5 and an initial load address in location 11 (and in the X register). This is limiting for devices like RAD that do not report an end-of-file, or for paper tape that report EOF too late and cause the WIM to fail. A simple load address in location 11, with bit 9 set to satisfy the BRX, doesn't do any word counting. The BRX always branches back to location 5. This change allows a true negative word count to be placed in location 11 to work with a WIM XXXXX,2 where XXXXX is one location past the region to be loaded by the boot sequence. XXXXX plus the negative count in location 11 (buf[3]+buf[7]) initially points to the first location to be loaded, and the BRX will not branch when the word count is exhausted (register X=0) allowing the branch to the start address to be executed. Old allowable boot sequence: location 2 = WIM 12,2 location 3 = BRX 2 location 4 = LDX 11 location 5 = WIM 0,2 location 6 = SKS 21000 location 7 = BRX 5 location 10 = BRU Transfer Address location 11 = Load address with bit 9 set to force BRX to branch New allowable boot sequence: location 2 = WIM 12,2 location 3 = BRX 2 location 4 = LDX 11 location 5 = WIM [end load address + 1],2 location 6 = SKS 21000 location 7 = BRX 5 location 10 = BRU Transfer Address location 11 = Negative count to number of words to load
This commit is contained in:
parent
ef99a17407
commit
c256894b62
1 changed files with 2 additions and 2 deletions
|
@ -234,7 +234,7 @@ for (i = 0; i < 8; i++) { /* read boot */
|
||||||
if ((buf[0] != 023200012) || /* 2 = WIM 12,2 */
|
if ((buf[0] != 023200012) || /* 2 = WIM 12,2 */
|
||||||
(buf[1] != 004100002) || /* 3 = BRX 2 */
|
(buf[1] != 004100002) || /* 3 = BRX 2 */
|
||||||
(buf[2] != 007100011) || /* 4 = LDX 11 */
|
(buf[2] != 007100011) || /* 4 = LDX 11 */
|
||||||
(buf[3] != 023200000) || /* 5 = WIM 0,2 */
|
(buf[3] & ~VA_MASK != 023200000) || /* 5 = WIM xxxxx,2 */
|
||||||
(buf[4] != 004021000) || /* 6 = SKS 21000 */
|
(buf[4] != 004021000) || /* 6 = SKS 21000 */
|
||||||
(buf[5] != 004100005)) /* 7 = BRX 5 */
|
(buf[5] != 004100005)) /* 7 = BRX 5 */
|
||||||
return SCPE_FMT;
|
return SCPE_FMT;
|
||||||
|
@ -242,7 +242,7 @@ for (i = 0; i < 8; i++) /* copy boot */
|
||||||
M[i + 2] = buf[i];
|
M[i + 2] = buf[i];
|
||||||
if (I_GETOP (buf[6]) == BRU)
|
if (I_GETOP (buf[6]) == BRU)
|
||||||
P = buf[6] & VA_MASK;
|
P = buf[6] & VA_MASK;
|
||||||
for (i = buf[7] & VA_MASK; i <= VA_MASK; i++) { /* load data */
|
for (i = (buf[3]+buf[7]) & VA_MASK; i <= VA_MASK; i++) {/* load data */
|
||||||
if ((wd = get_word (fileref, &ldr)) < 0)
|
if ((wd = get_word (fileref, &ldr)) < 0)
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
M[i] = wd;
|
M[i] = wd;
|
||||||
|
|
Loading…
Add table
Reference in a new issue