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 VIDEO.C                                *
*									     *
*****************************************************************************/
 
#include <dos.h>
 
#include "glob.h"
#include "video.h"
#include "slov_fon.h"
 
 
//************************************************************************//
// VYPLN_OKNO								  //
//                                                            30.10.1997  //
//************************************************************************//
 
void vypln_okno(int lavy,int horny,int pravy,int dolny,char znak,unsigned char attr)
{
   asm push es
   _ES=VIDEOSEGMENT;
   _CH=dolny-horny+1;
   _BX=2*(_stlpcov*horny+lavy);
   _DX=2*(_stlpcov-pravy+lavy);
n0:
   _CL=pravy-lavy;
   _AL=znak;
   _AH=attr;
n1:
   asm {
       mov es:[bx],al
       inc bx
       mov es:[bx],ah
       inc bx
       dec cl
       jnz n1
       add bx,dx
       dec ch
       jnz n0
       pop es
       }
}
 
 
//************************************************************************//
// TLAC_RETAZEC								  //
//                                                            30.10.1997  //
//************************************************************************//
 
int tlac_retazec(unsigned int stlpec,unsigned int riadok,unsigned int attr,char *ret)
{
   if(stlpec>=_stlpcov || riadok>=_riadkov)return FALSE;
   asm push es;
   asm push ds;
   _ES=VIDEOSEGMENT;
   _BX=(_stlpcov*riadok+stlpec)*2;
   _CX=_stlpcov-stlpec;
   _DL=attr;
   _SI=FP_OFF(ret);
   _DS=FP_SEG(ret);
 
n1:
   asm mov al,ds:[si]
   asm cmp al,0
   asm jz  n2
   asm inc si
   asm mov es:[bx],al
   asm inc bx
   asm mov es:[bx],dl
   asm inc bx
   asm loop n1
   asm pop ds
   asm pop es
   return FALSE;
n2:
   asm pop ds
   asm pop es
   return TRUE;
}
 
 
//************************************************************************//
// TLAC_ZNAK								  //
//                                                            30.10.1997  //
//************************************************************************//
 
int tlac_znak(unsigned int stlpec,unsigned int riadok,unsigned int attr,char znak)
{
   unsigned int adr;
   if(stlpec>=_stlpcov || riadok>=_riadkov)return FALSE;
   adr=(_stlpcov*riadok+stlpec)*2;
   pokeb(VIDEOSEGMENT,adr,znak);
   adr++;
   pokeb(VIDEOSEGMENT,adr,attr);
   return TRUE;
}
 
 
//************************************************************************//
// NASTAV_ATRIBUT							  //
//                                                            30.10.1997  //
//************************************************************************//
 
int nastav_atribut(unsigned int stlpec,unsigned int riadok,unsigned int attr)
{
   unsigned int adr;
   if(stlpec>=_stlpcov || riadok>=_riadkov)return FALSE;
   adr=(_stlpcov*riadok+stlpec)*2+1;
   pokeb(VIDEOSEGMENT,adr,attr);
   return TRUE;
}
 
 
 
//************************************************************************//
// TLAC_DO_KONCA_RIADKU							  //
//                                                            30.10.1997  //
//************************************************************************//
 
void tlac_do_konca_riadku(unsigned int stlpec,unsigned int riadok,unsigned int attr,char znak)
//Tu sa da pouzit clroel() !!!
{
   if(stlpec>=_stlpcov || riadok>=_riadkov)return;
   asm push es;
   _ES=VIDEOSEGMENT;
   _BX=(_stlpcov*riadok+stlpec)*2;
   _CX=_stlpcov-stlpec;
   _DL=attr;
   _DH=znak;
n1:
   asm mov es:[bx],dh
   asm inc bx
   asm mov es:[bx],dl
   asm inc bx
   asm loop n1
n2:
   asm pop es
   return;
}
 
 
 
//************************************************************************//
// VYPNI_KURZOR								  //
//                                                            30.10.1997  //
//************************************************************************//
 
void vypni_kurzor(void)
{
    _CH=0x20;
    _AH=0x01;
    geninterrupt(VIDEOINTERRUPT);
}
 
 
 
//************************************************************************//
// ZAPNI_KURZOR								  //
//                                                            30.10.1997  //
//************************************************************************//
 
void zapni_kurzor(void)
{
    _CH=0x06;
    _CL=0x07;
    _AH=0x01;
    geninterrupt(VIDEOINTERRUPT);
}
 
 
 
//************************************************************************//
// PRESUN_KURZOR							  //
//                                                            30.10.1997  //
//************************************************************************//
 
void presun_kurzor(int x,int y)
{
   _BH=0;
   _DH=y;
   _DL=x;
   _AH=0x02;
   geninterrupt(VIDEOINTERRUPT);
}
 
int m8025( void )				// video mod 80 na 25
{
 Video_mod=M80x25;
 nastav_video_mod(Video_mod);
// inic_obrazovku();
 return(0);
}
 
 
//************************************************************************//
// INIC_OBRAZOVKU							  //
//                                                            30.10.1997  //
//************************************************************************//
 
void inic_obrazovku(void)
{
 nastav_video_mod(Video_mod);
 switch(Video_mod)
	{
	case M80x25:
	case M80x30:
	case M132x25:
	case M132x30:
	slov_font();
	}
 vypln_okno(0,0,_stlpcov,1,' ',atributy[1]);
 vypln_okno(0,_riadkov-2,_stlpcov,_riadkov-1,' ',atributy[1]);
 vypln_okno(0,1,_stlpcov,_riadkov-2,'°',atributy[0]);
}
 
/*---------------------------------END--------------------------------------*/