home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-07-06 | 72.0 KB | 1,970 lines |
- !short Unit ECO_232; Direct CathodeRayTube COM control
- unit ECO_232;
- interface
- uses crt;
- procedure assignaux(var f: text; port,params: word);
-
- !short Unit ECO_adpt; Adapter recognition
-
- type
- adaptertype = (
- none,mda,hercules,cga,egamono,egacolor,mcgamono,mcgacolor,
- vgamono,vgacolor
- );
-
-
- var
- checksnow : boolean; {for snow on cga}
- currenttextmode : word; {current video text mode}
-
- videopage : byte; {video page number}
- videocard : adaptertype; {video kaart}
- maxrows : byte; {current max number of colums and lines}
- maxcols : byte;
- videoofs : word; {offset video memory}
- videoseg : word; {start video memory}
- videoptr : pointer absolute videoofs;
- startupmode : word; {videomode at startup time}
- startupcursorsize : word; {cursor size at startup time}
-
- procedure initdetect; {will fill all vars with rigth values}
-
- function basescreen : word;
-
- function systemid : byte; {returns system id}
-
- function getvideopage : byte;
- procedure setvideopage(page : byte);
-
- function getvideomode : word;
- procedure settextmode(mode : integer);
-
- function colormonitor : boolean;
-
- (* cursor manipulation *)
- function getcursorshape : word;
- procedure setcursorshape(scanlines : word);
-
- (* desqview support *)
- const in_dv : boolean = false;
-
- function dv_get_version : word;
- function dv_get_video_buffer(videoseg : word) : word;
- procedure dv_pause;
- procedure dv_begin_critical;
- procedure dv_end_critical;
-
-
- !short Unit ECO_asyn; Direct Asynchronous card control
- unit ECO_asyn;
- interface
- uses dos, crt;
-
- 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 = ^async_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 has 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_buffer to put next char *);
- async_buffer_tail : integer (* loc in async_buffer to get next char *);
- async_buffer_newtail : integer (* for updating tail value *);
- async_obuffer_overflow : boolean (* true if buffer overflow has 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_buffer to put next char *);
- async_obuffer_tail : integer (* loc in async_buffer 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 receive 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 previous 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 buffer overfl *);
- 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 *);
-
-
- procedure bios_rs232_init( comport : integer; comparm : word );
- procedure async_close( drop_dtr: boolean );
- procedure async_clear_errors;
- procedure async_reset_port(
- comport : integer;
- baudrate : word;
- parity : char;
- wordsize : integer;
- stopbits : integer
- );
- function async_open(
- comport : integer;
- baudrate : word;
- parity : char;
- wordsize : integer;
- stopbits : integer
- ) : boolean;
- procedure async_send( c : char );
- function async_receive( var c : char ) : boolean;
- procedure async_receive_with_timeout( secs : integer; var c : integer );
- procedure async_stuff( ch: char );
- procedure async_find_delay( var one_ms_delay : integer );
- procedure async_init(
- async_buffer_max : integer;
- async_obuffer_max : integer;
- async_high_lev1 : integer;
- async_high_lev2 : integer;
- async_low_lev : integer
- );
- function async_carrier_detect : boolean;
- function async_carrier_drop : boolean;
- procedure async_term_ready( ready_status : boolean );
- function async_buffer_check : boolean;
- function async_line_error( var error_flags: byte ) : boolean;
- function async_ring_detect : boolean;
- procedure async_send_break;
- procedure async_send_string( s : string );
- procedure async_send_string_with_delays(
- s : string;
- char_delay : integer;
- eos_delay : integer
- );
- function async_percentage_used : real;
- procedure async_purge_buffer;
- function async_peek( nchars : integer ) : char;
- procedure async_setup_port(
- comport : integer;
- base_address : integer;
- irq_line : integer;
- int_numb : integer
- );
- procedure async_release_buffers;
- procedure async_flush_output_buffer;
- procedure async_drain_output_buffer( max_wait_time : integer );
- function async_port_address_given( com_port : integer ) : boolean;
- procedure async_send_now( c : char );
- function async_wait_for_quiet(
- max_wait : longint;
- wait_time: longint
- ) : boolean;
-
-
- procedure send_modem_command(modem_text: string);
- function set_params(first_time: boolean): boolean;
- procedure initialize_modem;
-
- !short Unit ECO_atv; Archive television ARC/ARJ/LZH/PAK/ZIP/ZOO
- unit ECO_atv;
- interface
- uses
- dos, crt, unit_pgm,
- unit_scn, unit_str,
- unit_fil,
- ECO_cfi, ECO_vid,
- ECO_str, ECO_ext,
- ECO_fil,
- execswap
-
- ;
-
-
- type
- cfgtype = record
- applic_f, applic_b,
- applic_h,
- x1, y1, x2, y2 : byte;
- end;
-
- optiontype = (o_unpak, o_delete, o_nothing);
-
- arcpanelobj = object
- ful, quit,
- showmem,
- showreads,
- complete_error : boolean;
- treewidth,
- status,
- error : word;
- cfg : cfgtype;
- mfree : longint;
- nulstr,
- olddir : pathstr;
- wst : string;
- {=Internal===============================================================}
- function pak_tv(arc: pathstr; var opt: optiontype): boolean;
- {=External===============================================================}
- function atv(arcname: pathstr): boolean;
- end; { arcpanelobj }
-
-
- !short Unit ECO_bcnv; Base conversion calculation functions
- unit ECO_bcnv;
- interface
- type
- basestr = string[32];
-
- var
- baseerror: byte;
-
- function base(x:longint;b:byte):basestr; {convert x to base b}
- function basef(x:longint;b,f:byte):basestr; {convert x to base b length f}
- function hex(x:longint):basestr; {convert x to base 16}
- function hexf(x:longint;f:byte):basestr; {convert x to base 16 length f}
- function dez(x:basestr;s:byte):longint; {convert x from base s to decimal}
- function dezh(x:basestr):longint; {convert hexadecimal x to decimal}
-
- !short Unit ECO_cal; Popup calendar
- unit ECO_cal;
- interface
-
- procedure calendaraction;
-
-
- !short Unit ECO_calc; Extensive scientific calculator functions
- unit ECO_calc;
- interface
-
- type
- degreetype = record
- degrees, minutes, sECOnds : real;
- end;
-
- const
- infinity = 9.9999999999e+37;
-
- { radians }
- { sin, cos, and arctan are predefined }
-
- function tan( radians : real ) : real;
- function arcsin( invalue : real ) : real;
- function arccos( invalue : real ) : real;
-
- { degrees, expressed as a real number }
-
- function degreestoradians( degrees : real ) : real;
- function radianstodegrees( radians : real ) : real;
- function sin_degree( degrees : real ) : real;
- function cos_degree( degrees : real ) : real;
- function tan_degree( degrees : real ) : real;
- function arcsin_degree( degrees : real ) : real;
- function arccos_degree( degrees : real ) : real;
- function arctan_degree( degrees : real ) : real;
-
- { degrees, in degrees, minutes, and sECOnds, as real numbers }
-
- function degreepartstodegrees( degrees, minutes, sECOnds : real ) : real;
- function degreepartstoradians( degrees, minutes, sECOnds : real ) : real;
- procedure degreestodegreeparts( degreesin : real;
- var degrees, minutes, sECOnds : real );
- procedure radianstodegreeparts( radians : real;
- var degrees, minutes, sECOnds : real );
- function sin_degreeparts( degrees, minutes, sECOnds : real ) : real;
- function cos_degreeparts( degrees, minutes, sECOnds : real ) : real;
- function tan_degreeparts( degrees, minutes, sECOnds : real ) : real;
- function arcsin_degreeparts( degrees, minutes, sECOnds : real ) : real;
- function arccos_degreeparts( degrees, minutes, sECOnds : real ) : real;
- function arctan_degreeparts( degrees, minutes, sECOnds : real ) : real;
-
- { degrees, expressed as degreetype ( reals in record ) }
-
- function degreetypetodegrees( degreevar : degreetype ) : real;
- function degreetypetoradians( degreevar : degreetype ) : real;
- procedure degreetypetodegreeparts( degreevar : degreetype;
- var degrees, minutes, sECOnds : real );
- procedure degreestodegreetype( degrees : real; var degreevar : degreetype );
- procedure radianstodegreetype( radians : real; var degreevar : degreetype );
- procedure degreepartstodegreetype( degrees, minutes, sECOnds : real;
- var degreevar : degreetype );
- function sin_degreetype( degreevar : degreetype ) : real;
- function cos_degreetype( degreevar : degreetype ) : real;
- function tan_degreetype( degreevar : degreetype ) : real;
- function arcsin_degreetype( degreevar : degreetype ) : real;
- function arccos_degreetype( degreevar : degreetype ) : real;
- function arctan_degreetype( degreevar : degreetype ) : real;
-
- { hyperbolic functions }
-
- function sinh( invalue : real ) : real;
- function cosh( invalue : real ) : real;
- function tanh( invalue : real ) : real;
- function coth( invalue : real ) : real;
- function sech( invalue : real ) : real;
- function csch( invalue : real ) : real;
- function arcsinh( invalue : real ) : real;
- function arccosh( invalue : real ) : real;
- function arctanh( invalue : real ) : real;
- function arccoth( invalue : real ) : real;
- function arcsech( invalue : real ) : real;
- function arccsch( invalue : real ) : real;
-
- { logarithms, powers, and roots }
-
- { e to the x is exp() }
- { natural log is ln() }
- function log10( innumber : real ) : real;
- function log( base, innumber : real ) : real; { log of any base }
- function power( innumber, exponent : real ) : real;
- function root( innumber, theroot : real ) : real;
-
-
- !short Unit ECO_cfi; C.F.I. = Compression File Interface
- unit ECO_cfi; { cfi = compression file interface }
- interface
- uses
- dos
-
- ;
-
- const
- cfismartmode : boolean = false; { niet verder zoeken na geen hit }
- cfisfx : boolean = false; { niet in exe & com kijken }
-
- type
- cfityperecord = record
- cfiname : string[67]; {filename only 12 chars!!!!!} {even meer !!}
- cfipath : string[67]; {directory if used}
- cficrc : longint; {crc check}
- cfipsize : longint; {packed size file}
- cfiosize : longint; {original size file}
- cfitime : longint; {dos packed time}
- cfiattr : byte; {zip and lzh/lzs only}
- cfimethod : word; {soort compressie}
- cfiptotal : longint; {total packed size}
- cfiototal : longint; {total original size}
- end;
- str79 = string[79];
- str8 = string[8];
-
-
- var
- cfierror : boolean;
- cfifile : file; { used by all routines }
- cfipos : longint; { position where info begins!! }
- cfifilename : str79;
- cfitype : cfityperecord;
- cfityp : byte; { type archive : zoo, arc, lzh etc }
- readcentralheader : boolean; { read also zip central header default false }
-
-
-
- procedure closecfi;
- function opencfifile(f : str79) : boolean;
- function cfinext : boolean;
- function dectohex(l: longint; cfityp: byte) : str8;
-
-
- !short Unit ECO_crc; 16 and 32 bit Cyclic Redundancy Check Functions
- unit ECO_crc;
-
- interface
-
- function __crc32(value: byte; crc: longint) : longint;
- function __crc16(value: byte; crc: word) : word;
-
- usage by ultihouse; init:
-
- var
- crc16,
- crc32 : longint;
-
- begin
- crc16 := $0000;
- crc32 := $ffffffff;
- crc16 := __crc16(xxxx, crc16);
- crc32 := __crc32(xxxx, crc32);
- end;
-
-
-
- !short Unit ECO_crt Replacement CRT unit (ASM'd)
-
- const
- bw40 = 0;{40x25 b/w on cga}
- co40 = 1;{40x25 color on cga}
- bw80 = 2;{80x25 b/w on cga}
- co80 = 3;{80x25 color on cga}
- mono = 7;{80x25 b/w on mda or hgc}
- font8x8 = 256;{43-/50-line mode ega/vga}
- co132x25 = 85;{color 132x25 line mode ega paradise 480}
- co132x43 = 84;{color 132x43 line mode ega paradise 480}
- mo132x25 = 86;{mono 132x25 line mode ega paradise 480}
- mo132x43 = 87;{mono 132x43 line mode ega paradise 480}
- c40 = co40;{for 3.0 compatibility}
- c80 = co80;{for 3.0 compatibility}
-
- black = $00;
- blue = $01;
- green = $02;
- cyan = $03;
- red = $04;
- magenta = $05;
- brown = $06;
- lightgray = $07;
- darkgray = $08;
- lightblue = $09;
- lightgreen = $0a;
- lightcyan = $0b;
- lightred = $0c;
- lightmagenta = $0d;
- yellow = $0e;
- white = $0f;
- blink = $80;
-
- blackbg = $00;
- bluebg = $10;
- greenbg = $20;
- cyanbg = $30;
- redbg = $40;
- magentabg = $50;
- brownbg = $60;
- lightgraybg = $70;
-
-
- type
- adaptertype = (
- none,mda,hercules,cga,egamono,egacolor,mcgamono,mcgacolor,
- vgamono,vgacolor
- );
-
- charset = set of char; {makkelijk}
-
- stscreen = string[132]; {max screen lengte i know is possible}
- bordertypes = (nobrdr,
- spacebrdr,singlebrdr,doublebrdr,
- horizdoublevertsinglebrdr,
- horizsinglevertdoublebrdr,
- hatch1brdr,hatch2brdr,hatch3brdr);
-
- borders = (horiztop, horizbottom,
- vertleft, vertright, horizborders,
- vertborders, allborders);
- borderparts = (tl,tr,bl,br,ht,hb,vr,vl,lc,rc,tc,bc,cc);
- borderarray = array[tl..cc] of char;
-
- const
- borderst : array [spacebrdr..hatch3brdr] of borderarray = (
- '█████████████',
- '┌┐└┘──││├┤┬┴┼',
- '╔╗╚╝══║║╠╣╦╩╬',
- '╒╕╘╛══││╞╡╤╧╪',
- '╓╖╙╜──║║╟╢╥╙╫',
- '░░░░░░░░░░░░░',
- '▒▒▒▒▒▒▒▒▒▒▒▒▒',
- '▓▓▓▓▓▓▓▓▓▓▓▓▓'
- );
-
- type
- largearray = array [1..32000] of word;
-
- savescrptr = ^savescrrec;
- savescrrec = record
- screensize : word;
- savedscr : largearray;
- end;
-
- quickwindowptr = ^quickwindowrec;
- quickwindowrec = record
- previous : quickwindowptr; { is nil when last window }
- windowinfo : savescrptr; { window size,saved screen }
- x1,y1,
- x2,y2 : byte; { absolute screen coordiantes }
- bt : bordertypes;
- sscrolllock : boolean; { saved scrolllock status }
- signorewindow : boolean; { saved ignorewindow }
- sscanlines : word; { cursor scan lines }
- sx,sy : byte; { cursor position }
- swindmin,
- swindmax : word; { saved previous window }
- stextattr : byte; { saved textattr }
- end;
-
-
- var
- checksnow : boolean absolute eco_adpt.checksnow;{for snow on cga}
- textattr : byte;{back and foreground color}
- windmin : word;{window coordinaten}
- windmax : word;
- lastmode : word absolute eco_adpt.currenttextmode;
-
- (* extra vars not in borland's CRT *)
- videopage : byte absolute eco_adpt.videopage;{video page number}
- videocard : adaptertype absolute eco_adpt.videocard; {video kaart}
- maxrows : byte absolute eco_adpt.maxrows;{current max number }
- maxcols : byte absolute eco_adpt.maxcols;{ of colums and lines}
- videoofs : word absolute eco_adpt.videoofs;{offset video memory}
- videoseg : word absolute eco_adpt.videoseg;{start video memory}
- videoptr : pointer absolute eco_adpt.videoptr;
- scrolllockscreen : boolean;{scroll screen;normaal is false}
- startupmode : word absolute eco_adpt.startupmode;{videomode at startup time}
- startupcursorsize : word absolute eco_adpt.startupcursorsize;
- ignorewindow : boolean; { if true abs screen coordinates are in use }
- visiblequickwindow : quickwindowptr; { active quick window }
-
-
- procedure textmode(mode : integer);
-
- procedure window(x1,y1,x2,y2 : byte);
- procedure clrscr;
- procedure clrline(y : byte);
- procedure clreol;
-
- procedure delline;
- procedure insline;
-
- procedure normvideo;
- procedure lowvideo;
- procedure highvideo;
-
- procedure textbackground(color : byte);
- procedure textcolor(color : byte);
-
- procedure gotoxy(x,y : byte);
- function wherey : byte;
- function wherex : byte;
- procedure gotoxyabs(x,y : byte);
- function whereyabs : byte;
- function wherexabs : byte;
-
- function windowcols : byte;
- function windowrows : byte;
-
- function readword : word;
- inline($b8/$00/$00/ { mov ax,0 }
- $cd/$16); { int 16h }
-
- function readkey : char;
- function keypressed : boolean;
-
- procedure delay(ms : word);
- procedure sound(hz : word);
- procedure nosound;
-
- procedure assigncrt(var f : text);
-
- function location(x,y : byte) : word;
- procedure fillword(var dest;width,value : word);
-
- procedure scrollup(x1,y1,x2,y2,color : byte);
- procedure scrolldown(x1,y1,x2,y2,color : byte);
-
- procedure fastwrite(x,y,attr : byte;st : stscreen);
- procedure fastpwrite(x,y : byte;st : stscreen);
- procedure changeattr(x,y,attr,len : byte);
- procedure titleengine(x1,y1,x2,y2 : byte;bt : bordertypes;
- var title : stscreen);
- procedure boxengine(x1,y1,x2,y2,attr : byte;
- bordertype : bordertypes;filled : boolean);
-
- procedure movefromscreen(var source,dest;length : word);
- procedure movetoscreen(var source,dest;length : word);
-
- (* cursor manipulation *)
- procedure normalcursor;
- procedure insertcursor;
- procedure halfcursor;
- procedure hidecursor;
-
- (* screen save/restore procedures *)
- function savepartscreen(x1,y1,x2,y2 : byte) : savescrptr;
- procedure restorepartscreen(var scrptr : savescrptr;x1,y1,x2,y2 : byte);
- procedure disposepartscreen(var scrptr : savescrptr);
-
- (* quick window interface *)
- procedure quickopenwindow(x1,y1,x2,y2,attr : byte;bt : bordertypes;
- st : stscreen);
- procedure quickmovewindow(x,y : byte);
- procedure quickclosewindow;
-
- !short Unit ECO_dos DOS unit replacement (ASM'd)
-
- const
- (* flags bit masks *)
-
- fcarry = $0001;
- fparity = $0004;
- fauxiliary = $0010;
- fzero = $0040;
- fsign = $0080;
- foverflow = $0800;
-
- (* file mode magic numbers *)
-
- fmclosed = $d7b0;
- fminput = $d7b1;
- fmoutput = $d7b2;
- fminout = $d7b3;
-
- (* file attribute constants *)
-
- readonly = $01;
- hidden = $02;
- sysfile = $04;
- volumeid = $08;
- directory = $10;
- archive = $20;
- anyfile = $3f;
-
- type (* string types *)
-
- comstr = string[127]; { command line string }
- pathstr = string[79]; { full file path string }
- dirstr = string[67]; { drive and directory string }
- namestr = string[8]; { file name string }
- extstr = string[4]; { file extension string }
- filestr = string[12]; { file name + extension string }
-
- (* registers record used by intr and msdos *)
-
- registers = record
- case integer of
- 0 : (ax,bx,cx,dx,bp,si,di,ds,es,flags : word);
- 1 : (al,ah,bl,bh,cl,ch,dl,dh : byte);
- end;
-
- (* typed-file and untyped-file record *)
-
- filerec = record
- handle : word;
- mode : word;
- recsize : word;
- private : array [1..26] of byte;
- userdata : array [1..16] of byte;
- name : array [0..79] of char;
- end;
-
- (* textfile record *)
-
- textbuf = array [0..127] of char;
- textrec = record
- handle : word;
- mode : word;
- bufsize : word;
- private : word;
- bufpos : word;
- bufend : word;
- bufptr : ^textbuf;
- openfunc : pointer;
- inoutfunc : pointer;
- flushfunc : pointer;
- closefunc : pointer;
- userdata : array [1..16] of byte;
- name : array [0..79] of char;
- buffer : textbuf;
- end;
-
- (* search record used by findfirst and findnext *)
-
- searchrec = record
- fill : array [1..21] of byte;
- attr : byte;
- time : longint;
- size : longint;
- name : string[12];
- end;
-
- (* date and time record used by packtime and unpacktime *)
-
- datetime = record
- year,month,day,hour,min,sec : word;
- end;
-
- var
- doserror : integer; (* error status variable *)
-
-
-
- function dosversion : word;
- procedure intr(intno : byte;var regs : registers);
- procedure msdos(var regs : registers);
- procedure getdate(var year,month,day,dayofweek : word);
- procedure setdate(year,month,day : word);
- procedure gettime(var hour,minute,second,sec100 : word);
- procedure settime(hour,minute,second,sec100 : word);
- procedure getcbreak(var break : boolean);
- procedure setcbreak(break : boolean);
- procedure getverify(var verify : boolean);
- procedure setverify(verify : boolean);
- function diskfree(drive : byte) : longint;
- function disksize(drive : byte) : longint;
- procedure getfattr(var f;var attr : word);
- procedure setfattr(var f;attr : word);
- procedure getftime(var f;var time : longint);
- procedure setftime(var f;time : longint);
- procedure findfirst(path : pathstr;attr : word;var f : searchrec);
- procedure findnext(var f : searchrec);
- procedure unpacktime(p : longint;var t : datetime);
- procedure packtime(var t : datetime;var p : longint);
- procedure getintvec(intno : byte;var vector : pointer);
- procedure setintvec(intno : byte;vector : pointer);
- procedure swapvectors;
- procedure keep(exitcode : word);
- procedure exec(path : pathstr;comline : comstr);
- function dosexitcode : word;
- function fsearch(path : pathstr;dirlist : string) : pathstr;
- function fexpand(path : pathstr) : pathstr;
- procedure fsplit(path : pathstr;var dir : dirstr;
- var name : namestr;var ext : extstr);
- function envcount : integer;
- function envstr(index : integer) : string;
- function getenv(envvar : string) : string;
-
- function isdevice(handle : word) : boolean;
- function fileexist(f : pathstr) : boolean;
- function filename(path : pathstr) : filestr;
- function pathname(path : pathstr) : dirstr;
- function filenamehasext(path : pathstr;var dotpos : byte) : boolean;
- procedure defaultextension(ext : extstr;var path : pathstr);
- procedure cleanfilename(var path : pathstr);
-
-
- !short Unit ECO_dsqv DesqView Compatibility Box
- unit ECO_dsqv;
- interface
- uses
- dos
-
- ;
-
- type str2 = string[2];
-
- var
- desqresult : byte;
- desqregs : registers;
- desqversion : word;
-
-
- function desqviewpresent:boolean;
- procedure starttask(x: str2);
- procedure giveupcpu;
- procedure giveupidle;
- procedure exittask;
-
-
-
- !short Unit ECO_emou; Extended Mouse Function Library
- unit ECO_emou;
- interface
- uses
- dos
-
- ;
-
-
- const
- leftbutton = 1; {what the buttons are}
- rightbutton = 2;
- centerbutton = 4;
-
- standard = 1; {graphic cursor definitions}
- uparrow = 2;
- downarrow = 3;
- leftarrow = 4;
- rightarrow = 5;
- checkmark = 6;
- uphand = 7;
- downhand = 8;
- lefthand = 9;
- righthand = 10;
- stophand = 11;
- hourglass = 12;
- diagcross = 13;
- rectcross = 14;
- rectbox = 15;
- targetcross = 16;
- targetcircle = 17;
- targetbox = 18;
- questionmark = 19;
-
- maxmousecursorshape = 19;
-
- {---------------------------------------------------------------------------}
- {externally accessable variables}
-
- var
-
- mouse_installed : boolean; {initmouse - true if mouse is operable}
- mouse_error : integer; {initmouse - error code}
- mouse_type : integer; {initmouse - mouse type}
-
- mouse_clicked : boolean; {readmouse - true if button was clicked}
- mouse_buttons : word; {readmouse - current mouse button status}
- mouse_click_button : word; {readmouse - click button status}
- mousex : word; {readmouse - mouse text x position}
- mousey : word; {readmouse - mouse text y position}
- click_mousex : word; {readmouse - text x click position}
- click_mousey : word; {readmouse - text y click position}
- real_mousex : word; {readmouse - real mouse x position}
- real_mousey : word; {readmouse - real mouse y position}
-
- mousetextwidth : word; {size of text on screen for mouse}
- mousetextheight : word;
-
- {---------------------------------------------------------------------------}
- type
- masktype = record {mouse graphic cursor definition}
- def: array [0..1, 0..15] of word; {graphics cursor def}
- hotx, hoty: integer; { hot spot x,y }
- end;
-
- procedure initmouse;
- procedure showmouse;
- procedure hidemouse;
- procedure readmouse;
- procedure setmouseposition(x, y : word);
- procedure setmousepoint(x, y : word);
- function mousepress(
- button: word;
- var count, lastx, lasty: word
- ): word;
- function mouserelease(
- button: word;
- var count, lastx, lasty: word
- ): word;
- procedure setmousearea(x1,y1,x2,y2: word);
- procedure setmouseboxarea(var r);
- procedure mousegraphiccursor(shape: integer);
- procedure setmousegraphiccursor(var mask:masktype);
- procedure mousetextcursor(select, start, stop: word);
- procedure readmickey(var x, y: word);
- procedure setmouseisr(mask:word; var address);
- procedure lightpen(flag: boolean);
- procedure setpixeltomickey(x, y: word);
- procedure hidemousearea(x1,y1,x2,y2: word);
- procedure hidemouseboxarea(var r);
- procedure mousethreshold(threshold:word);
- procedure swapmouseisr(var mask:word; var address);
- procedure setmousepage(page: word);
- function getmousepage: word;
- function mousein(x1,y1,x2,y2: word):boolean;
- function mouseinbox(var r): boolean;
- function mouseclick: boolean;
- function mouseclickin(x1,y1,x2,y2: word): boolean;
- function mouseclickinbox(var r): boolean;
- function pushmouse: boolean;
- function popmouse: boolean;
- procedure zapmousestack;
-
-
- !short Unit ECO_exe; Interrupt Connection With Host Program
- unit ECO_exe;
- interface
- uses
- dos
-
- ;
-
- type
- combuffer = record { exec communications buffer }
- ident : array[1..8] of char; { identification }
- comvector : word; { address stored here }
- common : pointer; { common data address }
- comsize : word; { common data size }
- progpath : string[67]; { next program }
- cmdline : string[127]; { next command line }
- default : string[67]; { default program }
- comspec : string[67]; { command full path }
- lasterror : word; { last dos 4b error }
- end;
- combufptr = ^combuffer;
-
-
- function getptr(vector : byte) : combufptr;
- function cseg_t(var comseg,compars : word; vector : byte) : word;
- function chain_t(prog,cmd : string; vector : byte) : word;
- function default_t(prog : string; vector : byte) : word;
-
-
- !short Unit ECO_ext; Powertools Base Extension Unit
- unit ECO_ext;
- interface
- uses
- unit_key, unit_mnu,
- unit_sup, unit_fil,
- unit_scn, unit_str,
- unit_mou,
- ECO_time, dos
-
- ;
-
-
- const
- bioskeybuffer= $f;
- only =$40; notnone = $80;
-
- _period = $342e; _colon = $273a; _c_2= $0300;
- _slash = $352f; _padslash = $e02f; _c_6= $071e;
- _c_minus = $0c1f;
- _left = $4be0; _padleft = $4b00;
- _cleft = $73e0; _cpadleft = $7300;
- _right = $4de0; _padright = $4d00;
- _cright = $74e0; _cpadright = $7400;
- _up = $48e0; _padup = $4800;
- _down = $50e0; _paddown = $5000;
- _pgup = $49e0; _padpgup = $4900;
- _pgdn = $51e0; _padpgdn = $5100;
- _home = $47e0; _padhome = $4700;
- _chome = $7700; _end = $4fe0;
- _padend = $4f00; _cend = $7500;
- _ins = $52e0; _padins = $5200;
- _del = $53e0; _paddel = $5300;
- _spaddel = $532e; _backspace = $0e08;
- _minus = $0c2d; _padminus = $4a2d;
- _plus = $0d2b; _padplus = $4e2b;
- _star = $092a; _padstar = $372a;
- _enter = $1c0d; _newline = $1c0a;
- _padenter = $e00d;
-
- _tab = $0f09; _s_tab = $0f00;
- _esc = $011b; _space = $3920;
-
- _a = $1e61; _b = $3062; _s_a = $1e41; _s_b = $3042;
- _c = $2e63; _d = $2064; _s_c = $2e43; _s_d = $2044;
- _e = $1265; _f = $2166; _s_e = $1245; _s_f = $2146;
- _g = $2267; _h = $2368; _s_g = $2247; _s_h = $2348;
- _i = $1769; _j = $246a; _s_i = $1749; _s_j = $244a;
- _k = $256b; _l = $266c; _s_k = $254b; _s_l = $264c;
- _m = $326d; _n = $316e; _s_m = $324d; _s_n = $314e;
- _o = $186f; _p = $1970; _s_o = $184f; _s_p = $1950;
- _q = $1071; _r = $1372; _s_q = $1051; _s_r = $1352;
- _s = $1f73; _t = $1474; _s_s = $1f53; _s_t = $1454;
- _u = $1675; _v = $2f76; _s_u = $1655; _s_v = $2f56;
- _w = $1177; _x = $2d78; _s_w = $1157; _s_x = $2d58;
- _y = $1579; _z = $2c7a; _s_y = $1559; _s_z = $2c5a;
-
- _c_a = $1e01; _c_b = $3002; _a_a = $1e00; _a_b = $3000;
- _c_c = $2e03; _c_d = $2004; _a_c = $2e00; _a_d = $2000;
- _c_e = $1205; _c_f = $2106; _a_e = $1200; _a_f = $2100;
- _c_g = $2207; _c_h = $2308; _a_g = $2200; _a_h = $2300;
- _c_i = $1709; _c_j = $240a; _a_i = $1700; _a_j = $2400;
- _c_k = $250b; _c_l = $260c; _a_k = $2500; _a_l = $2600;
- _c_m = $320d; _c_n = $310e; _a_m = $3200; _a_n = $3100;
- _c_o = $180f; _c_p = $1910; _a_o = $1800; _a_p = $1900;
- _c_q = $1011; _c_r = $1312; _a_q = $1000; _a_r = $1300;
- _c_s = $1f13; _c_t = $1414; _a_s = $1f00; _a_t = $1400;
- _c_u = $1615; _c_v = $2f16; _a_u = $1600; _a_v = $2f00;
- _c_w = $1117; _c_x = $2d18; _a_w = $1100; _a_x = $2d00;
- _c_y = $1519; _c_z = $2c1a; _a_y = $1500; _a_z = $2c00;
-
- _f1 = $3b00; _f2 = $3c00; _f3 = $3d00; _f4 = $3e00;
- _f5 = $3f00; _f6 = $4000; _f7 = $4100; _f8 = $4200;
- _f9 = $4300; _f10 = $4400;
-
- _s_f1 = $5400; _s_f2 = $5500; _s_f3 = $5600; _s_f4 = $5700;
- _s_f5 = $5800; _s_f6 = $5900; _s_f7 = $5a00; _s_f8 = $5b00;
- _s_f9 = $5c00; _s_f10 = $5d00;
-
- _c_f1 = $5e00; _c_f2 = $5f00; _c_f3 = $6000; _c_f4 = $6100;
- _c_f5 = $6200; _c_f6 = $6300; _c_f7 = $6400; _c_f8 = $6500;
- _c_f9 = $6600; _c_f10 = $6700;
-
- _a_f1 = $6800; _a_f2 = $6900; _a_f3 = $6a00; _a_f4 = $6b00;
- _a_f5 = $6c00; _a_f6 = $6d00; _a_f7 = $6e00; _a_f8 = $6f00;
- _a_f9 = $7000; _a_f10 = $7100;
-
-
- type
- mouseaction = (mleft, mmiddle, mright, mboth, mmove, mnoaction);
- filestr = string[12];
- str3 = string[3];
-
- reflowinfo = record { for powertools menus }
- off, hioff: byte;
- key : _keys;
- prot : boolean;
- end;
-
-
- const
- viewer : string[12] = ' l.com ';
-
-
- var
- { mouse }
- keypoller : pointer;
- moldx, moldy : word;
-
- { keyboard }
- lastkey : char;
- lastscan : byte;
-
-
- { extended supplement }
- function __attr(f, b: byte): byte;
- procedure __coordmou(var x: word; var y: word);
- procedure __delay(w: word);
- procedure __delaykey(w:word);
- procedure __fastkey;
- function __funcmou(var b: word; var x: word; var y: word): mouseaction;
- function __isboxmou(x1, y1, x2, y2, cx, cy: word): boolean;
- function __keypressed: boolean;
- function __keyword(k: _keys): word;
- function __main(b: longint; w: word): longint;
- function __max(v1, v2: longint): longint;
- function __min(v1, v2: longint): longint;
- function __power(x,y: integer): longint;
- function __readkey: char;
- function __retdow(y, m, d: word): word;
- function __retkey: word;
- function __str(st: string): integer;
- function __today: byte;
- function __val(st: string): longint;
-
-
-
- !short Unit ECO_fido; FIDO Protocol Function Compatibility Box
- unit ECO_fido;
- interface
- uses
- dos, crt,
- unit_str, unit_fil,
- ECO_str, ECO_ext
-
- ;
-
- type
- netmsg = record { netmessage record structure }
- from,
- too : string[35];
- subject : string[71];
- date : string[19];
- timesread,
- destnode,
- orignode,
- cost,
- orignet,
- destnet,
- replyto,
- attr,
- nextreply : word;
- areaname : string[20];
- end;
-
- pktheader = record { packet header of packet }
- orignode,
- destnode,
- year,
- month,
- day,
- hour,
- minute,
- sECOnd,
- baud,
- orignet,
- destnet : word;
- end;
-
- pktmessage = record { packet header of each individual message }
- orignode,
- destnode,
- orignet,
- destnet,
- attr,
- cost : word;
- date : string[19];
- too : string[35];
- from : string[35];
- subject : string[71];
- areaname : string[20];
- end;
-
- archivename = record { internal record structure used for }
- mynet, { determining the name of of an echomail }
- mynode, { archive. i.e. 00fa1fd3.mo1 }
- hisnet,
- hisnode : word;
- end;
-
-
- const { attribute flags }
- _private = $0001;
- _crash = $0002;
- _recvd = $0004;
- _sent = $0008;
- _file = $0010;
- _forward = $0020; { also know as in-transit }
- _orphan = $0040;
- _killsent = $0080;
- _local = $0100;
- _hold = $0200;
- _freq = $0800;
-
- months : array[1..12] of string[3] = (
- 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'
- );
-
-
- var
- net : netmsg;
- ph : pktheader;
- pm : pktmessage;
- arcn : archivename;
-
-
- function packetname_ : string;
- function packetmessage_ : string;
- function packetheader_ : string;
- function netmessage_ : string;
- function getpath_(var fname : string) : boolean;
- function getnet_(gn : string) : string;
- function getnode_(gn : string) : string;
- function msgdatestamp_ : string;
- function lastmsgnum_( _netpath : string ) : integer;
- function hex_ (n : word) : string;
- function archivename_ : string;
- procedure expandnodenumbers_(var list : string; var totalnumber : integer );
- procedure convertnetnode_(netnode : string; var net, node : word);
-
-
- !short Unit ECO_fil; PowerTools File Extension Box Functions
- unit ECO_fil;
- interface
- uses
- dos, unit_str,
- unit_sup, unit_fil,
- ECO_ext, ECO_str
-
-
- ;
-
-
- type
- searchrecord = record
- attr : byte;
- time : longint;
- size : longint;
- name : string[12];
- {fill : array[1..21] of byte; we don't need that!}
- end;
-
-
- const
- only = $40; notnone = $80;
-
-
- var
- _dosdrv : integer;
- _dosdrvchar : char;
- _doscurpath : pathstr;
- _dosdiscfree,
- _dosdiscsize : longint;
-
-
-
- { extended file supplement }
- function __attrfilter(fileattr, filter: byte): boolean;
- function __comexebatfilter(s: namestr): boolean;
- function __curdir: string;
- function __delvlfil(drive: char) : boolean;
- function __deverr: string;
- procedure __drvparm(drv: char);
- procedure __erasefiles(s: string);
- function __existpath(s: string): boolean;
- function __extractext(name: pathstr): str3;
- function __extractname(s : string): string;
- function __extractpath(s : string): string;
- function __findfil(f: string; var s: string): boolean;
- function __inparams(s: string): boolean;
- function __packfil(str: string; size: byte): string;
- procedure __parsefil(name: filestr; var nam: namestr; var ext: extstr);
- function __retdfil(drive: char) : byte;
- function __reteqfil(drv: char; var errorcode: byte): char;
- function __searchrec(
- src : searchrec;
- nm, woord, mainsize : word;
- takemainsize, extended,
- ampm, show_attr,
- wide : boolean
- ): string;
- procedure __srec2srec(s: searchrec; var s2: searchrecord);
- function __seteqfil(drv: char; var errorcode: byte): char;
- function __sizefil(pt: string): longint;
- procedure __speedfil;
- function __strattr(attr: byte): string;
-
-
-
- !short Unit ECO_fosl; IFNA/FIDO FOSSIL Functions
- unit ECO_fosl;
- interface
- uses
- dos, crt
-
- ;
-
-
- var
- regs: registers;
-
-
- function fos_atcmd_ (comport_ : byte; command_: string): boolean;
- function fos_avail_ (comport_ : byte): boolean;
- function fos_cd_ (comport_ : byte): boolean;
- function fos_checkmodem_ (comport_ : byte): boolean;
- function fos_empty_ (comport_ : byte): boolean;
- function fos_hangup_ (comport_ : byte): boolean;
- function fos_oktosend_ (comport_ : byte): boolean;
- function fos_receive_ (comport_ : byte): char;
- procedure fos_reboot_;
- procedure fos_ansi_ (character : char);
- procedure fos_bios_ (character : char);
- procedure fos_clear_regs_;
- procedure fos_close_ (comport_ : byte);
- procedure fos_dtr_ (comport_ : byte; state: boolean);
- procedure fos_flow_ (comport_ : byte; state: boolean);
- procedure fos_flush_ (comport_ : byte);
- procedure fos_init_ (comport_ : byte);
- procedure fos_kill_out_ (comport_ : byte);
- procedure fos_kill_in_ (comport_ : byte);
- procedure fos_parms_ (comport_ : byte; baud: integer; databits: byte;
- parity: char; stopbit: byte);
- procedure fos_string_ (comport_ : byte; outstring: string);
- procedure fos_stringcrlf_ (comport_ : byte; outstring: string);
- procedure fos_watchdog_ (comport_ : byte; state: boolean);
- procedure fos_write_ (comport_ : byte; character: char);
-
-
-
- !short Unit ECO_kbd; Extended Keyboard Functions
- unit ECO_kbd;
- interface
-
- const
- enableenhanced : boolean = true; { false disables intr }
- digits : array[0..$f] of char = '0123456789ABCDEF';
-
- { plain shifted control alternate }
-
- _esc =$011b;_s_esc =$011b;_c_esc =$011b;_a_esc =$0100;
- _f1 =$3b00;_s_f1 =$5400;_c_f1 =$5e00;_a_f1 =$6800;
- _f2 =$3c00;_s_f2 =$5500;_c_f2 =$5f00;_a_f2 =$6900;
- _f3 =$3d00;_s_f3 =$5600;_c_f3 =$6000;_a_f3 =$6a00;
- _f4 =$3e00;_s_f4 =$5700;_c_f4 =$6100;_a_f4 =$6b00;
- _f5 =$3f00;_s_f5 =$5800;_c_f5 =$6200;_a_f5 =$6c00;
- _f6 =$4000;_s_f6 =$5900;_c_f6 =$6300;_a_f6 =$6d00;
- _f7 =$4100;_s_f7 =$5a00;_c_f7 =$6400;_a_f7 =$6e00;
- _f8 =$4200;_s_f8 =$5b00;_c_f8 =$6500;_a_f8 =$6f00;
- _f9 =$4300;_s_f9 =$5c00;_c_f9 =$6600;_a_f9 =$7000;
- _f10 =$4400;_s_f10 =$5d00;_c_f10 =$6700;_a_f10 =$7100;
- _f11 =$8500;_s_f11 =$8700;_c_f11 =$8900;_a_f11 =$8b00;
- _f12 =$8600;_s_f12 =$8800;_c_f12 =$9000;_a_f12 =$8c00;
- _pad_slash =$e02f;_s_pad_slash =$e02f;_c_pad_slash =$9500;_a_pad_slash =$a400;
- _asterisk =$372a;_s_asterisk =$372a;_c_asterisk =$7200;_a_asterisk =$3700;
- _pad_minus =$4a2d;_s_pad_minus =$4a2d;_c_pad_minus =$8e00;_a_pad_minus =$4a00;
- _pad_home =$4700;_s_pad_home =$4737;_c_pad_home =$7700;_a_pad_home =$9700;
- _pad_up =$4800;_s_pad_up =$4838;_c_pad_up =$8d00;_a_pad_up =$9800;
- _pad_pgup =$4900;_s_pad_pgup =$4939;_c_pad_pgup =$8400;_a_pad_pgup =$9900;
- _pad_plus =$4e2b;_s_pad_plus =$4e2b;_c_pad_plus =$9000;_a_pad_plus =$4e00;
- _pad_left =$4b00;_s_pad_left =$4b34;_c_pad_left =$7300;_a_pad_left =$9b00;
- _pad_center=$4c00;_s_pad_center=$4c35;_c_pad_center=$8f00;_a_pad_center=$9c00;
- _pad_right =$4d00;_s_pad_right =$4d36;_c_pad_right =$7400;_a_pad_right =$9d00;
- _pad_end =$4f00;_s_pad_end =$4f31;_c_pad_end =$7500;_a_pad_end =$9f00;
- _pad_down =$5000;_s_pad_down =$5032;_c_pad_down =$9100;_a_pad_down =$a000;
- _pad_pgdn =$5100;_s_pad_pgdn =$5133;_c_pad_pgdn =$7600;_a_pad_pgdn =$a100;
- _pad_enter =$e00d;_s_pad_enter =$e00d;_c_pad_enter =$e00a;_a_pad_enter =$a600;
- _pad_ins =$5200;_s_pad_ins =$5230;_c_pad_ins =$9200;_a_pad_ins =$a200;
- _pad_del =$5300;_s_pad_del =$532e;_c_pad_del =$9300;_a_pad_del =$a300;
- _tab =$0f09;_s_tab =$0f00;_c_tab =$9400;_a_tab =$a500;
- _lbracket =$1a5b;_s_lbracket =$1a7b;_c_lbracket =$1a1b;_a_lbracket =$1a00;
- _rbracket =$1b5d;_s_rbracket =$1b7d;_c_rbracket =$1b1d;_a_rbracket =$1b00;
- _backslash =$2b5c;_s_backslash =$2b7c;_c_backslash =$2b1c;_a_backslash =$2b00;
- _semicolon =$273b;_s_semicolon =$273a;_c_semicolon =$2700;_a_semicolon =$2700;
- _quote =$2827;_s_quote =$2822;_c_quote =$2800;_a_quote =$2800;
- _comma =$332c;_s_comma =$333c;_c_comma =$3300;_a_comma =$3300;
- _period =$342e;_s_period =$343e; _a_period =$3400;
- _slash =$352f;_s_slash =$353f; _a_slash =$3500;
- _space =$3920;_s_space =$3920;_c_space =$3920;_a_space =$3920;
- _ins =$52e0; _c_ins =$92e0;_a_ins =$a200;
- _home =$47e0; _c_home =$77e0;_a_home =$9700;
- _pgup =$49e0; _c_pgup =$84e0;_a_pgup =$9900;
- _del =$53e0; _c_del =$93e0;_a_del =$a300;
- _end =$4fe0; _c_end =$75e0;_a_end =$9f00;
- _pgdn =$51e0; _c_pgdn =$76e0;_a_pgdn =$a100;
- _up =$48e0; _c_up =$8de0;_a_up =$9800;
- _left =$4be0; _c_left =$73e0;_a_left =$9b00;
- _down =$50e0; _c_down =$91e0;_a_down =$a000;
- _right =$4de0; _c_right =$74e0;_a_right =$9d00;
- _enter =$1c0d;_s_enter =$1c0d;_c_enter =$1c0a;_a_enter =$1c00;
- _pad_45 =$565c;_s_pad_45 =$567c;
- _backquote =$2960;_s_backquote =$297e; _a_backquote =$2900;
- _0 =$0b30;_s_0 =$0b29; _a_0 =$8100;
- _1 =$0231;_s_1 =$0221; _a_1 =$7800;
- _2 =$0332;_s_2 =$0340;_c_2 =$0300;_a_2 =$7900;
- _3 =$0433;_s_3 =$0423; _a_3 =$7a00;
- _4 =$0534;_s_4 =$0524; _a_4 =$7b00;
- _5 =$0635;_s_5 =$0625; _a_5 =$7c00;
- _6 =$0736;_s_6 =$075e;_c_6 =$071e;_a_6 =$7d00;
- _7 =$0837;_s_7 =$0826; _a_7 =$7e00;
- _8 =$0938;_s_8 =$092a; _a_8 =$7f00;
- _9 =$0a39;_s_9 =$0a28; _a_9 =$8000;
- _minus =$0c2d;_s_minus =$0c5f;_c_minus =$0c1f;_a_minus =$8200;
- _equals =$0d3d;_s_equals =$0d2b; _a_equals =$8300;
- _backspace =$0e08;_s_backspace =$0e08;_c_backspace =$0e7f;_a_backspace =$0e00;
- _a =$1e61;_s_a =$1e41;_c_a =$1e01;_a_a =$1e00;
- _b =$3062;_s_b =$3042;_c_b =$3002;_a_b =$3000;
- _c =$2e63;_s_c =$2e43;_c_c =$2e03;_a_c =$2e00;
- _d =$2064;_s_d =$2044;_c_d =$2004;_a_d =$2000;
- _e =$1265;_s_e =$1245;_c_e =$1205;_a_e =$1200;
- _f =$2166;_s_f =$2146;_c_f =$2106;_a_f =$2100;
- _g =$2267;_s_g =$2247;_c_g =$2207;_a_g =$2200;
- _h =$2368;_s_h =$2348;_c_h =$2308;_a_h =$2300;
- _i =$1769;_s_i =$1749;_c_i =$1709;_a_i =$1700;
- _j =$246a;_s_j =$244a;_c_j =$240a;_a_j =$2400;
- _k =$256b;_s_k =$254b;_c_k =$250b;_a_k =$2500;
- _l =$266c;_s_l =$264c;_c_l =$260c;_a_l =$2600;
- _m =$326d;_s_m =$324d;_c_m =$320d;_a_m =$3200;
- _n =$316e;_s_n =$314e;_c_n =$310e;_a_n =$3100;
- _o =$186f;_s_o =$184f;_c_o =$180f;_a_o =$1800;
- _p =$1970;_s_p =$1950;_c_p =$1910;_a_p =$1900;
- _q =$1071;_s_q =$1051;_c_q =$1011;_a_q =$1000;
- _r =$1372;_s_r =$1352;_c_r =$1312;_a_r =$1300;
- _s =$1f73;_s_s =$1f53;_c_s =$1f13;_a_s =$1f00;
- _t =$1474;_s_t =$1454;_c_t =$1414;_a_t =$1400;
- _u =$1675;_s_u =$1655;_c_u =$1615;_a_u =$1600;
- _v =$2f76;_s_v =$2f56;_c_v =$2f16;_a_v =$2f00;
- _w =$1177;_s_w =$1117;_c_w =$1157;_a_w =$1100;
- _x =$2d78;_s_x =$2d58;_c_x =$1519;_a_x =$2d00;
- _y =$1579;_s_y =$1559;_c_y =$1519;_a_y =$1500;
- _z =$2c7a;_s_z =$2c5a;_c_z =$2c1a;_a_z =$2c00;
-
-
- var
- hasenhancedkbd : boolean; {true when enhanced keyboard is detected}
-
- procedure restorekbdvectors;
- function readkeyword : word;
- function hexw(w : word) : string;
-
-
- The following table summarizes the keys which are affected by using this
- unit. The entries are the values of the scan word in hex. The high byte of
- the scan word is the scan code, the low byte the ASCII character. If the low
- byte is 00, the high byte will be returned on the next call to ReadKey. Any
- keys not listed are returned in the usual manner (see the Turbo Pascal 4.0
- manual, first printing pages 571-572, for a scan code chart). See Notes,
- following the table, for the key to special symbols.
-
- Plain Shift Control Alt
- ----- ----- ------- ----
- F11 8500% 8700% 8900% 8B00%
- F12 8600% 8800% 8A00% 8C00%
- Esc 011B 011B 011B 0100*
- Backquote 2960 297E 2960 2900*
- Backspace 0E08 0E08 0E7F 0E00*
- Tab 0F09 0F00 9400* A500*
- Left Brack 1A5B 1A7B 1A1B 1A00*
- Right Brack 1B5D 1B7D 1B1D 1B00*
- Backslash 2B5C 2B7C 2B1C 2B00*
- Semicolon 273B 273A - 2700*
- Quote 2827 2822 - 2800*
- Enter 1C0D 1C0D 1C0A 1C00*
- Comma 332C 333C - 3300*
- Period 342E 343E - 3400*
- Slash 352F 353F - 3500*
- Insert 5200 5230 9200* A200#
- Del 5300 532E 9300* A300#
- Home 4700 4737 7700 9700#
- End 4F00 4F31 7500 9F00#
- PgUp 4900 4939 8400 9900#
- PgDn 5100 5133 7600 A100#
- Up 4800 4838 8D00* 9800#
- Down 5000 5032 9100* A000#
- Left 4B00 4B34 7300 9B00#
- Right 4D00 4D36 7400 9D00#
- Pad-Asterisk 372A ! ! 3700# (numeric keypad keys)
- Pad-Minus 4A2D 4A2D 8E00* 4A00#
- Pad-Plus 4E2B 4E2B 9000* 4E00#
- Pad-5 4C00* 4C35 8F00* 9C00#
-
- Notes:
- - These keystrokes are ignored.
- * These keystrokes are not normally returned by the non-enhanced keyboard.
- # These keystrokes are not normally returned by the enhanced keyboard.
- ! These keystrokes control printscreen and print echoing. They cannot
- simulate the effect of the enhanced keyboard, which has the Asterisk and
- PrtSc keys separated.
- % The F11 and F12 keys are returned only if they actually exist on the
- keyboard.
-
- With a few exceptions, the EnhKbd unit returns results identical to those of
- the enhanced keyboard BIOS. One difference makes the enhanced keyboard
- simpler to use in a program: those scan words which normally contain E0 in
- the low byte to indicate that the key is specific to the enhanced keyboard
- (like the dedicated cursor keys) will have the low cleared to zero by EnhKbd.
-
- Keys marked with # are normally ignored by the enhanced BIOS. By defining
- these numeric keypad keys when Alt is pressed, the usual ability to enter
- arbitrary keys on the numeric keypad is disabled. Within applications, the
- ability to use alt-shifted arrow keys will generally be more useful. The
- arbitrary keys from the numeric keypad are still available by pressing both
- Alt and Left Shift simultaneously.
-
- Because this unit takes over interrupt 9, it will crash the system if
- SideKick is installed and another TSR that takes over interrupt 9 has been
- loaded after SideKick. You must exercise similar caution in using this unit
- in programs that must take over interrupt 9 for other reasons.
-
- Uses this unit early in the USES clause!
-
-
- !short Unit ECO_mou; Standard Mouse Functions
- unit ECO_mou;
- interface
- uses
- dos
-
- ;
-
-
- const
- mdd = $33; { interrupt for mouse device driver }
- hardware = 1; { cursor types }
- software = 0;
- left = 0; { mouse buttons }
- right = 1;
- middle = 2;
-
- type
- resetrec = record { initialized by mouse function 0 }
- exists : boolean; { true if mouse is present }
- nbuttons : integer; { # buttons on mouse }
- end;
-
- locrec = record { initialized by mouse fcns 3, 5, and 6 }
- buttonstatus, { bits 0-2 on if corresp button is down }
- opcount, { # times button has been clicked }
- { opcount not returned by fcn 3 }
- column, { position }
- row : integer;
- end;
-
- moverec = record { initialized by mouse fcn 11 }
- hcount, { net horizontal movement }
- vcount : integer; { net vertical movement }
- end;
-
- var
- reg : registers;
-
-
- {$F+}
- procedure mreset (var mouse : resetrec); { function 0 }
- procedure mshow; { function 1 }
- procedure mhide; { function 2 }
- procedure mpos (var mouse : locrec); { function 3 }
- procedure mmoveto (col, row : integer); { function 4 }
- procedure mpressed (button : integer;
- var mouse : locrec); { function 5 }
- procedure mreleased (button : integer;
- var mouse : locrec); { function 6 }
- procedure mcolrange (min, max : integer); { function 7 }
- procedure mrowrange (min, max : integer); { function 8 }
- procedure mgraphcursor (hhot, vhot : integer;
- maskseg, maskofs : word); { function 9 }
- procedure mtextcursor (ctype, p1, p2 : word); { function 10 }
- procedure mmotion (var moved : moverec); { function 11 }
- procedure minsttask (mask,
- taskseg, taskofs : word); { function 12 }
- procedure mlpenon; { function 13 }
- procedure mlpenoff; { function 14 }
- procedure mratio (horiz, vert : integer); { function 15 }
- {$F-}
-
-
- !short Unit ECO_pal; CGA/EGA/VGA/Herc Colour Palette Functions
- unit ECO_pal;
- interface
- uses
- crt, unit_scn,
- ECO_vid, ECO_ext
-
- ;
-
- type
- attributes = record
- fore, back: byte;
- end;
-
- function getcolor(
- x_pos, y_pos, winf, winb, wintype: byte;
- var fore, back: byte;
- msg: string
- ): byte;
-
-
- !short Unit ECO_pasc; Popup Ascii Table Return Function
- unit ECO_pasc;
- interface
- uses
- crt,
- unit_key, unit_scn,
- ECO_vid, ECO_ext,
- ECO_str
-
- ;
-
- procedure __setpopascii(x, y, f1, b1: integer);
- function __popascii : char;
-
-
- !short Unit ECO_pclc; Popup Calculator Return Function
- unit ECO_pclc;
-
- interface
- uses
- dos, crt,
- unit_scn, ECO_vid,
- ECO_ext, ECO_str
-
- ;
-
-
- procedure __setcalc(x,y,f,b:integer);
- function __popcalc: real;
-
-
- !short Unit ECO_play; Extensive BASIC Play Command Functions
- unit ECO_play;
- interface
-
- uses crt;
-
- const
- note_octave : integer = 4; { current octave for note }
- note_fraction : real = 0.875; { fraction of duration given to note }
- note_duration : integer = 0; { duration of note ^^semi-legato }
- note_length : real = 0.25; { length of note }
- note_quarter : real = 500.0; { moderato pace (principal beat) }
-
- procedure setdefaultnotes;
- procedure play(s: string);
- procedure beep(h, l: word);
-
- call: play(string)
-
- music_string --- the string containing the encoded music to be
- played. the format is the same as that of the
- microsoft basic play statement. the string
- must be <= 254 characters in length.
-
- calls: sound
- getint (internal)
-
- remarks: the characters accepted by this routine are:
-
- a - g musical notes
- # or + following a - g note, indicates sharp
- - following a - g note, indicates flat
- < move down one octave
- > move up one octave
- . dot previous note (extend note duration by 3/2)
- mn normal duration (7/8 of interval between notes)
- ms staccato duration
- ml legato duration
- ln length of note (n=1-64; 1=whole note,4=quarter note)
- pn pause length (same n values as ln above)
- tn tempo,n=notes/minute (n=32-255,default n=120)
- on octave number (n=0-6,default n=4)
- nn play note number n (n=0-84)
-
- the following two commands are ignored by play:
-
- mf complete note before continuing
- mb another process may begin before speaker is
- finished playing note
-
- important --- setdefaultnotes must have been called at least once before
- this routine is called.
-
-
- !short Unit ECO_scrn; Screen Saver - Graphical Function
- unit ECO_scrn;
- interface uses
- crt, graph, bgidriv,
- ECO_vid
-
- ;
-
- procedure screensaver(st: string);
-
-
- !short Unit ECO_srch; Boyer/Moore Search Function Unit
- unit ECO_srch;
- interface
-
-
- function blockpos(var buffer;size: word;s: string): integer;
-
-
- type
- boyertable = record
- match : string;
- matchlength : byte;
- table : array[char] of byte
- end;
-
- procedure makeboyertable(matchstring: string;var table: boyertable);
- function boyermoore(
- var bufferaddr;size: word;start: word;var table: boyertable
- ): word;
-
-
-
-
- !short Unit ECO_str; PowerTools Extension String Functions
- unit ECO_str;
- interface
- uses
- dos,
- unit_str, ECO_ext
-
- ;
-
-
- type
- filestr = string[12];
- str3 = string[3];
- anystr = string;
- asciiz = array[0..255] of char;
- asciizptr = ^^asciiz;
-
-
- const
- fk_ctrl_mark: char = '^';
-
-
- { extended string supplement }
- procedure __app(var st: string; aps: string);
- function __backapp(s: string) : string;
- function __backrem(s: string) : string;
- function __comp(s1, s2: string): boolean;
- function __hxdecstr(hexstr: string): longint;
- function __lo(s: string): string;
- function __num(nr: longint): string;
- function __nw(s: string): string;
- function __overtype(n:byte;strs,strt:string):string;
- function __pntstr(n: longint): string;
- function __rep(n: byte; character: char): string;
- function __retdowstr(dayofweek: word; ful: boolean): string;
- function __todaystr(ful: boolean): string;
- function __up(s: string): string;
- function __uprem(s: string): string;
-
- {== ASCIIZ ==}
- procedure copystoa(s: anystr; var a; length_a: integer);
- procedure copys2ar(s: anystr; var a; length_a: integer);
- function read_ctrls(s: anystr): anystr;
- function write_ctrls(s: anystr): anystr;
- function asciiz_to_str(a: asciiz): string;
- procedure str_to_asciiz(s: string; var a : asciiz);
-
-
- !short Unit ECO_swch; Switch To DOS With EMS/Disc Swap
- unit ECO_swch;
- interface
-
- function switch(drive: integer; mem: integer; command: string): integer;
-
-
- !short Unit ECO_time; Timer Functions
- unit ECO_time;
- interface
- uses
- dos
-
- ;
-
- procedure starttimer (whichclock : byte);
- starts the internal clock. resets the clock if it was previously set.
-
- function getlaptime (whichclock : byte) : string;
- returns a string showing the elapsed time. the returned string is...
- "xx:xx:xx.xx". the clock continues to run.
-
- procedure restarttimer (whichclock : byte);
- restarts the clock if the stoptimer procedure stopped the clock. it does
- nothing if the clock is still running.
-
- function stoptimer (whichclock : byte) : string;
- stops the timer without clearing the elapsed time. returned string will be
- one of the following... "xx:xx:xx.xx", or "Can't stop clock #0!".
-
-
- !short Unit ECO_vga; VGA Palette Manipulation Functions
- unit ECO_vga;
- interface
- uses
- dos, crt,
- unit_scn
-
- ;
-
-
- const
- colors = 256;
- delayamt : byte = 50;
- steps : byte = 30;
- vgapresent : boolean = true;
-
-
- type
- paltype = array [0..colors-1] of record
- r, g, b: byte;
- end;
-
- var
- origpal : paltype;
-
-
- procedure __palget(var origpal: paltype);
- procedure __palfade(origpal: paltype; fadeout: boolean);
- procedure __palblack(origpal: paltype);
- procedure __palput(origpal: paltype);
-
-
- !short Unit ECO_vid; PowerTools Extension Video Functions
- unit ECO_vid;
- interface
- uses
- unit_sup, unit_key,
- unit_scn, unit_fil,
- ECO_str, ECO_ext
-
- ;
-
-
- const
- bt_double = 15; bt_single = 0;
- black = 00; blue = 01;
- green = 02; cyan = 03;
- red = 04; magenta = 05;
- brown = 06; lightgray = 07;
- darkgray = 08; lightblue = 09;
- lightgreen = 10; lightcyan = 11;
- lightred = 12; lightmagenta = 13;
- yellow = 14; white = 15;
- blink = 128;
-
-
-
- procedure __attrib(x1, y1, x2, y2, f, b: byte);
- procedure __bandwin(del: boolean; x1,y1,x2,y2,f,b,bt: byte);
- function __barchoice(x,x1,y,f,b,h : byte; st: string): byte;
- procedure __betwscn(x1, x2, y, f, b: byte; st: string);
- procedure __clrscn(x1, y1, x2, y2, f, b: byte; c: char);
- procedure __cls;
- function __copyfil(x1,x2,y,f,b: byte; fs: longint; src, targ: string): byte;
- procedure __copyscn(x1, y1, x2, y2, x, y: byte);
- procedure __ECO_message;
- procedure __hbetwscn(x1, x2, y, f, b, h: byte; st: string);
- procedure __hquikscn(x, y, f, b, h: byte; st: string);
- procedure __nocrt;
- procedure __panelwin(del: boolean; x1, y1, x2, y2, f, b, bt: byte);
- procedure __partscn(sc: pointer; x1, y1, x2, y2: byte; toscreen: boolean);
- procedure __ptd_message;
- procedure __qvertscn(x1, y1, f, b: byte; st: string);
- procedure __repscn(f, b: byte; st: string);
- procedure __resscn(sc: _scnimageptr);
- procedure __savscn(sc: _scnimageptr);
- procedure __setblwin(blink: boolean);
-
-
- var
- scn1, scn2, scn3, scn4: _scnimageptr;
-
-
- !short Unit ECO_vprm; VideoParameter Functions
- unit ECO_vprm;
- interface
- uses
- graph, ptd_gdrv
-
- ;
-
-
- !short Unit ECO_zmod; ZModem Interface (Receive/Transmit)
- unit ECO_zmod;
-
- interface
- uses
- crt, dos,
- ECO_asyn;
-
-
- function zmodem_receive(
- path: string; comport: word; baudrate: longint
- ): boolean;
-
- function zmodem_send(
- pathname: string; lastfile: boolean; comport: word; baudrate: longint
- ): boolean;
-
- ========================================================================
-