DataMuseum.dk

Presents historical artifacts from the history of:

Bogika Butler

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Bogika Butler

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦a2bd470e5⟧ TextFile

    Length: 6400 (0x1900)
    Types: TextFile
    Names: »KERNEL.BAK«

Derivation

└─⟦8592db80f⟧ Bits:30009789/_.ft.Ibm2.50007350.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »KERNEL.BAK« 

TextFile

PROGRAM EosKernel;

   CONST (* Comdef *)
      Trp7stak = 16#100;
                   (* stack space required by normal kernel operations
                      i.e. operations called from normal contexts only *)

   CONST (* Preface *)
      I_Config = -1;
                   (* address of the first ROM-OS-module to be
                      booted by the stub. -1 ignals that the
                      first module is in the boot owner set *)
      RAM_TOP = 16#C000;
                   (* upper available ram address
                      384K = 16#6 * 64K
                      512K = 16#8 * 64K
                      640K = 16#A * 64K
                      768K = 16#C * 64K *)
      Init_SSP = RAM_TOP;
                   (* use top RAM as initial stack pointer
      Mem_ListLength = 1;
                   (* Only one record in the Mem_List *)



   TYPE
      ExceptionVectorAreaIndexType = 0.255;
      ExceptionVectorAreaType = ARRAY (.ExceptionVectorAreaIndexType.) OF
         address;
      MemListRecordType = RECORD
         Start,              (* lower memory address *)
         End: address;       (* upper memory address *)
      Mem_ListType = ARRAY (.1..Mem_ListLength.) OF MemListRecordType;



   IMPORTED VAR (* Comdef *) (* Printer device control and data registers *)
      PrtContA: byte;
      PrtContB: byte;
      PrtStatu: byte;
      PrtBuf:   byte;

   IMPORTED VAR (* Preface *)
      KV_InVec: ExceptionVectorAreaType;
                   (* KV_InVec(.0.) is assumed to be initialized to
                      the initial value of the SSP (System stack pointer)
                      = Init_SSP prior to boot loading.
                      KV_InVec(.1.) is assumed to be initialized to
                      the initial value of the PC prior to boot
                      loading *)
      KV_FrMem: address;
                   (* Initially: points to Mem_List;
                      Later: Number of free bytes.
                      KV_FrMem is assumed to be initialized prior to
                      boot loading *)
      KV_BotLd: address;
                  (* Lower starting address of bootloaded OS-modules.
                     Initially states absolute minimum address
                     (First_OS) but is upward page aligned.
                     KV_BotLd is assumed to be initialized prior to
                     boot loading. *)
      KV_Stub: long;
                   (* KV_Stub is assumed to be initialized to
                      the value -1 indicating that the stub is
                      booted in RAM *)
      Mem_List: Mem_ListType;
                   (* Mem_List(.1.).Start is assumed to be initialized
                      to TOP_KNEL prior to boot loading.
                      Mem_List(.1.).End is assumed to be initialized
                      to RAM_TOP prior to boot loading *)


   VAR  (* Preface *) (* Variables used by test print procedures *)
      TstCount: word;
                   (* Counts down from 50 the number of output lines *)
      TstStatus: word;
                   (* State of test output *)



   (* Miscellaneous procedures *)
   (* Memory management procedures *)
   (* Scheduling procedures *)
   (* Kernel Operations procedures *)

   EXPORTED PROCEDURE SystemCall;

     BEGIN (* SystemCall *)
      (* Do this and that and call knelop *)
     END;  (* SystemCall *)

   PROCEDURE InitPreface;

      VAR
         d0: ExceptionVectorAreaIndexType;
                   (* working register D0 *)

     BEGIN (* InitPreface *)

      (*** Round up First_OS in KV_BotLd to align with next page *)

      KV_BotLd := ((KV_BotLd + 255) div 256) * 256;

      (*** Set up vector table etc. Does this match the initialization
           in knelop ??? *)
      (*** ??? *** Both tables initialized here are defined in Sc.sa.
           Why are they not initialized there ??? They do not appear to
           used in any way whatever by the intervening MMPROCS
           initialization section. Is the stack space computation
           algorithm involved? *)

      FOR d0 := 2 TO 255 DO
        BEGIN (* entry 0 and 1 initialized prior to boot loading *)
         Driv_Tab(.d0.) := 0;
                   (* channel := free *)
         KV_InVec(.d0.) := address(RteDummy);
(* *** ??? *** *)
                   (* interrupt address := dummy interrupt *)
         Stak_Tab(.d0.) := 0;
                   (* channel := free *)
        END;
      Driv_Tab(.32+9.) := -1;
                   (* channel 32+9 (trap #9) := reserved *)
      KV_InVec(.32+9.) := address(Test_Prt);
(* *** ??? *** *)
                   (* assign testprint procedure to trap #9 *)
      Stack_Tab(.32+9.) := -1;
                   (* channel 32+9 (trap #9) := reserved *)

      (**** Initialize test print *)

      TstCount := 0;
      TstStatus := 0;

      (**** Initialize printer *)

      PrtContA := 16#00;
                   (* select data direction register for a-part *)
      PrtBuf := 16#FF;
                   (* all lines used for output *)
      PrtContA := 16#3C;
                   (* assign control bits to output part *)
      PrtContB := 16#00;
                   (* select data direction register for b-part *)
      PrtStatu := 16#08;
                   (* all lines used for input but bit 3 ??? *)
      PrtContB := 16#3C;
                   (* assign control bits to input part *)

      NewLine;
      PrtChar('E');
      PrtChar('O');
      PrtChar('S');
      NewLine;

      (**** Prepare the stack space computation algorithm *)

      Stak_Tab(.0.) := Trp7Stak * 2**16 + 0; (* 0 is interrupt priority *)
      Driv_Tab(.0.) := Stak_Tab(.0.); (* := used := dummy value > 0 *)
      Stak_Tab(.1.) := -1;   (* reserved. Entry 1 cannot be used *)
      Driv_Tab(.1.) := -1;   (* channel(1) := reseved *)

(* *** ??? *** *)
(*
      Prt_Mem('End of preface', KV_InVec, KV_InVec - TstStatus);
*)

     END;  (* InitPreface *)

   PROCEDURE InitMMU;

      VAR

     BEGIN (* InitMMU *)

     END;  (* InitMMU *)

  BEGIN (* EosKernel *)
   InitPreface
   InitMMU
   InitSc
   InitKnelOp
   InitEnter
  END.  (* EosKernel *)«eof»