功 能: 画一个二维条形图
用 法: void far bar(int left, int top, int right, int bottom);
程序例:
#include
#include
#include
#include
int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int midx, midy, i;
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* terminate with an error code */
}
midx = getmaxx() / 2;
midy = getmaxy() / 2;
/* loop through the fill patterns */
for (i=SOLID_FILL; i
/* set the fill style */
setfillstyle(i, getmaxcolor());
/* draw the bar */
bar(midx-50, midy-50, midx+50,
midy+50);
getch();
}
/* clean up */
closegraph();
return 0;
}
函数名: bar3d
功 能: 画一个三维条形图
用 法: void far bar3d(int left, int top, int right, int bottom,
int depth, int topflag);
程序例:
#include
#include
#include
#include
int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int midx, midy, i;
/* initialize graphics, local variables */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* terminate with error code */
}
midx = getmaxx() / 2;
midy = getmaxy() / 2;
/* loop through the fill patterns */
for (i=EMPTY_FILL; i
/* set the fill style */
setfillstyle(i, getmaxcolor());
/* draw the 3-d bar */
bar3d(midx-50, midy-50, midx+50, midy+50, 10, 1);
getch();
}
/* clean up */
closegraph();
return 0;
}
函数名: bdos
功 能: DOS系统调用
用 法: int bdos(int dosfun, unsigned dosdx, unsigned dosal);
程序例:
#include
#include
/* Get current drive as 'A', 'B', ... */
char current_drive(void)
{
char curdrive;
/* Get current disk as 0, 1, ... */
curdrive = bdos(0x19, 0, 0);
return('A' + curdrive);
}
int main(void)
{
printf("The current drive is %c:\n", current_drive());
return 0;
}
函数名: bdosptr
功 能: DOS系统调用
用 法: int bdosptr(int dosfun, void *argument, unsigned dosal);
程序例:
#include
#include
#include
#include
#include
#include
#define BUFLEN 80
int main(void)
{
char buffer[BUFLEN];
int test;
printf("Enter full pathname of a directory\n");
gets(buffer);
test = bdosptr(0x3B,buffer,0);
if(test)
{
printf("DOS error message: %d\n", errno);
/* See errno.h for error listings */
exit (1);
}
getcwd(buffer, BUFLEN);
printf("The current directory is: %s\n", buffer);
return 0;
}
函数名: bioscom
功 能: 串行I/O通信
用 法: int bioscom(int cmd, char abyte, int port);
程序例:
#include
#include
#define COM1 0
#define DATA_READY 0x100
#define TRUE 1
#define FALSE 0
#define SETTINGS ( 0x80 | 0x02 | 0x00 | 0x00)
int main(void)
{
int in, out, status, DONE = FALSE;
bioscom(0, SETTINGS, COM1);
cprintf("... BIOSCOM [ESC] to exit ...\n");
while (!DONE)
{
status = bioscom(3, 0, COM1);
if (status & DATA_READY)
if ((out = bioscom(2, 0, COM1) & 0x7F) != 0)
putch(out);
if (kbhit())
{
if ((in = getch()) == '\x1B')
DONE = TRUE;
bioscom(1, in, COM1);
}
}
return 0;
}
函数名: biosdisk
功 能: 软硬盘I/O
用 法: int biosdisk(int cmd, int drive, int head, int track, int sector
int nsects, void *buffer);
程序例:
#include
#include
int main(void)
{
int result;
char buffer[512];
printf("Testing to see if drive a: is ready\n");
result = biosdisk(4,0,0,0,0,1,buffer);
result &= 0x02;
(result) ? (printf("Drive A: Ready\n")) :
(printf("Drive A: Not Ready\n"));
return 0;
}
函数名: biosequip
功 能: 检查设备
用 法: int biosequip(void);
程序例:
#include
#include
int main(void)
{
int result;
char buffer[512];
printf("Testing to see if drive a: is ready\n");
result = biosdisk(4,0,0,0,0,1,buffer);
result &= 0x02;
(result) ? (printf("Drive A: Ready\n")) :
(printf("Drive A: Not Ready\n"));
return 0;
}
函数名: bioskey
功 能: 直接使用BIOS服务的键盘接口
用 法: int bioskey(int cmd);
程序例:
#include
#include
#include
#define RIGHT 0x01
#define LEFT 0x02
#define CTRL 0x04
#define ALT 0x08
int main(void)
{
int key, modifiers;
/* function 1 returns 0 until a key is pressed */
while (bioskey(1) == 0);
/* function 0 returns the key that is waiting */
key = bioskey(0);
/* use function 2 to determine if shift keys were used */
modifiers = bioskey(2);
if (modifiers)
{
printf("[");
if (modifiers & RIGHT) printf("RIGHT");
if (modifiers & LEFT) printf("LEFT");
if (modifiers & CTRL) printf("CTRL");
if (modifiers & ALT) printf("ALT");
printf("]");
}
/* print out the character read */
if (isalnum(key & 0xFF))
printf("'%c'\n", key);
else
printf("%#02x\n", key);
return 0;
}
函数名: biosmemory
功 能: 返回存储块大小
用 法:int biosmemory(void);
程序例:
#include
#include
int main(void)
{
int memory_size;
memory_size = biosmemory(); /* returns value up to 640K */
printf("RAM size = %dK\n",memory_size);
return 0;
}
函数名: biosprint
功 能: 直接使用BIOS服务的打印机I/O
用 法: int biosprint(int cmd, int byte, int port);
程序例:
#include
#include
#include
int main(void)
{
#define STATUS 2 /* printer status command */
#define PORTNUM 0 /* port number for LPT1 */
int status, abyte=0;
printf("Please turn off your printer. Press any key to continue\n");
getch();
status = biosprint(STATUS, abyte, PORTNUM);
if (status & 0x01)
printf("Device time out.\n");
if (status & 0x08)
printf("I/O error.\n");
if (status & 0x10)
printf("Selected.\n");
if (status & 0x20)
printf("Out of paper.\n");
if (status & 0x40)
printf("Acknowledge.\n");
if (status & 0x80)
printf("Not busy.\n");
return 0;
}
函数名: biostime
功 能: 读取或设置BIOS时间
用 法: long biostime(int cmd, long newtime);
程序例:
#include
#include
#include
#include
int main(void)
{
long bios_time;
clrscr();
cprintf("The number of clock ticks since midnight is:\r\n");
cprintf("The number of seconds since midnight is:\r\n");
cprintf("The number of minutes since midnight is:\r\n");
cprintf("The number of hours since midnight is:\r\n");
cprintf("\r\nPress any key to quit:");
while(!kbhit())
{
bios_time = biostime(0, 0L);
gotoxy(50, 1);
cprintf("%lu", bios_time);
gotoxy(50, 2);
cprintf("%.4f", bios_time / CLK_TCK);
gotoxy(50, 3);
cprintf("%.4f", bios_time / CLK_TCK / 60);
gotoxy(50, 4);
cprintf("%.4f", bios_time / CLK_TCK / 3600);
}
return 0;
}
函数名: brk
功 能: 改变数据段空间分配
用 法: int brk(void *endds);
程序例:
#include
#include
int main(void)
{
char *ptr;
printf("Changing allocation with brk()\n");
ptr = malloc(1);
printf("Before brk() call: %lu bytes free\n", coreleft());
brk(ptr+1000);
printf(" After brk() call: %lu bytes free\n", coreleft());
return 0;
}
函数名: bsearch
功 能: 二分法搜索
用 法: void *bsearch(const void *key, const void *base, size_t *nelem,
size_t width, int(*fcmp)(const void *, const *));
程序例:
#include
#include
#define NELEMS(arr) (sizeof(arr) / sizeof(arr[0]))
int numarray[] = {123, 145, 512, 627, 800, 933};
int numeric (const int *p1, const int *p2)
{
return(*p1 - *p2);
}
int lookup(int key)
{
int *itemptr;
/* The cast of (int(*)(const void *,const void*))
is needed to avoid a type mismatch error at
compile time */
itemptr = bsearch (&key, numarray, NELEMS(numarray),
sizeof(int), (int(*)(const void *,const void *))numeric);
return (itemptr != NULL);
}
int main(void)
{
if (lookup(512))
printf("512 is in the table.\n");
else
printf("512 isn't in the table.\n");
return 0;
}
190.72.148.* 于 2007-06-14 01:18:24发表:
c3a02b50bc80d6639b31cb76637be264 http://dxeyre.org http://vtqzvy.org http://dxeyre.org http://www.xgjrbe.org http://www.xgjrbe.org http://kzfkps.org http://www.eyfgwa.org http://gwxvqe.org http://nbtxan.org http://www.icqepi.org 0f5fa03e3dca64d5b4cd330c6f860531
85.86.79.* 于 2007-06-13 02:09:16发表:
8f3c97024c3748e09bba8b573b99d64d http://dvd-video-lezione-pian-tastiera.yvzcyb.org/ http://digicom-digitune-tv-tuner-digit-terrestre.ammyco.org/ http://sweet-child-of-mina-testo-traduzione.ammyco.org/ http://comune-palermo-it-servizio-tributario.yvzcyb.org/ http://hotel-costa-etrusca-spiaggia-sabbia.xxcgwu.org/ http://testi-canzoni-nightmare-before-christmas.hivfbp.org/ http://rivenditore-porta-interna-provincia-lodi.kiyytw.org/ http://previsioni-meteo-varese-e-provincia.rivotb.org/ http://vendo-motore-toyota-2500-turbo-diesel.xxcgwu.org/ http://imposta-registro-locazione-immobile-strumentali.rivotb.org/ 416778d26f8af0e18aadb8d947bc0aec
70.45.66.* 于 2007-06-12 03:16:20发表:
fb3914f17ee94cb81521c95bae213ea7 http://keith-urban-clinica-betty-ford-foto.guqsuy.org/ http://statuto-associazione-formazione-sanitaria-onlus.dtufrq.org/ http://hotel-naviglio-grande-a-corsico.guqsuy.org/ http://corte-appello-roma-lavoro-sentenza.fkgkox.org/ http://spegnendo-pc-disattiva-modem-all-avvio.ljiwrk.org/ http://pagina-da-un-milione-di-euro.dtufrq.org/ http://immobile-in-affitto-a-pisa.uoyrgt.org/ http://file-mod-conversione-file-wav.guqsuy.org/ http://testo-venite-fedeli-angelo-c-invita.dtufrq.org/ http://41-o-36-detrazione-irpef-manutenzione.ljiwrk.org/ 3ebbdc0c5c788c89d957115fc277340d
89.159.194.* 于 2007-06-11 03:19:44发表:
ea0afe757e8bbb1fbd6262d63b5ad137 http://confronto-fondo-comune-sicav-etf.ooqqld.net.in/ http://trasformare-src-rpm-rpm-linux.mksqkw.net.in/ http://feto-gravidanza-soffio-al-cuore.hhknox.net.in/ http://offerta-lavoro-parrucchiera-bergamo-provincia.hhknox.net.in/ http://trasporto-interregionale-piemonte-valle-aosta.innltr.net.in/ http://ristorante-butteri-roma-piazza-regina-margherita.dtifhu.net.in/ http://pescara-napoli-site-sport-msn-it.innltr.net.in/ http://san-giovanni-in-persiceto-bo.mksqkw.net.in/ http://programma-ministeriale-scuola-elementare-1985.dtifhu.net.in/ http://bomboniere-solidali-medici-senza-frontiere.ooqqld.net.in/ 319dbbb4ab069a1bfb4a4d4d12c61dcd
201.244.39.* 于 2007-06-09 03:08:17发表:
94844132f0b821d3bee4740132fade48 http://windows-live-spaces-giulio-messina.akermn.org/ http://ascolta-it-s-time-michael-buble.iumzde.org/ http://sciopero-trasporto-01-12-2006.lbpwqo.org/ http://foto-sesso-porno-tetta-spagnola.hwqegr.org/ http://site-blog-kataweb-it-amore.mbxbva.org/ http://dimensioni-di-un-campo-di-pallavolo.mbxbva.org/ http://permessi-retribuiti-legge-104-92.iumzde.org/ http://copertina-dragon-ball-budokai-tenkaichi-2.iumzde.org/ http://zamagni-s-etica-ed-economia.pauhzy.org/ http://consultazione-delibere-azienda-ulss-16-padova.akermn.org/ e44c2d91c99facb894d3b26e91151560
83.32.76.* 于 2007-06-08 04:46:01发表:
1d275d7dac7ec760008ab72e71b8ef5f http://the-sims-2-trucco-pc.rpddkk.org/ http://nota-dottrinale-circa-alcune-questioni.yixkrt.org/ http://casa-vendita-ad-ostia-lido-roma.incgek.org/ http://tariffa-eccezionale-nave-tunisia-residente.whguhs.org/ http://il-teatro-va-a-scuola.bzeitz.org/ http://ritenuta-acconto-4-artigiano-appalto-condominio.zouvtz.org/ http://madre-teresa-di-calcutta-pensiero.lykglu.org/ http://calcolo-ici-2006-comune-roma.ulhxdx.org/ http://fabrizio-failla-vita-privata-it.bzeitz.org/ http://tom-tom-go-910-offerta.tpfcwv.org/ 2e2f8656ca7971267ae7180fc612fe21
200.92.142.* 于 2007-06-07 07:27:36发表:
0e1e210d28a83fea66d75f8563c81e42 http://il-gioco-e-la-fiaba.zjtbra.info/ http://parafrasi-canto-2-inferno-gratis.zjtbra.info/ http://allegato-4-d-m-186-2006.rwikgt.info/ http://estrazione-super-enalotto-16-11-2006.vkzwxs.info/ http://trasformare-un-immagine-in-icona.vkzwxs.info/ http://gioco-gratis-cellulare-motorola-pebl-u6.alflim.info/ http://ciclo-di-vita-di-un-prodotto.ytqkdb.info/ http://commissione-esame-avvocato-venezia-2006.ciymwb.info/ http://sentenza-del-tar-di-catania.lgrhpd.info/ http://x-man-conflitto-finale-scheda-film.zjtbra.info/ 6dea66dd0952ca77d762129bda0df247
190.84.213.* 于 2007-06-06 10:32:14发表:
f0cb56305094cf4fe850a3678142d527 http://collegare-router-wireless-ad-modem.qirjux.info/ http://biglietto-inviti-festa-compleanno-bimbi.qwoucn.info/ http://lettore-dvd-samsung-virtual-surround.xaotvu.info/ http://stampare-albero-file-tutto-cartella.jknrtq.info/ http://configurare-access-point-wireless-usb.lbvsgo.info/ http://programma-per-fotografare-il-desktop.qwoucn.info/ http://associazione-volontariato-ospedale-pediatrici-napoli.yyunae.info/ http://novita-foto-camera-digitale-canon.qwoucn.info/ http://scuole-di-danza-a-torino.qirjux.info/ http://datore-lavoro-deve-denunciare-atto-osceni.duajwe.info/ 11bac96dbb32ab2fd1a6f4018c996a56
190.48.101.* 于 2007-06-05 15:29:37发表:
0823fb6c4057e6d6221a4bc032868dc0 http://dimensionamento-bancone-bar.boixkk.info/ http://deborah-wells-bambi-rapidshare-de-file.dvtuzm.info/ http://fighter-sez-mantova.dhvvfi.info/ http://moto-accessorio-silenziatori-marmitte.wkermn.info/ http://arco-balestra-barnet.boixkk.info/ http://ivo-matteo-termoidraulica.boixkk.info/ http://punto-vendita-forza10-citta-salerno.boixkk.info/ http://cigno-trigoria-villa.wkermn.info/ http://liceale-seduce-professore-foto.boixkk.info/ http://museum-giubotti.kbucdn.info/ 4080af707aca2bbb96231fb1b4743d28
201.208.69.* 于 2007-06-04 20:55:23发表:
d052f5db41ab2761f33daab30678a0c2 http://pensiero-poesia-amore-non-corrisposto.nfvzoo.org/ http://scuola-interprete-e-traduttore-a-trieste.pgbdyc.org/ http://attivazione-secondo-numero-carta-sim.vprmbs.org/ http://scarica-driver-epson-stylus-c64.pgbdyc.org/ http://dlgs-241-97-art-7-bis.pgbdyc.org/ http://universita-studio-g-d-annunzio.nfvzoo.org/ http://vendere-casa-5-anno-speculazione-edilizia.dqiqbg.org/ http://orgia-scopata-anale-teen-ager.vprmbs.org/ http://hotel-green-park-quarto-inferiore.divuvu.org/ http://senofonte-anabasi-morte-ciro-versione.nfvzoo.org/ e2344a7b53a49ae4d6fdb2a64dbf9945
201.211.69.* 于 2007-06-04 01:16:23发表:
a659f09b4aaf13736dac431500448199 http://cappottogiacconipiuminowoolrich.nlamku.org/brigante-padula-cortino/index.htm http://ristoranteviabernardocenninifirenze.akqcvy.org/collezionismo-moneta-antiche-greche/index.htm http://cistiterapportosessualeastenersi.inkrxe.org/antonella-rolla-studio-aperto/index.htm http://tecnicaingrossarepene.beajbg.org/calici-degustazione-rigo/index.htm http://adattatoreseriale2fusb.inkrxe.org/mollificio-industriale-star/index.htm http://rubinettohansa.seyzuo.org/puntocasa-pinerolo/index.htm http://listinowiliertriestina.inkrxe.org/thermaltake-thunderblade-ventola/index.htm http://adattatoreseriale2fusb.inkrxe.org/griglia-freccia-dragstar-650-classic/index.htm http://uitlivellospurie.beajbg.org/macchina-caff-c3-a8-kimbo/index.htm http://googleitwwwikeait.inkrxe.org/crocefisso-memento-mori/index.htm 83869c431dabc6ba13fe3e3c64cc8ac5
190.10.213.* 于 2007-06-03 07:25:13发表:
7dfe3e77ec69291856a5bd15755476fa http://agenesiasenofrontale.bdizoa.org/cesare-pompilio-giornalista/index.htm http://masterizzatoreinternoporatile.bdizoa.org/studio-legale-scauri/index.htm http://downhillpievediteco.lskson.org/hp-pavilion-notebook-dv4356/index.htm http://bartolomeobimbopera.shxghd.org/penna-magica-visione-occhiale/index.htm http://controsoffittosimillegnopoliuretano.lskson.org/meccano-secchiello/index.htm http://scidecomivrea.sdibjo.org/elettrode-mh/index.htm http://portavetrosabbiati.shxghd.org/modellismo-paranza/index.htm http://digiquestfta6200.sdibjo.org/tettina-zio/index.htm http://giovanetteculolargo.ksibgs.org/softwer-per-tradurre-latino/index.htm http://simonetomassinibarbalunga.sdibjo.org/ecosmartshop/index.htm 691e5261e7f26fe9bfca38d324fb1940
85.218.9.* 于 2007-06-02 11:49:38发表:
72aeee84e92adfd681cda159b8941aa0 http://soniaformentiflauto.nlamku.org/sentenza-cassazione-calligrafia/index.htm http://commercializzazionecandelaprofumate.inkrxe.org/epila-istruzione/index.htm http://recordatiamianto.inkrxe.org/algol-fallimento/index.htm http://agorauniparthenope.nlamku.org/trasgressore-richiesta-copia-certificato-taratura/index.htm http://rubinettohansa.seyzuo.org/impdap-mutui/index.htm http://pagilegialla.beajbg.org/vanillas-vercelli/index.htm http://saldarelinoleum.beajbg.org/tintura-madre-salvia-officinalis/index.htm http://metzelerocchiale.akqcvy.org/famiglia-ferdinando-napoli-goya-capodimonte/index.htm http://antennaverticalevhfautocostruita.beajbg.org/trojan-win32-resurrector-a/index.htm http://edilserviceattrezzaturaedile.nlamku.org/dea-scacciata-olimpo/index.htm 63aa5c5d6850cbd0ab7a0b3644130d9e
80.32.120.* 于 2007-06-01 16:55:38发表:
5e483fcd872f01e60836c191f3af305b http://musicolwinxpadova.leikrf.org/dottor-falken/index.htm http://servletinterrogazionidb.gkgobd.org/umorismo-satira-008000/index.htm http://siglacipciopagentespeciale.pdjkai.org/elaborare-registax/index.htm http://servletinterrogazionidb.gkgobd.org/fedina-irlandesi/index.htm http://topcollegescomvscholarshiphtml.leikrf.org/macchinario-lavorazione-creta-vendita/index.htm http://fotoabbassamenticartongesso.leikrf.org/giornata-di-ivan-denissovic/index.htm http://canalecinqueit.mljuyb.org/clonare-imei/index.htm http://servletinterrogazionidb.gkgobd.org/agriturismo-custera-luserna-san-giovanni/index.htm http://1636festamalpasso.leikrf.org/collettori-solario-e-riscaldamento/index.htm http://cooppescatoriposillipo.gkgobd.org/foto-giuramento-marina-militare-spezia-1998/index.htm 5447788e0ee79eeca3d64876f41eb1cf
201.208.0.* 于 2007-05-30 09:18:35发表:
a243ad8d63f4c29b22a45c15d5910eb1 http://ifrtox.org/atribuicoes/atribuicoes-orientador-escolar.html http://wfcqxw.org/moto/moto-clube-porto-velho.html http://mnopyi.org/mystery/mystery-no-rio-de-janeiro-pua.html http://wfcqxw.org/tabela/tabela-da-copa-do-mundo-de-2006.html http://ifrtox.org/boate/boate-papo.html http://pegekq.org/ver/ver-homem-tesudos-gostosos-sunga.html http://pegekq.org/cantai/cantai-senhor-cantico-novo-cantai-senhor.html http://pegekq.org/maquina/maquina-operatriz-torno.html http://wfcqxw.org/simulacao/simulacao-irs-2006.html http://ifrtox.org/peticao/peticao-propaganda-enganosa-capitalizacao.html a91f06099d8916d08fc86aebeef191c8
65.94.185.* 于 2007-05-29 08:09:06发表:
7cc5a2023dd9e4dbb6a2b664a0459d8a http://grpytd.org/lei/lei-n-12-490-97.html http://xvqeoy.org/hacker/hacker-e-craker.html http://xwqumn.org/chapinha/chapinha-cabelo-molhado.html http://xwqumn.org/galeria/galeria-foto-filme-terra-encantada-gaya.html http://lcitij.org/peticao/peticao-denuncia.html http://grpytd.org/art/art-passo-apasso.html http://sxrzpn.org/adesivo/adesivo-digital-jato-tinta-gratis.html http://xwqumn.org/tabela/tabela-de-glicidios.html http://xvqeoy.org/declaracao/declaracao-insento.html http://sxrzpn.org/cesta/cesta-natalinas.html ea84313ff4cf4b8bb8ec851c693c83a5
190.73.228.* 于 2007-05-16 03:18:54发表:
http://379a8a5445a6f4776c10c667c7eecedc-t.qwoypw.info 379a8a5445a6f4776c10c667c7eecedc http://379a8a5445a6f4776c10c667c7eecedc-b1.qwoypw.info 379a8a5445a6f4776c10c667c7eecedc http://379a8a5445a6f4776c10c667c7eecedc-b3.qwoypw.info b43a48a848da56275457e93295654b68
weou 于 2005-10-30 00:24:37发表:
好
晴 于 2005-09-28 00:39:16发表:
不错,学习了
爱的边缘 于 2005-09-01 00:35:17发表:
支持
bluesky22 于 2005-08-19 18:30:22发表:
强烈支持~~
WWW 于 2005-08-16 10:32:12发表:
支持
ming 于 2005-07-20 00:07:46发表:
支持
cooc 于 2005-05-29 09:50:39发表:
顶