More Related Content
Similar to Cpwk14 screen and sound (20)
More from Know Mastikate (8)
Cpwk14 screen and sound
- 1. -1-
V^d]Zg=e
V^d]o`4]eV
¢¡¤£¦¥¨§¨ ©¥
ZgJUeo5HSe7QeUdQ
;dGJ|eqGU
4|eKVoVj`LPeU4e[
pOL4eV]`LMJoVhUL
=jw`^L•ZUoVhUL
VcMM7`TQgZoH`V™pXc5dxLH`L
rL4eVQdELeqNVp4VT
G–ZUSeeVcGdM]l:
!$#
%! ')(¢(
0$1
243 56 !798@ A!B
C
8ED
F
^dZ5–`oVjw`:4eV7ZM7kT;`SeQpXc4eV4|eoLgGo]hU:
;kGNVc]:7™JdwZsN
o5–er;^Xd44eV7ZM7kT;`SeQ
o5–er;^Xd44eV7ZM7kTo]hU:
o5–er;^Xd44eV5`:q^TG4VeRRŒ7
;kGNVc]:7™oQec VeUXco`hUGHeTJhwVcMksZ–rLrM:eL
`KgMeU4eVr=–ZLQGRZ
`KgMeU5–`pH4H•e:5`:WH[WPRGH
`KgMeU4eV4|e^LG]h5–`7ZeT
`KgMeU4eV4|e^LG]hQjxL5`:5–`7ZeT
`KgMeU4eV4|eoLgGo]hU: pMMPŽ4^dG5–`Jhw
`KgMeU4eVo5hULSeQpMMH•e:u pMMPŽ4^dG5–`Jhw
rLq^TG4VeRRŒ7
`KgMeU4eVo5hUL5–`7ZeTrLq^TG4VeRRŒ7
ZgKh4eV]`LpXc4g;4VVT
G|eoLgL]`LG–ZU4eVMVVUeUNVc4`MpO•Lr]
G|eoLgL4eV]`LG–ZU4eVo5hULpXcp]G:HdZ`U•e:G–ZUqNVp4VToJ`V™qMh
r=–`gLoH`V™oLJoQjw`pLcL|ep^X•:5–`TlXJhwo4hwUZ5–`:
r^–HdZpJLLd4[i4e``4TeJ|eHdZ`U•e:JFF^L–e=dxLoVhUL
r^–HdZpJLLd4[i4e``4TeJ|eMe:]•ZL5`:HdZ`U•e:JFF
^L–e=dxLoVhUL
]jw`4eV]`L
o`4]eVNVc4`M4eVMVVUeU;|eLZL^L–e
qNVp4VToJ`V™qMh
:eLJhwT`M^TeU
r^–Ld4[i4eJ|e:eLJhwT`M^TeU;|eLZL5–`
[i4eoQgwToHgTL`4oZXe;e4o`4]eVHeTo`4]eV`–e:`g:^TeUoX5
pXc^TeUoX5MJJhw
4eVZdGOX
ZdGOX;e44eV;GMdLJi4rL]TkG5`:Ld4[i4e
ZdGOX;e44eVJ|epMMPŽ4^dG
ZdGOX;e44eV]`M
o`4]eV`–e:`g:
@TLHVhQ;LeVIIXeZdXU™4eVo5hULqNVp4VT7`TQgZoH`V™G–ZUoJ`V™qMh
Mho`vGUlo7=dwL;|e4dG,6%1
- 19. ]h
%/$.
%/8(
*5((1
$1
5('
0$*(17$
%52:1
/,*+7*5$
'$5.*5$
/,*+7%/8(
/,*+7*5((1
/,*+7$1
/,*+75('
/,*+70$*(17$
(//2:
:+,7(
%/,1. `d4V4VcQVgM
- 26. #include stdio.h
#include dos.h
main(void)
{
unsigned char key;
int ofs1,ofs2;
ofs1 = peek(0x40, 0x1a); /*base keyboard buffer offset*/
ofs2 = peek(0x40, 0x1c);
while(1)
{
do
{
key = inportb(0x0060);
if(key = 128) nosound();
}
while(key = 128);
poke(0x40, 0x1a, ofs1); /* keyboard buffer*/
poke(0x40, 0x1c, ofs2); /* offset reset */
switch( key )
{
case 2 : sound(262); delay(100); break;
case 3 : sound(294); delay(100); break;
case 4 : sound(330); delay(100); break;
case 5 : sound(349); delay(100); break;
case 6 : sound(392); delay(100); break;
case 7 : sound(440); delay(100); break;
case 8 : sound(494); delay(100); break;
case 9 : sound(523); delay(100); break;
case 1 : nosound(); exit(0);
}
}
}
/* middle c
C4=262Hz
D4=294Hz
E4=330Hz
F4=349Hz
G4=392Hz
A4=440Hz
B4=494Hz
C5=523Hz
(c) January 2007
gumtorn ruanfaigad
All rights reserved.
*/
- 28. #include graphics.h
int x, y, c;
main()
{
clrscr();
initgraph(VGA,VGAHI,);
/* LIGHTRED circle */
setcolor(LIGHTRED); circle(100,100,100);
getch();
/* LIGHTGREEN rectangle */
setcolor(LIGHTGREEN); rectangle(210,0,410,200);
getch();
/* LIGHTRED bar */
setfillstyle(SOLID_FILL, LIGHTRED); bar(220,10,400,190);
getch();
/* LIGHTRED circle with LIGHTRED floodfill */
setcolor(LIGHTRED); circle(100,210,100);
setfillstyle(SOLID_FILL, LIGHTCYAN); floodfill(100,210, LIGHTRED);
getch();
/* LIGHTMAGENTA line */
setcolor(LIGHTMAGENTA); line(0,300,100,400);
getch();
/* hello world text */
setcolor(YELLOW); outtextxy(500,0,Hello World);
getch();
/* RMUTL text */
setcolor(LIGHTCYAN);
settextstyle(SANS_SERIF_FONT,HORIZ_DIR,10);
outtextxy(200,350,RMUTL);
getch();
/* LANNA text */
setcolor(LIGHTRED);
settextstyle(TRIPLEX_FONT,VERT_DIR,8);
outtextxy(500,40,LANNA);
getch();
c=0;
do{
for( x = 0; x 639; x++)
for(y = 470; y 479; y++)
putpixel(x, y, ((x+c) / 32) );
c = c+1;
}while(!kbhit());
getch();
closegraph();
}