src/dps8/dps8_cpu.c
/*
 * initialize segment table according to the contents of DSBR ...
 */
initialize segment table according to the contents of DSBR
initialize segment table according to the contents of DSBR
static t_stat dpsCmd_InitUnpagedSegmentTable ()
  {
    if (cpu.DSBR.U == 0)
      {
        sim_printf  ("Cannot initialize unpaged segment table because DSBR.U says it is \"paged\"\n");
        return SCPE_OK;    
      }
    if (cpu.DSBR.ADDR == 0) 
      {
        if (! get_yn ("DSBR *probably* uninitialized (DSBR.ADDR == 0). Proceed anyway [N]?", FALSE))
          {
            return SCPE_OK;
          }
      }
    word15 segno = 0;
    while (2 * segno < (16 * (cpu.DSBR.BND + 1)))
      {
        word24 a = cpu.DSBR.ADDR + 2u * segno;
        core_write ((a + 0) & PAMASK, 0, __func__);
        core_write ((a + 1) & PAMASK, 0, __func__);
        segno ++; 
      }
    if ( !sim_quiet)
      sim_printf("zero-initialized segments 0 .. %d\n", segno - 1);
    return SCPE_OK;
  }
static t_stat dpsCmd_InitUnpagedSegmentTable ( ) { if ( cpu . DSBR . U == 0 ) { sim_printf ( " \" \" \n " ) ; return SCPE_OK ; } if ( cpu . DSBR . ADDR == 0 ) { if ( ! get_yn ( " " , FALSE ) ) { return SCPE_OK ; } } word15 segno = 0 ; while ( 2 * segno < ( 16 * ( cpu . DSBR . BND + 1 ) ) ) { word24 a = cpu . DSBR . ADDR + 2u * segno ; core_write ( ( a + 0 ) & PAMASK , 0 , __func__ ) ; core_write ( ( a + 1 ) & PAMASK , 0 , __func__ ) ; segno ++ ; } if ( ! sim_quiet ) sim_printf ( " \n " , segno - 1 ) ; return SCPE_OK ; }
initialize segment table according to the contents of DSBR ...
initialize segment table according to the contents of DSBR ...
// need a better return value // DSBR *probably* not initialized. Issue warning and ask.... //generate target segment SDW for DSBR.ADDR + 2 * segno. // just fill with 0's for now ..... // onto next segment SDW