[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
const { 8086/8088 hardware flags }
  ff   =  12; { form feed       }   cr   =  13; { carriage return }
  dle  =  16; { data link esc.  }   xon  =  17; { xon             }
  xoff =  19; { xoff            }   sub  =  26; { end of file     }
  esc  =  27; { escape          }   del  = 127; { delete          }
  fk_cr          :       char =  '|'; { function key definition cr        }
  fk_delay       :       char =  '~'; { function key def. 1 second wait   }
  fk_wait_for    :       char =  '`'; { function key wait for next char   }
  fk_ctrl_mark   :       char =  ''; { marks next char as ctrl character }
  fk_script_ch   :       char =  '@'; { script to execute follows         }
  fk_delay_time  :    integer =   10; { delay to insert between each char }
  bs_string      :     string =   h; { string to send when back space hit}
  ctrl_bs_string :     string = #127; { string to send when ctrl bs hit   }

  half_second_delay       =  500;    one_second_delay        = 1000;
  two_second_delay        = 2000;    three_second_delay      = 3000;
  tenth_of_a_second_delay =  100;    on   = true; off  = false;

  data_bits     : 5..8 = 8;          parity        : char = 'N';
  stop_bits     : 0..2 = 1;          comm_port     : 1..4 = 1;
  baud_rate     : 110..38400 = 2400; cmd_line_port : 0..4 = 0;

  n_baud_rates = 11;
  baud_rates: array[ 1 .. n_baud_rates ] of word = (
    110, 150, 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600
  );

  modem_init          : string   = 'ATZ|~ATX1|';
  modem_dial          : string[30] = 'ATDT';
  modem_dial_end      : string[30] = '|';
  modem_busy          : string[30] = 'BUSY';
  modem_connect       : string[30] = 'CONNECT';
  modem_no_carrier    : string[30] = 'NO CARRIER';
  modem_escape        : string[30] = '+++';
  modem_escape_time   : integer  = 1500;
  modem_hang_up       : string[30] = 'ATH0|';
  modem_time_out      : longint  = 60;
  modem_redial_delay  : longint  = 45;
  modem_answer        : string[30] = 'ATA|';
  modem_host_set      : string   = 'ATZ|~ATX1|~ATS0=1|';
  modem_host_unset    : string   = 'ATZ|~ATX1|~ATS0=0|';
  modem_command_delay : integer  = 10;
  modem_carrier_high  : boolean  = false;
  modem_ring          : string[30] = 'RING';
  host_auto_baud      : boolean  = true;
  modem_hold_line     : boolean  = false;

  {               communications hardware addresses                   }
  {     these are specific to IBM PCs and Close compatibles.          }
  uart_thr = $00;       { offset from base of uart registers for ibm pc }
  uart_rbr = $00; uart_ier = $01; uart_iir = $02; uart_lcr = $03;
  uart_mcr = $04; uart_lsr = $05; uart_msr = $06;

  i8088_imr = $21;      { port address of the interrupt mask register }

  com1_base = $03f8;    { port addresses for the uart }
  com2_base = $02f8; com3_base = $03e8; com4_base = $02e8;
  com1_irq = 4;         { interrupt line for the uart }
  com2_irq = 3; com3_irq = 4; com4_irq = 3;
  com1_int = $0c;       { interrupt number for the uart }
  com2_int = $0b; com3_int = $0c; com4_int = $0b;

  rs232_base = $0400    { address of rs 232 com port pointer };
  maxcomports = 4       { four ports allowed by this code    };
                                  { port addresses of each com port }
  default_com_base : array[1..maxcomports] of word =
    ( com1_base, com2_base, com3_base, com4_base );
                                  { irq line for each port }
  default_com_irq  : array[1..maxcomports] of integer =
    ( com1_irq, com2_irq, com3_irq, com4_irq );
                                  { interrupt for each port }
  default_com_int  : array[1..maxcomports] of integer =
    ( com1_int, com2_int, com3_int, com4_int );

  {--------------------------------------------------------------------------}
  {                                                                          }
  {                    communications buffer variables                       }
  {                                                                          }
  {      the communications buffers are implemented as circular (ring)       }
  {      buffers, or double-ended queues.  the asynchronous i/o routines     }
  {      enter characters in the receive buffer as they arrive at the        }
  {      serial port.  higher-level routines may extract characters from     }
  {      the receive buffer at leisure.  higher-level routines insert        }
  {      characters into the send buffer.  the asynchronous i/o routines     }
  {      then send characters out the serial port when possible.             }
  {                                                                          }
  {--------------------------------------------------------------------------}

  timeout             = 256;          { timeout value                        }
  async_xon           =  Q;          { xon character                        }
  async_xoff          =  S;          { xoff character                       }
  async_overrun_error =   2;          {   overrun                            }
  async_parity_error  =   4;          {   parity error                       }
  async_framing_error =   8;          {   framing error                      }
  async_break_found   =  16;          {   break interrupt                    }
  async_cts           = $10;          {   clear to send                      }
  async_rts           = $20;          {   request to send                    }
  async_dsr           = $20;          {   data set ready                     }
  async_dtr           = $10;          {   data terminal ready                }
  async_rtsdtr        = $30;          {   rts + dtr                          }


type                                  { i/o buffer type for serial port      }
  async_buffer_type = array[0..1] of char;
  async_ptr         = nc_buffer_type;

var                                   { port addresses for serial ports      }
  com_base               : array[1..maxcomports] of word;
                                      { irq line for each serial port        }
  com_irq                : array[1..maxcomports] of integer;
                                      { interrupt for each serial port       }
  com_int                : array[1..maxcomports] of integer;
  async_buffer_ptr       : async_ptr; { input buffer address                 }
  async_obuffer_ptr      : async_ptr; { output buffer address                }
  async_open_flag        :   boolean; { true if port opened                  }
  async_port             :   integer; { current open port number (1 -- 4)    }
  async_base             :   integer; { base for current open port           }
  async_irq              :   integer; { irq for current open port            }
  async_int              :   integer; { interrupt # for current port         }
  async_rs232            :   integer; { rs232 address for current port       }
  async_buffer_overflow  :   boolean; { true if buffer overflow's happened   }
  async_buffer_used      :   integer; { amount of input buffer used so far   }
  async_maxbufferused    :   integer; { maximum amount of input buffer used  }
                                      { async_buffer empty if head = tail    }
  async_buffer_head      :   integer; { loc in async_buf to put next char    }
  async_buffer_tail      :   integer; { loc in async_buf to get next char    }
  async_buffer_newtail   :   integer; { for updating tail value              }
  async_obuffer_overflow :   boolean; { true if buffer overflow's happened   }
  async_obuffer_used     :   integer; { amount of output buffer used         }
  async_maxobufferused   :   integer; { max amount of output buffer used     }
                                      { async_buffer empty if head = tail    }
  async_obuffer_head     :   integer; { loc in async_buf to put next char    }
  async_obuffer_tail     :   integer; { loc in async_buf to get next char    }
  async_obuffer_newtail  :   integer; { for updating tail value              }
  async_buffer_low       :   integer; { low point in receive buffer for xon  }
  async_buffer_high      :   integer; { high point in rec'buffer for xoff    }
  async_buffer_high_2    :   integer; { emergency point for xoff             }
  async_xoff_sent        :   boolean; { if xoff sent                         }
  async_sender_on        :   boolean; { if sender is enabled                 }
  async_send_xoff        :   boolean; { true to send xoff asap               }
  async_xoff_received    :   boolean; { if xoff received                     }
  async_xoff_rec_display :   boolean; { if xoff received and displayed       }
  async_xon_rec_display  :   boolean; { if xon received                      }
  async_baud_rate        :      word; { current baud rate                    }
                                      { save prev serial interrupt status    }
  async_save_iaddr       :   pointer;
  async_do_cts           :   boolean; { true to do clear-to-send checking    }
  async_do_dsr           :   boolean; { true to do data-set-ready checking   }
  async_do_xonxoff       :   boolean; { true to do xon/xoff flow checking    }
  async_ov_xonxoff       :   boolean; { true to do xon/xoff if buf overflow  }
  async_hard_wired_on    :   boolean; { true if hard-wired connection        }
  async_break_length     :   integer; { length of break in 1/10 seconds      }
  async_line_status      :      byte; { line status reg at interrupt         }
  async_modem_status     :      byte; { modem status reg at interrupt        }
  async_line_error_flags :      byte; { line status bits accumulated         }
  async_buffer_size      :   integer; { stores input buffer size             }
  async_obuffer_size     :   integer; { stores output buffer size            }
  async_uart_ier         :   integer; { interrupt enable register address    }
  async_uart_mcr         :   integer; { interrupt enable register address    }
  async_uart_iir         :   integer; { interrupt id register address        }
  async_uart_msr         :   integer; { modem status register address        }
  async_uart_lsr         :   integer; { line status register address         }
  async_output_delay     :   integer; { delay in ms when output buffer full  }
  async_onemsdelay       :   integer; { loop count value to effect 1 ms delay}
  async_buffer_length    :   integer; { receive buffer length                }
  async_obuffer_length   :   integer; { send buffer length                   }
                                      { pointer to async_send routine        }
  async_send_addr        : async_ptr;
  break_length           :   integer;
  current_carrier_status,
  new_carrier_status,
  attended_mode,
  hard_wired,
  reset_comm_port,
  comm_port_changed,
  check_cts,check_dsr,
  do_xon_xoff_checks     :   boolean;



  {----------------------------------------------------------------------}
  {                       multitasker definitions                        }
  {----------------------------------------------------------------------}

type
  multitaskertype = (
    multitasker_none, doubledos, desqview, topview,
    mswindows, apxcore, ezdosit, concurrent_dos,
    taskview, multilink, other
  );


var
  timesharingactive: boolean;    { true if multitasker active        }
                                 { which multitasker active          }
  multitasker: multitaskertype;


  {----------------------------------------------------------------------}
  {              dos jump stuff                                          }
  {----------------------------------------------------------------------}
{var}const
  heaptop           : pointer = nil   { top of heap at program start       };
  stacksafetymargin : word    = 1000  { safety margin for stack            };
  minspacefordos    : word    = 20000 { minimum bytes for dos shell to run };

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson