DataMuseum.dkPresents historical artifacts from the history of: CR80 Hard and Floppy Disks |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CR80 Hard and Floppy Disks Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 15492 (0x3c84) Types: TextFile Names: »CTERM.PROC.S«
└─⟦c174207bd⟧ Bits:30005194 8" CR80 Floppy CR80FD_0192 ( VOL: FLOPPY ) └─⟦194c604ac⟧ └─ ⟦this⟧ »CTERM.0001.D!CTERM.PROC.S«
"PAGE «ff» "FORWARD PROCEDURE DECLARATIONS "------------------------------ FORWARD PROCEDURE CTERM_LOCAL_FIX_UP_ERROR(ERROR_LOCATION:INTEGER;R4); FORWARD PROCEDURE CTERM_ERROR(ERROR_LOCATION:INTEGER;R7;R4); FORWARD PROCEDURE CREATE_MTCB(R0;R1;R6); FORWARD PROCEDURE RESERVE_MTCB(R0;R6); FORWARD PROCEDURE RELEASE_MTCB(R0;R6); FORWARD PROCEDURE MODIFY_MTCB(R0;R1;R2;R6); FORWARD PROCEDURE READ_MTCB(R0;R1;R7;R6); FORWARD PROCEDURE CREATE_MTCB_FILE(R0;R1;R4;R6); FORWARD PROCEDURE OPEN_MTCB_FILE(R0;R1;R2;R4;R6); FORWARD PROCEDURE CLOSE_MTCB_FILE(R0;R4;R6); FORWARD PROCEDURE MESS_JOURNAL_ENTRY(R0;R6); FORWARD PROCEDURE REPORT_CCIS_STATUS(R0;R6); FORWARD PROCEDURE READ_MESSAGE(R6); FORWARD PROCEDURE WRITE_MESSAGE(R2;R6); FORWARD PROCEDURE CREATE_MESSAGE(R6); FORWARD PROCEDURE CHECKPOINT_CTERM(R7;R6); FORWARD PROCEDURE UPDATE_CCIS_STATUS(R0;R6); FORWARD PROCEDURE GET_STATUS_CCIS(R6); FORWARD PROCEDURE CLEAN_OUTSTANDING_OPEN_REQUEST(R6); "PAGE «ff» "NOTE: PROCEDURE_LABELS OUTGTH TO BE PLACED IN FRONT OF PROGRAM TO CONTROL LOCATIONS " ============================================================================= PROCEDURE PROCEDURE_LABELS(R4); LABEL CTERM_LOCAL_FIX_UP_ERROR_ENTRY, CTERM_ERROR_ENTRY, CLEAN_OUTSTANDING_OPEN_REQUEST_ENTRY; BEGIN CTERM_LOCAL_FIX_UP_ERROR_ENTRY: LOCATION(CTERM_LOCAL_FIX_UP_ERROR); "LOCATION #20 CTERM_ERROR_ENTRY: LOCATION(CTERM_ERROR); "LOCATION #21 CLEAN_OUTSTANDING_OPEN_REQUEST_ENTRY: LOCATION(CLEAN_OUTSTANDING_OPEN_REQUEST); "LOCATION #22 END; CONST LOCATION_CTERM_LOCAL_FIX_UP_ERROR_LABEL = #20; RETURN_REGISTER_CTERM_LOCAL_FIX_UP_ERROR = 4; CTERM_LOCAL_FIX_UP_ERROR_CALL = (LOCATION_CTERM_LOCAL_FIX_UP_ERROR_LABEL SHIFTLL 8) "JMPI S4 CTERM_LOCAL_FIX_UP_ERROR_ENTRY" + #FC + RETURN_REGISTER_CTERM_LOCAL_FIX_UP_ERROR - 3; LOCATION_CTERM_ERROR_LABEL = #21; RETURN_REGISTER_CTERM_ERROR = 4; CTERM_ERROR_CALL = (LOCATION_CTERM_ERROR_LABEL SHIFTLL 8) "JMPI S4 CTERM_ERROR_ENTRY" + #FC + RETURN_REGISTER_CTERM_ERROR - 3; LOCATION_CLEAN_OUTSTANDING_OPEN_REQUEST_LABEL = #22; RETURN_REGISTER_CLEAN_OUTSTANDING_OPEN_REQUEST = 6; CLEAN_OUTSTANDING_OPEN_REQUEST_CALL = (LOCATION_CLEAN_OUTSTANDING_OPEN_REQUEST_LABEL SHIFTLL 8) "JMPI S6 CLEAN_OUTSTANDING_OPEN_REQUEST_ENTRY" + #FC + RETURN_REGISTER_CLEAN_OUTSTANDING_OPEN_REQUEST - 3; "PAGE «ff» PROCEDURE CTERM_LOCAL_FIX_UP_ERROR(ERROR_LOCATION:INTEGER;R4); " ENTRY EXIT " R4 LINK LINK BEGIN "OF CTERM_LOCAL_FIX_UP_ERROR #2222 => R7; "LOCAL_FIX_UP ERROR CODE "THE PROCEDURE CONTINUES IN CTERM_ERROR END; "OF CTERM_LOCAL_FIX_UP_ERROR PROCEDURE CTERM_ERROR(ERROR_LOCATION:INTEGER;R7;R4); " ENTRY EXIT " R4 LINK LINK " R7 ERROR_CODE KEPT BEGIN "OF CTERM_ERROR R7 => DUMPREGS_0[7]; "ERROR CODE STC(6,ADDRESS(DUMPREGS_0[7])=>R7); DUMPREGS_0[7] => R0; R4@CTERM_ERROR.ERROR_LOCATION => R1; MON(ERROR,R0,R1,R7); UNS(7,ADDRESS(DUMPREGS_0[0])=>R7); EXIT(R4,1); END; "OF CTERM_ERROR "PAGE «ff» PROCEDURE CREATE_MTCB(R0;R1;R6); LABEL TRY_AGAIN; " ENTRY EXIT " R0 - MTCB_INDEX " R1 TYPE DESTROYED " R2 - DESTROYED (AT LOCAL FIX UP) " R3 - KEPT " R4 - DESTROYED (AT LOCAL FIX UP) " R5 - KEPT " R6 LINK LINK " R7 - DESTROYED BEGIN "OF CREATE_MTCB TRY_AGAIN: NO_WAIT_NORMAL_MTCB => R0; "TYPE => R1; SWITCH MON(MTCB,CREATEMTCB,R0,R1,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; CREATEMTCB; "LOCAL_FIX_UP: WAIT 30 SECONDS AND TRY AGAIN MON(WAITEVENT,30*10=>R0,BMDELAY=>R2,R7); GOTO TRY_AGAIN; END; END; EXIT(R6); END; "OF CREATE_MTCB "PAGE «ff» PROCEDURE RESERVE_MTCB(R0;R6); " ENTRY EXIT " R0 - MTCB_INDEX " R1 - KEPT " R2 - KEPT " R3 - KEPT " R4 - KEPT " R5 - KEPT " R6 LINK LINK " R7 - DESTROYED BEGIN "OF RESERVE_MTCB SWITCH MON(MTCB,RESERVEMTCB,R0,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; RESERVEMTCB_ERROR; END; END; EXIT(R6); END; "OF RESERVE_MTCB "PAGE «ff» PROCEDURE RELEASE_MTCB(R0;R6); " ENTRY EXIT " R0 - MTCB_INDEX " R1 - KEPT " R2 - KEPT " R3 - KEPT " R4 - KEPT " R5 - KEPT " R6 LINK LINK " R7 - DESTROYED BEGIN "OF RELEASE_MTCB SWITCH MON(MTCB,RELEASEMTCB,R0,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; RELEASEMTCB_ERROR; END; END; EXIT(R6); END; "OF RELEASE_MTCB "PAGE «ff» PROCEDURE MODIFY_MTCB(R0;R1;R2;R6); " ENTRY EXIT " R0 REF(MTCB_INDEX) REF(MTCB_INDEX) " R1 - REF(MTCB_BUFFER) " R2 UPDATE_CODE KEPT " R3 - KEPT " R4 - KEPT " R5 - KEPT " R6 LINK LINK " R7 - DESTROYED BEGIN "OF MODIFY_MTCB ADDRESS(MTCB_BUFFER) => R1; "REF MTCB SWITCH MON(MTCB,WRITEMTCB,R0,R1,R2,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; WRITEMTCB_ERROR; END; END; EXIT(R6); END; "OF MODIFY_MTCB "PAGE «ff» PROCEDURE READ_MTCB(R0;R1;R7;R6); " ENTRY EXIT " R0 REF(MTCB_INDEX) REF(MTCB_INDEX) " R1 - REF(MTCB_BUFFER) " R2 - KEPT " R3 - KEPT " R4 - KEPT " R5 - KEPT " R6 LINK LINK " R7 - REF(MTCB_BUFFER) BEGIN "OF READ_MTCB ADDRESS(MTCB_BUFFER) => R1; "REF MTCB SWITCH MON(MTCB,READMTCB,R0,R1,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; READMTCB_ERROR; END; END; R1 => R7; "REF MTCB EXIT(R6); END; "OF READ_MTCB "PAGE «ff» PROCEDURE CREATE_MTCB_FILE(R0;R1;R4;R6); LABEL TRY_AGAIN; " ENTRY EXIT " R0 REF(MTCB_INDEX) REF(MTCB_INDEX) " R1 REF(FILE_ADDR) REF(FILE_ADDR) " R2 FILE_TYPE FILE_TYPE (= PDB) " R3 - KEPT " R4 - FILE_ID " R5 - KEPT " R6 LINK LINK " R7 - DESTROYED BEGIN "OF CREATE_MTCB_FILE TRY_AGAIN: PDB_FILE => R2; NO_WAIT_NORMAL_MTCB => R4; SWITCH MON(MTCB,CREATEMTCBFILE,R0,R1,R2,R4,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; CREATEMTCBFILE; "LOCAL_FIX_UP: WAIT 30 SECONDS AND TRY AGAIN R0=>R2;R1=>R4; "STORE R0,R1 MON(WAITEVENT,30*10=>R0,BMDELAY=>R2,R7); R2=>R0;R4=>R1; "REESTABLISH R0,R1 GOTO TRY_AGAIN; END; END; EXIT(R6); END; "OF CREATE_MTCB_FILE "PAGE «ff» PROCEDURE OPEN_MTCB_FILE(R0;R1;R2;R4;R6); " ENTRY EXIT " R0 REF(MTCB_INDEX) REF(MTCB_INDEX) " R1 REF(FILE_ADDRESS) REF(FILE_ADDRESS) " R2 - FILE TYPE (NOT USED) " R3 - KEPT " R4 - FILEID " R5 - KEPT " R6 LINK LINK " R7 - DESTROYED BEGIN "OF OPEN_MTCB_FILE SWITCH MON(MTCB,GETMTCBFILE,R0,R1,R2,R4,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; GETMTCBFILE_ERROR; END; END; R4 => FILEID; IF R2 <> PDB_FILE THEN TRP(7); "MUST BE A PDB-FILE ! EXIT(R6); END; "OF OPEN_MTCB_FILE "PAGE «ff» PROCEDURE CLOSE_MTCB_FILE(R0;R4;R6); " ENTRY EXIT " R0 REF(MTCB_INDEX) KEPT (MTCB UPDATED) " R1 - KEPT " R2 - KEPT " R3 - KEPT " R4 - ? " R5 - KEPT " R6 LINK LINK " R7 - DESTROYED BEGIN "OF CLOSE_MTCB_FILE FILEID => R4; SWITCH MON(MTCB,RELEASEMTCBFILE,R0,R4,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; RELEASEMTCBFILE_ERROR; END; END; EXIT(R6); END; "OF CLOSE_MTCB_FILE "PAGE «ff» PROCEDURE MESS_JOURNAL_ENTRY(R0;R6); " ENTRY EXIT " R0 JOURNAL TYPE DESTROYED " R1 - KEPT " R2 - KEPT " R3 - KEPT " R4 - DESTROYED " R5 - KEPT " R6 LINK LINK " R7 - DESTROYED BEGIN "OF MESS_JOURNAL_ENTRY ADDRESS(WORK_AREA) => R4; R0 => R4@INTEGERS[0]; "JOURNAL TYPE TERM_NO_CCIS => R0 => R4@INTEGERS[1]; "TERMINAL NUMBER ADDRESS(MSG_ID) => R0 => R4@INTEGERS[2]; "REF(MSSAGE_ID) %WHEN CCIS_VERSION = TRUE SKIP "NO LOG_JOURNAL AT CCIS_VERSION SWITCH MON(LOG_JOURNAL,R4,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; LOG_JOURNAL_ERROR; END; END; %COMPILE EXIT(R6); END; "OF MESS_JOURNAL_ENTRY "PAGE «ff» PROCEDURE REPORT_CCIS_STATUS(R0;R6); " ENTRY EXIT " R0 REPORT TYPE DESTROYED " R1 - KEPT " R2 - KEPT " R3 - KEPT " R4 - DESTROYED " R5 - KEPT " R6 LINK LINK " R7 - DESTROYED BEGIN "OF REPORT_CCIS_STATUS ADDRESS(WORK_AREA) => R4; R0 + (FODCCIS_ALARM SHIFTLL 4); R0 => R4@INTEGERS[REF_TYPE]; %WHEN CCIS_VERSION = TRUE SKIP "NO REPORTING AT CCIS_VERSION SWITCH MON(SENDREPORT,R4,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; SENDREPORT_ERROR; END; END; %COMPILE EXIT(R6); END; "OF REPORT_CCIS_STATUS "PAGE «ff» PROCEDURE READ_MESSAGE(R6); " ENTRY EXIT " R0 - KEPT " R1 - DESTROYED " R2 - DESTROYED " R3 - KEPT " R4 - FILEID " R5 - KEPT " R6 LINK LINK " R7 - ADDRESS(FILEADDR) BEGIN "OF READ_MESSAGE ADDRESS(FILEADDR) => R1; ADDRESS(BLE_BUFFER) => R2; FILEID => R4; SWITCH MON(IO,READBYTES,R1,R2,R4,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; READ_MESSAGE_ERROR; END; END; R1 => R7; "UPDATE FIRST BYTE R7@FILE_ADDRESS.TRANSFERRED_BYTES => R12; R7@FILE_ADDRESS.FIRST_BYTE + R12; R7@FILE_ADDRESS.BYTE_COUNT - R12; EXIT(R6); END; "OF READ_MESSAGE "PAGE «ff» PROCEDURE WRITE_MESSAGE(R2;R6); " ENTRY EXIT " R0 - KEPT " R1 - DESTROYED " R2 REF(BUFFER-BLE) DESTROYED " R3 - KEPT " R4 - FILEID " R5 - KEPT " R6 LINK LINK " R7 - ADDRESS(FILEADDR) BEGIN "OF WRITE_MESSAGE ADDRESS(FILEADDR) => R1; FILEID => R4; SWITCH MON(IO,MODIFYBYTES,R1,R2,R4,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; WRITE_MESSAGE_ERROR; END; END; R1 => R7; "UPDATE FIRST BYTE R7@FILE_ADDRESS.TRANSFERRED_BYTES => R12; R7@FILE_ADDRESS.FIRST_BYTE + R12; R7@FILE_ADDRESS.BYTE_COUNT - R12; EXIT(R6); END; "OF WRITE_MESSAGE "PAGE «ff» PROCEDURE CREATE_MESSAGE(R6); BEGIN "OF CREATE_MESSAGE STC(6,ADDRESS(DUMPREGS_1[7])=>R7); TYPE_PSEUDO_MTCB => R1; "CREATE NEW MTCB CREATE_MTCB(R0,R1,R6); R0 => MTCBID; ADDRESS(MTCBID) => R0; "CREATE NEW MTCB-FILE (PDB) ADDRESS(FILEADDR) => R1; CREATE_MTCB_FILE(R0,R1,R4,R6); R4 => FILEID; R0@INTEGER => R0; RESERVE_MTCB(R0,R6); UNS(6,ADDRESS(DUMPREGS_1[0])=>R7); EXIT(R6); "NOTE: MTCB-USE/FILE-COUNT := 2/1 END; "OF CREATE_MESSAGE "PAGE «ff» PROCEDURE CHECKPOINT_CTERM(R7;R6); " ENTRY EXIT " R0 - DESTROYED " R1 - DESTROYED " R2 - DESTROYED " R3 - KEPT " R4 - KEPT " R5 - KEPT " R6 LINK LINK " R7 REF(CHECKP_MESSAGE) DESTROYED BEGIN "OF CHECKPOINT_CTERM %WHEN CCIS_VERSION = TRUE SKIP "NO CHECKPOINTING AT CCIS_VERSION ADDRESS(CHECKP_NAME) => R0; R7 => R1; MON(SENDMESSAGE,R0,R1,R2,R7); - 1 => R0; "WAIT ON ANSWER (ENDLESS) MON(WAITANSWER,R0,R1,R2,R7); R1 + ADDRESS(0@CHECKPOINT_MESSAGE.W4); IF R1@INTEGER <> 0 LOGOR R0 = BNDELAY THEN BEGIN -1 => R7; CTERM_ERROR_CALL; CHECKPOINT_ERROR; END; %COMPILE EXIT(R6); END; "OF CHECKPOINT_CTERM "PAGE «ff» PROCEDURE UPDATE_CCIS_STATUS(R0;R6); "ENTRY R0 : NEW CCIS_STATUS BEGIN "OF UPDATE_CCIS_STATUS STC(6,ADDRESS(DUMPREGS_1[7])=>R7); R0 => STATUS_CCIS; %WHEN CCIS_VERSION = TRUE SKIP "NO STATUS UPDATE AT CCIS_VERSION "CHECKPOINT NEW STATUS "--------------------- ADDRESS(CHECKP_MESS_BUF0) => R7; R0 => R7@CHECKPOINT_MESSAGE.W3; CHECKPOINT_CTERM(R7,R6); "UPDATE NEW STATUS IN CONFIG "--------------------------- ADDRESS(CONFIG_NAME) => R0; SWITCH MON(REGION,RENTER,R0,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; ENTER_CONFIG_ERROR; END; END; ADDRESS(0@CONFIG_TYPE.CONSTANT_BLOCK.CCIS_STATUS) => R1; STATUS_CCIS => R2; SWITCH MON(REGION,RPUT,R0,R1,R2,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; UPDATE_CONFIG_ERROR; END; END; SWITCH MON(REGION,RLEAVE,R0,R7): ERROR_DONE TO ERR: BEGIN CTERM_ERROR_CALL; LEAVE_CONFIG_ERROR; END; END; %COMPILE UNS(6,ADDRESS(DUMPREGS_1[0])=>R7); EXIT(R6); END; "OF UPDATE_CCIS_STATUS "PAGE «ff» PROCEDURE CLEAN_OUTSTANDING_OPEN_REQUEST(R6); BEGIN "OF CLEAN_OUTSTANDING_OPEN_REQUEST ADDRESS(STATUS) => R7; RELS(R7@INTEGER,OUTSTANDING_OPEN_REQUEST); MON(SETCYCLE,0=>R0,R7); EXIT(R6); END; "OF CLEAN_OUTSTANDING_OPEN_REQUEST "PAGE «ff» PROCEDURE GET_STATUS_CCIS(R6); "ALL REGS KEPT BEGIN "OF GET_STATUS_CCIS STC(6,ADDRESS(DUMPREGS_1[7])=>R7); %WHEN CCIS_VERSION = TRUE SKIP ADDRESS(CONFIG_NAME) => R0; ADDRESS(0@CONFIG_TYPE.CONSTANT_BLOCK.CCIS_STATUS) => R1; ADDRESS(STATUS_CCIS) => R2; 1 => R3; SWITCH MON(REGION,RCOPYN,R0,R1,R2,R3,R7): ERROR_DONE TO ERR: "CTERM_ERROR(GET_STATUS_CCIS_ERROR,R7,R4); BEGIN CTERM_ERROR_CALL; GET_STATUS_CCIS_ERROR; END; END; %COMPILE %WHEN CCIS_VERSION = FALSE SKIP ADDRESS(STATUS_CCIS) => R7; CCIS_LINK_OPEN => R7@INTEGER; "AT CCIS_VERSION: SET LINK OPEN %COMPILE UNS(6,ADDRESS(DUMPREGS_1[0])=>R7); EXIT(R6); END; "OF GET_STATUS_CCIS «a5»