7577: 7751 ; 7600: 0006 ; The BOOTSTRAP entry point! A constant? <<<<<<<<<<<<<<<<<<<<< 7601: 4242 JMS 7642 ; Call SYSIO entry point. 7602: 0005 ; Function code. 5 = WRITE. 7603: 0373 ; Block = first disk scratch block. 7604: 7200 ; Buffer address. 7605: 0005 ; Link field? Also used as temporary storage by the instruction at 7647 as the function code parameter. 7606: 7402 HLT ; Error HALT. 7607: 4242 JMS 7642 ; Call SYSIO entry point. 7610: 0005 ; Function code. 5 = WRITE. 7611: 0374 ; Block = second disk scratch block. 7612: 7400 ; Buffer address. 7613: 0001 ; Link field? Also used as temporary storage by the instruction at 7713 as ???. 7614: 7752 SPA SNA CLA HLT 7615: 4242 JMS 7642 ; Call SYSIO entry point. 7616: 0003 ; Function code. 3 = READ. 7617: 0001 ; Block = MONITOR (1ST PAGE OF SAVE). 7620: 7200 ; Buffer address. 7621: 0000 ; Link field? Also used as temporary storage by the instruction at 7665 as ???. 7622: 7402 HLT ; Error HALT. 7623: 4242 JMS 7642 ; Call SYSIO entry point. 7624: 0003 ; Function code. 3 = READ. 7625: 0002 ; Block = MONITOR (START). 7626: 7400 ; Buffer address. 7627: 0000 ; Link field? Also used as temporary storage by the instruction at 7661 as the disk block parameter. 7630: 7402 HLT ; Error HALT. 7631: 5626 JMP I 7626 ; Jump to MONITOR START. >>>>>>>>>>>>>>>>>>>> 7632: 0077 ; Constant 0077. Used by the instructions at addresses 7705 and 7721. 7633: 0040 ; Constant 0040. Used by the instruction at address 7715. 7634: 0700 ; Constant 0700. Used by the instruction at address 7724. ; An indirect error return is desired by the caller. 7635: 1214 TAD 7614 ; Load AC from 7614 (the strange constant value of 7752)!!! 7636: 3352 DCA 7752 ; Store AC to memory address 7752. Clear AC. 7637: 1642 TAD I 7642 ; Load the value found at the return address pointer (which should now be pointing at the caller's ERROR address). 7640: 3242 DCA 7642 ; Store the result back into 7642 (the return address). Clear AC. 7641: 5301 JMP 7701 ; Jump to 7701 (back into the main pass of the program) as though nothing had happened - we have just 'bodged' the return address if an error occurs though! ; Called as: ; ; JMS I SYSIO ; WORD DESIRED FUNCTION ; WORD DESIRED BLOCK ; WORD DESIRED CORE ADDRESS (low 12 bits). ; WORD LINK FIELD (Filled by WRITE, used by READ). ; ERROR RETURN HERE ; NORMAL RETURN HERE ; ; FUNCTION WORD ; ============= ; ; 0 1 2 3 4 5 6 7 8 9 10 11 ; U U - Unused bits. ; R - 0=Normal return. 1=Indirect return. ; U U U - Unit number 0-7 (if DECtape?). ; F F F - Memory field 0-7. ; F F F - Function. READ=3. WRITE=5. ; ; How does this indirect return work I wonder? ; ; Ah... ; ; The ERROR RETURN in the indirect case is a pointer to a location in memory to return to. ; It will return to the pointer in the case of an ERROR or to pointer+1 in the case of NO ERROR. ; 7642: 0371 SYSIO SUBROUTINE. This is the location reserved for the return address though! 7643: 7346 CLA CLL CMA RTL ; AC = 7775 (-3). This is the 'retry counter' in case of a disk read or write error. 7644: 3357 DCA 7757 ; Save to 7757. Clear AC. 7645: 1642 TAD I 7642 ; AC = function code parameter. 7646: 3205 DCA 7605 ; Save to 7605. Clear AC. Store AC to a link field?? 7647: 1205 TAD 7605 ; Reload function code parameter again to AC. 7650: 0200 AND 7600 ; Only interested in bits 000 000 000 110 = (3=010=READ; 5=100=WRITE). 7651: 1364 TAD 7764 ; Add to the value stored at 7764 (= 6601). 6603=READ. 6605=WRITE. 7652: 3336 DCA 7736 ; Save to 7736. Clear AC. 7653: 1205 TAD 7605 ; Reload function code parameter again to AC. 7654: 0347 AND 7747 ; Mask with 0070 = 000 000 111 000. This isolates the memory field. 7655: 1375 TAD 7775 ; Add in 6201. = 62X1. CDF Change Data Field. 7656: 3370 DCA 7770 ; Store resulting CDF instruction to 7770. 7657: 2242 ISZ 7642 ; Move parameter pointer (subroutine return address) on to the BLOCK parameter. 7660: 1642 TAD I 7642 ; AC = disk block number to read/write. 7661: 3227 DCA 7627 ; Save to 7627. Clear AC. Store AC to a link field?? 7662: 2242 ISZ 7642 ; Move parameter pointer (subroutine return address) on to the ADDRESS parameter. 7663: 1642 TAD I 7642 ; AC = memory address to start reading from/ writing to. 7664: 1250 TAD 7650 ; AC = memory address + what is at 7650 = 0200. ??? 7665: 3221 DCA 7621 ; Save to 7621. Clear AC. Store AC to a link field?? 7666: 2242 ISZ 7642 ; Move parameter pointer (subroutine return address) on to the LINK parameter. 7667: 1642 TAD I 7642 ; AC = link parameter. 7670: 4366 JMS 7766 ; CALL SUBROUTINE at 7766. 7671: 3353 DCA 7753 ; Save to 7753. Clear AC. 7672: 1242 TAD 7642 ; AC = the address itself of the LINK field. 7673: 3352 DCA 7752 ; Store the address of the link field to 7752. Clear AC. 7674: 2242 ISZ 7642 ; Move parameter pointer (subroutine return address) on to the error address of the caller. 7675: 1205 TAD 7605 ; Pick-up the function code parameter. 7676: 7006 RTL ; Rotate twice left AC and L. 7677: 7710 SPA CLA ; Skip if AC sign bit is '0'. Clear AC anyhow. This indicates a 'NORMAL RETURN'. 7700: 5235 JMP 7635 ; Jump to 7635 if AC sign bit was '1'. This indicates an 'INDIRECT RETURN'. ; A normal return is desired by the caller. 7701: 1205 TAD 7605 ; Pick-up the function code parameter. 7702: 0347 AND 7747 ; Logically AND AC with what is at address 7747 = 0070 to leave us with the desired memory field specified by the caller. 7703: 6615 DIML ; [DISK INSTRUCTION]. Load desired memory field into the disk controller from AC. Clear AC. 7704: 1227 TAD 7627 ; Add into AC what is at address 7627 (the disk block number). Presumably AC is 0 at this point? 7705: 0232 AND 7632 ; And the block number (in AC) with the contents of address 7632 = Constant 0077. Lowest 6 bits retained of the block number. 7706: 7112 CLL RTR ; L=0. Rotate AC twice right via L. 7707: 7012 RTR ; Rotate AC twice more right. 7710: 7012 RTR ; Rotate AC twice more right (getting dizzy now)... Making 6 right rotates in total. 7711: 7101 CLL IAC ; L=0. AC=AC+1 (linking any overflow into L). 7712: 1227 TAD 7627 ; Add to AC what is stored at address 7627 (which is the disk block number again)??? 7713: 3213 DCA 7613 ; Store the result to 7613. Another link field?? Clear AC. 7714: 7430 SZL ; Skip the next instruction if L=0. 7715: 1233 TAD 7633 ; Load into AC what is stored at address 7633 = Constant 0040. 7716: 1227 TAD 7627 ; Add into AC what is stored at address 7627 = the desired disk block. 7717: 7012 RTR ; Rotate AC right twice via L. 7720: 7012 RTR ; Rotate AC right twice via L. making 4 right rotates in total. 7721: 0232 AND 7632 ; Logically AND AC with the constant at address 7632 = 0077. Lowest 6 bits retained. 7722: 3350 DCA 7750 ; Store the result in AC to memory address 7750. Clear AC. 7723: 1205 TAD 7605 ; Load AC from the value stored at address 7605 = function code parameter. 7724: 0234 AND 7634 ; Logically AND AC with the constant at address 7634 = 0700. Extract the desired UNIT number. 7725: 1350 TAD 7750 ; Add into AC what is stored at address 7750. This is the value calculated from address 7722. 7726: 7110 CLL RAR ; L=0. Rotate AC right through L. 7727: 6643 DXAL ; [DISK INSTRUCTION]. Load EMA bits again? Clears AC. 7730: 1346 TAD 7746 ; Load AC with the value at address 7746 = constant 7577. What is this? 7731: 3350 DCA 7750 ; Store AC to address 7750. Clear AC. 7732: 1346 TAD 7746 ; Load AC with the value at address 7746 = constant 7577. What is this? 7733: 1221 TAD 7621 ; Add into AC the value at address 7621 (one of the magic link fields used as temporary storage)... 7734: 3351 DCA 7751 ; Store the result to memory address 7751. Clear AC. 7735: 1213 TAD 7613 ; Load AC with the value at memory address 7613 (another one of the magic link fields used as temporary storage)... 7736: 6605 DMAR/DMAW ; Used for storage from 7652. 6603=READ. 6605=WRITE. 7737: 6623 DISK ; [DISK INSTRUCTION]. Skip next instruction if either the error flag is set or the data completion flag is set. 7740: 5337 JMP 7737 ; Loop back to 'DISK' instruction if READ or WRITE instruction has not 'finished'... 7741: 6621 DFSE ; [DISK INSTRUCTION]. Skip the next instruction if an error occurred (DRL, PER, WLS or NXD errors). 7742: 5360 JMP 7760 ; An 'OK' read or write occurred. ; An error occurred during the disk read or write. 7743: 2357 ISZ 7757 ; Increment the 'tries' counter. 7744: 5301 JMP 7701 ; Repeat the disk read or write (a retry). 7745: 5361 JMP 7761 ; Exhausted the retry counter - must be an error then! 7746: 7577 ; Value used at instructions 7730 and 7732. 7747: 0070 ; Mask used at instruction 7654. 7750: 0000 ; Used for storage from the instructions at addresses 7722 and 7731. 7750 = WORD COUNT (WC) !!!!!!!!!!!!!!!! 7751: 0000 ; Used for storage from the instruction at address 7734. 7751 = CURRENT ADDRESS (CA) !!!!!!!!!!!!!!!! 7752: 0370 ; Used for storage from 7673. The address of the LINK field from the caller. Also written to from the instruction at address 7636 which would store the value 7752??? 7753: 0000 ; Used for storage from 7671. 7754: 0000 ; *** APPEARS UNUSED *** 7755: 0000 ; *** APPEARS UNUSED *** 7756: 0000 ; *** APPEARS UNUSED *** 7757: 7775 ; Used for storage from 7644. Value set to 7775... This is the 'retry counter'. ; Get here from 7742 following an 'OK' disk read or write. 7760: 2242 ISZ 7642 ; Bump the subroutine return address to the correct point (skip the error address). 7761: 1353 TAD 7753 ; Load AC from memory address 7753 = result of the instruction at 7671. 7762: 4366 JMS 7766 ; Call the subroutine at 7766. 7763: 3752 DCA I 7752 ; Update the LINK field of the caller. 7764: 6601 DCMA ; [DISK INSTRUCTION]. Clears a load of disk state registers... Added into AC at instruction 7651. 7765: 5642 JMP I 7642 ; Return from SYSIO subroutine. 7766: 7671 ; Start of subroutine (i.e. space reserved for return address). Called from 7670 and 7762. 7767: 3351 DCA 7751 ; Store AC to CURRENT ADDRESS and clear AC. 7770: 6201 CDF 0 ; Change Data Field. Used for storage from 7656. 7771: 1621 TAD I 7621 ; The value indirectly accessed by one of the magic link fields... 7772: 3350 DCA 7750 ; Store to WORD COUNT and clear AC. 7773: 1351 TAD 7751 ; Load AC from CURRENT ADDRESS. 7774: 3621 DCA I 7621 ; Store AC indirectly accessed by one of the magic link fields... 7775: 6201 CDF 0 ; Added into AC at instruction 7655. Return back to current field. 7776: 1350 TAD 7750 ; Load the WORD COUNT into AC. 7777: 5766 JMP I 7766 ; Return from subroutine back to caller... ============================================ 7600: AND 6 7601: JMS 7642 7602: AND 5 7603: AND 7773 7604: CLA 7605: AND 5 7606: HLT 7607: JMS 7642 7610: AND 5 7611: AND 7774 7612: NOP2 7613: AND 1 7614: SPA SNA CLA HLT 7615: JMS 7642 7616: AND 3 7617: AND 1 7620: CLA 7621: AND 0 7622: HLT 7623: JMS 7642 7624: AND 3 7625: AND 2 7626: NOP2 7627: AND 0 7630: HLT 7631: JMP I 7626 7632: AND 77 7633: AND 40 7634: AND I 7700 7635: TAD 7614 7636: DCA 7752 7637: TAD I 7642 7640: DCA 7642 7641: JMP 7701 7642: AND 7771 7643: CLA CLL CMA RTL 7644: DCA 7757 7645: TAD I 7642 7646: DCA 7605 7647: TAD 7605 7650: AND 7600 7651: TAD 7764 7652: DCA 7736 7653: TAD 7605 7654: AND 7747 7655: TAD 7775 7656: DCA 7770 7657: ISZ 7642 7660: TAD I 7642 7661: DCA 7627 7662: ISZ 7642 7663: TAD I 7642 7664: TAD 7650 7665: DCA 7621 7666: ISZ 7642 7667: TAD I 7642 7670: JMS 7766 7671: DCA 7753 7672: TAD 7642 7673: DCA 7752 7674: ISZ 7642 7675: TAD 7605 7676: RTL 7677: SPA CLA 7700: JMP 7635 7701: TAD 7605 7702: AND 7747 7703: DIML 7704: TAD 7627 7705: AND 7632 7706: CLL RTR 7707: RTR 7710: RTR 7711: CLL IAC 7712: TAD 7627 7713: DCA 7613 7714: SZL 7715: TAD 7633 7716: TAD 7627 7717: RTR 7720: RTR 7721: AND 7632 7722: DCA 7750 7723: TAD 7605 7724: AND 7634 7725: TAD 7750 7726: CLL RAR 7727: DXAL 7730: TAD 7746 7731: DCA 7750 7732: TAD 7746 7733: TAD 7621 7734: DCA 7751 7735: TAD 7613 7736: DMAW 7737: DISK 7740: JMP 7737 7741: DFSE 7742: JMP 7760 7743: ISZ 7757 7744: JMP 7701 7745: JMP 7761 7746: MQA MQL SCA LSR 7747: AND 70 7750: AND 0 7751: AND 0 7752: AND 7770 7753: AND 0 7754: AND 0 7755: AND 0 7756: AND 0 7757: CLA MQA MQL SCA ASR 7760: ISZ 7642 7761: TAD 7753 7762: JMS 7766 7763: DCA I 7752 7764: DCMA 7765: JMP I 7642 7766: CLA MQL SCA NMI 7767: DCA 7751 7770: CDF 0 7771: TAD I 7621 7772: DCA 7750 7773: TAD 7751 7774: DCA I 7621 7775: CDF 0 7776: TAD 7750 7777: JMP I 7766