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: 6082 (0x17c2) Types: TextFile Names: »INITIALIZE.S«
└─⟦17728abc9⟧ Bits:30005143 8" CR80 Floppy CR80FD_0130 ( CR/D/1422 FLERCPU Source ) └─⟦1815caf3d⟧ └─ ⟦this⟧ »INITIALIZE.S«
PROCEDURE INITIALIZE (R6); "************************************************************************* "************************************************************************* "THE PROCEDURE INITIALIZES MAPPING FOR ALL CPUs: " "************************************************ "cpu number d_ttr p_ttr dp63 I "************************************************ " " 0 #3E #3F #21 " 1 2 3 #22 " 2 4 5 #23 " 3 6 7 #24 " 4 8 9 #25 "************************************************ " "FP20 IS MAPPED IN AS DP61 FOR ALL CPUs. "FP#1F IS MAPPED IN AS PP63 FOR ALL CPUs. CONST P_TTR_N1 = #0003; D_TTR_N1 = #0002; P_TTR_N2 = #0005; D_TTR_N2 = #0004; P_TTR_N3 = #0007; D_TTR_N3 = #0006; P_TTR_N4 = #0009; D_TTR_N4 = #0008; ADR_PTTR_N1=#E100; ADR_PTTR_N2=#E200; ADR_PTTR_N3=#E300; ADR_PTTR_N4=#E400; ADR_DTTR_N1=#E101; ADR_DTTR_N2=#E201; ADR_DTTR_N3=#E301; ADR_DTTR_N4=#E401; FP20 =#0081; FP1F =#007D; VAR SAVE: ARRAY[0..7] OF INTEGER; FIRSTPPs: ARRAY[0..#3F] OF INTEGER; BEGIN R7=>SAVE[7]; STC(6,ADDRESS(SAVE[7])=>R7); "LOAD SEGMENT REGISTERS *************************** P_TTR_N1=>R3; ADR_PTTR_N1=>R5; CIO(R3,R5); P_TTR_N2=>R3; ADR_PTTR_N2=>R5; CIO(R3,R5); P_TTR_N3=>R3; ADR_PTTR_N3=>R5; CIO(R3,R5); P_TTR_N4=>R3; ADR_PTTR_N4=>R5; CIO(R3,R5); D_TTR_N1=>R3; ADR_DTTR_N1=>R5; CIO(R3,R5); D_TTR_N2=>R3; ADR_DTTR_N2=>R5; CIO(R3,R5); D_TTR_N3=>R3; ADR_DTTR_N3=>R5; CIO(R3,R5); D_TTR_N4=>R3; ADR_DTTR_N4=>R5; CIO(R3,R5); "MAP IN P#20 AS DP61 FOR ALL CPUs #0FBD=>R3; FP20=>R5; CIO(R5,R3); #00BD=>R3; CIO(R5,R3); #013D=>R3; CIO(R5,R3); #01BD=>R3; CIO(R5,R3); #023D=>R3; CIO(R5,R3); "MAP IN FP#1F AS PP63 FOR ALL CPUs FP1F=>R5; #0FFF=>R3; CIO(R5,R3); #00FF=>R3; CIO(R5,R3); #017F=>R3; CIO(R5,R3); #01FF=>R3; CIO(R5,R3); #027F=>R3; CIO(R5,R3); "INITIALIZE COMMON DP61 #F400=>R0; #0000=>R2; #0040=>R1; WHILE R1<>0 DO BEGIN R2=>R0@INTEGER; R0+1; R1-1; END; SVS(R0); R0=>R1 SHIFTRL #8; R1 EXTRACT 3; R1=>R0; #F400=>R2; R0+R2=>R2; #0010=>R0; R0=>R2@INTEGER; "STATUS OF THIS CPU:= MASTER (=#10) #F430=>R0; #0001=>R1=>R0@INTEGER; "SET CONSOLE SEMAPHORE LOCATION(DP62CMI)=>R0; "MAP IN FPAGE #1F AS DP60 FOR THIS CPU (CPU #0) FP1F=>R5; #0FBC=>R3; CIO(R5,R3); "GENERATE JUMP TO DP61CMI #F3FF=>R5; #0358=>R3=>R5@INTEGER; "PLACE JMP -3 IN ADR FFFF IN PP63 R0+1=>R3=>R0; R3 SHIFTRL 8; R3 SHIFTLL 8; R3+#56; #F3FD=>R5; R3=>R5@INTEGER; "PLACE MOD8 WITH 8 MSBs OF DP61CMI "IN ADR FFFD OF PP63 R0=>R3; R3 EXTRACT 8=>R3; R3 SHIFTLL 8; #F3FE=>R5; R3+#D8=>R5@INTEGER; "PLACE JUMP TO DP61CMI IN ADR FFFE "OF PP63. "MAP IN FIRST #40 PROGRAM PAGES FOR CPU#0 AS FIRST PROGRAM PAGES "FOR ALL OTHER CPUs 0=>R0; #0FC0=>R5; #40=>R1; WHILE R0<>R1 DO BEGIN SIO(R3,R5); R3=>FIRSTPPs[R0]; R5+1; R0+1; END; "FIRSTPPs NOW CONTAINS THE FIRST #10 PROGRAMPAGES OF CPU#0 "MAP IN THE FIRST #40 PROGRAMPAGES FOR CPU#1 #00C0=>R5; 0=>R6; #40=>R1; WHILE R6<>R1 DO BEGIN FIRSTPPs[R6]=>R3; CIO(R3,R5); R5+1; R6+1; END; "MAP IN THE FIRST #40 PROGRAMPAGES FOR CPU#2 #0140=>R5; 0=>R6; #40=>R1; WHILE R6<>R1 DO BEGIN FIRSTPPs[R6]=>R3; CIO(R3,R5); R5+1; R6+1; END; "MAP IN THE FIRST #40 PROGRAMPAGES FOR CPU#3 #01C0=>R5; 0=>R6; #40=>R1; WHILE R6<>R1 DO BEGIN FIRSTPPs[R6]=>R3; CIO(R3,R5); R5+1; R6+1; END; "MAP IN THE FIRST #40 PROGRAMPAGES FOR CPU#4 #0240=>R5; 0=>R6; #40=>R1; WHILE R6<>R1 DO BEGIN FIRSTPPs[R6]=>R3; CIO(R3,R5); R5+1; R6+1; END; "MAP IN FIRST #40 DATA PAGES FOR CPU#0 AS FIRST DATA PAGES "FOR ALL OTHER CPUs 0=>R0; #0F80=>R5; #40=>R1; WHILE R0<>R1 DO BEGIN SIO(R3,R5); R3=>FIRSTPPs[R0]; R5+1; R0+1; END; "FIRSTPPs NOW CONTAINS THE FIRST #10 DATAPAGES OF CPU#0 "MAP IN THE FIRST #40 DATAPAGES FOR CPU#1 #0080=>R5; 0=>R6; #40=>R1; WHILE R6<>R1 DO BEGIN FIRSTPPs[R6]=>R3; CIO(R3,R5); R5+1; R6+1; END; "MAP IN THE FIRST #40 DATAPAGES FOR CPU#2 #0100=>R5; 0=>R6; #40=>R1; WHILE R6<>R1 DO BEGIN FIRSTPPs[R6]=>R3; CIO(R3,R5); R5+1; R6+1; END; "MAP IN THE FIRST #40 DATAPAGES FOR CPU#3 #0180=>R5; 0=>R6; #40=>R1; WHILE R6<>R1 DO BEGIN FIRSTPPs[R6]=>R3; CIO(R3,R5); R5+1; R6+1; END; "MAP IN THE FIRST #40 DATAPAGES FOR CPU#4 #0200=>R5; 0=>R6; #40=>R1; WHILE R6<>R1 DO BEGIN FIRSTPPs[R6]=>R3; CIO(R3,R5); R5+1; R6+1; END; UNS(7,ADDRESS(SAVE[0])=>R7); EXIT(R6); END; «a5»