This thesis contains program coding module for generation logics test by Boolean gap

Delphi & Pascal (česká wiki)
Přejít na: navigace, hledání
Category: Programs in C, C++

Program: Prac_ndf.cBooldif.zip
File exe: Booldif.exe
need: Adresar.cColor.cDerivac.cError.cFunkcie.cHelp.cKey.cLine_edi.cMain.cMenu.cObsluha.cOkno.cPrac_ndf.cSlovnik.cSlov_fon.cStatist.cUtil.cVideo.cVystupy.cAdresar.hColor.hDefine.hError.hFunkcie.hGlob.hKey.hLine_edi.hMbooldif.hMenu.hOkno.hSlov_fon.hUtil.hVideo.h
Example: Example.zipBin_10_o.ndfBin_10_o.ndfBin_1and.ndfBin_2rad.ndfBin_3rad.ndfBin_4rad.ndfHard.ndfI_reg_lo.ndfReg_jk.ndfScitac_s.ndfScp_1rad.ndfScp_2rad.ndfScp_2r_1.ndfScp_3rad.ndfScp_4r_2.ndfScp_6r_3.ndfScp_8r_4.ndfSc_1r_pj.ndfSc_1r_sj.ndfSc_1_aoi.ndfSc_2r_4.ndfSc_3r_6.ndfSc_7400n.ndfSc_aon.ndfSimp3_a.ndfSimp3_b.ndfSimp4_a.ndfSimp4_b.ndfSimp4_c.ndfSimp6_a.ndfTest_vod.ndfZle.ndf
Manual: Prirucky.zip

This thesis contains program coding module for generation logics test by Boolean gap. Compile vector of fault for existent circuit, forth about all boughs herself chauffeur. Results is absolute gauge. Program application enables four modes It is implemented in the C programming language for the operating system MS-DOS, or another compatible with it. The program is suitable for an interactive way to communicate with the user, allowing a comfortable working environment are similar to Turbo Vision.
/*****************************************************************************
*									     *
*                                Subor UTIL.C                                *
*									     *
*****************************************************************************/
 
#include <dos.h>
#include <conio.h>
 
#include "glob.h"
#include "util.h"
#include "menu.h"
#include "key.h"
#include "video.h"
#include "okno.h"
#include "mbooldif.h"
 
#define len_seg 65535.0			// velkost segmentu
 
 
//************************************************************************//
// PIP                                                                    //
//                                                            30.10.1997  //
//************************************************************************//
 
void pip(void)
{
   sound(1000);
   delay(20);
   nosound();
}
 
 
//************************************************************************//
// TRC zvuk, ktory upozornuje                                             //
//                                                            30.10.1997  //
//************************************************************************//
 
void trc(void)
{
   register unsigned int i;
   for(i=30;i<4000;i+=100)
      {
      sound(i);
      delay(1);
      }
   nosound();
}
 
 
//************************************************************************//
// Prevod_na_velke                                                        //
//                                                            30.10.1997  //
//************************************************************************//
 
int prevod_na_velke( int k )
{
 if( k>='a' && k<='z') k-='a'-'A';
 return k;
}
 
//************************************************************************//
// INFO_OKNO                                                              //
//                                                            30.10.1997  //
//************************************************************************//
 
void info_okno(void)
{
	vypln_okno(3,19,45,21,' ',0x1e);	// zakladne info o programe
	ramcek(2,18,42,4,0x1f,3);
	tien(2,18,42,4,0x08);
	window(3,19,45,21);
	farba(BLUE,WHITE);
	gotoxy(4,2);
	cprintf("Generovanie testov Boolovskou");
	gotoxy(4,3);
	cprintf("diferenciou       verzia 2.53 (1997)");
 
	vypln_okno(51,19,76,21,' ',0x1e);	// ako je program nastaveny
	ramcek(50,18,26,4,0x1f,3);
	tien(50,18,26,4,0x08);
	window(51,19,76,21);
 
	gotoxy(4,2);	cprintf(" Re‘im:");
	gotoxy(4,3);	cprintf("V˜stup:");
 
	switch(Rezim)
	{
	case AUTO:
		   gotoxy(12,2);cprintf("Automatick˜");
		  break;
	case DEMO:
		   gotoxy(12,2);cprintf("Demon¨tra‡n˜");
		  break;
	case VYUK:
		   gotoxy(12,2);cprintf("V˜ukov˜");
		  break;
	case PREV:
		   gotoxy(12,2);cprintf("PreverovacĄ");
		  break;
	}
 
	switch(Vystup)
	{
	case OBR:
		   gotoxy(12,3);cprintf("Obrazovka");
		  break;
	case SUB:
		   gotoxy(12,3);cprintf("\"%s\"",TmpSubor[4]);
		  break;
	case TLC:
		   gotoxy(12,3);cprintf("Tla‡iare¤");
		  break;
	}
}
 
//************************************************************************//
// GET_TMP_ADR vycita tmp adresar                                         //
//                                                            30.10.1997  //
//************************************************************************//
 
char *get_tmp_adr( void )
{
unsigned char far *segment_;
char pom_r[max_ret];
char temp[max_ret];
unsigned int i;
union REGS reg;
 
 reg.h.ah=0x62;
 intdos(&reg,&reg);
 segment_=MK_FP (reg.x.bx,0);
 segment_ = MK_FP( segment_[0x2d]*256 + segment_[0x2c],0 );
 
 strcpy( pom_r,"" );
 strcpy( temp,"" );
 for( i=0; i<len_seg; i++ ) {		// hladam v segmente parafraf = PSP[0x2d]*256 + PSP[0x2c]
    strcat( pom_r," " );
    pom_r[ strlen( pom_r )-1 ] = segment_[i] ;
    if (( segment_[i] == 0 ) || ( strlen(pom_r) > max_ret )) { // je koniec retazca
	 strlwr( pom_r );
	 str_delete( pom_r,' ' );
	 if( strstr( pom_r,"temp=" ) != NULL ) {	// ideme tmp adresar
	     strcpy( temp,strtemp( pom_r,"=" ) );
	     strcat( temp,"\\" );
	     return( temp );
	    }
	 strcpy( pom_r,"" );
	}
   }
 return( temp );
}
 
 
//************************************************************************//
// STR_DELETE odstran medzery a male konvertuj na velke pismena           //
//                                                             2.11.1997  //
//************************************************************************//
 
char *str_delete( char *z_str, char aky_str )
{
 char pom_r[max_ret];
 int i=0;
 
 strcpy( pom_r,"" );
 while ( strlen(z_str) > i ) {
       if ( z_str[i] != aky_str ) {
	   strcat( pom_r," " );
	   pom_r[ strlen( pom_r )-1 ] = z_str[i] ;
	  }
       i++;
      }
 
 strcpy( z_str, pom_r );
 return( z_str );
}
 
//************************************************************************//
// STRSPOJ k retazcu pom_r pripoji char znak                              //
//                                                            30.10.1997  //
//************************************************************************//
 
char *strspoj( char s1[], char s2[] )
{
 strcpy( s12,s1 );
 strcat( s12,s2 );
 return ( s12 );
}
 
 
//************************************************************************//
// STRTEMP odstrani od_ret a ostane len path na TEMP                      //
//                                                            30.10.1997  //
//************************************************************************//
 
char *strtemp( char pom_r[], char od_ret[] )
{
char temp_path[max_ret];
int i;
 
 strcpy( temp_path,"" );
 for( i=strcspn( pom_r,od_ret )+1; i<=strlen( pom_r); i++ ) {
     strcat( temp_path," " );
     temp_path[ strlen( temp_path )-1 ] = pom_r[i] ;
    }
 
 return( temp_path );
}
 
//************************************************************************//
// Ako pomocka pre spravu pamate vypisuje ako som na tom s volnou pamatou //
// nieco nieje OK                                             10.11.1997  //
//************************************************************************//
 
void pamet( void )
{
char pom[ 80 ];
 
 sprintf( pom, "[%7lu b]",(unsigned long) coreleft() );
 tlac_retazec(_stlpcov - 23 ,0,0x70, pom );
 tlac_cas();
}
 
/*----------------------------------END-------------------------------------*/