Trường THPT Trực Ninh B
Chào mừng bạn đã đến với Diễn đàn chính thức trường THPT Trực Ninh B. Nếu chưa có tài khoản, đăng ký ngay! Đã có tài khoản? Vui lòng đăng nhập để tham gia cộng đồng mạng lớn nhất của trường.

Trường THPT Trực Ninh B

Trực Thái, Trực Ninh, Nam Định
 
Trang ChínhTrang Chính  CalendarCalendar  GalleryGallery  Trợ giúpTrợ giúp  Tìm kiếmTìm kiếm  Thành viênThành viên  NhómNhóm  Đăng kýĐăng ký  Đăng Nhập  
Tìm kiếm
 
 

Display results as :
 
Rechercher Advanced Search
Keywords
division phồng
Latest topics
January 2019
MonTueWedThuFriSatSun
 123456
78910111213
14151617181920
21222324252627
28293031   
CalendarCalendar
Thống Kê
Hiện có 1 người đang truy cập Diễn Đàn, gồm: 0 Thành viên, 0 Thành viên ẩn danh và 1 Khách viếng thăm

Không

Số người truy cập cùng lúc nhiều nhất là 12 người, vào ngày Wed Aug 14, 2013 6:51 pm

Share | 
 

 Gõ tiếng việt trong turbo pascal

Go down 
Tác giảThông điệp
Chocolate
Thành viên nhiệt tình
Thành viên nhiệt tình


Tổng số bài gửi : 156
Điểm : 3821
Danh vọng : 4
Ngày sinh : 02/10/1995
Ngày tham gia : 24/12/2011
Tuổi : 23
Đến từ : Tp. Trực Cường

Bài gửiTiêu đề: Gõ tiếng việt trong turbo pascal   Fri Dec 21, 2012 3:03 pm

Chương trình được viết bằng ngôn ngữ Pascal.
Program Viet_Graph;
Uses Crt,Graph,Dos;
Type
Font = Array[1..256*16] of Byte;
Font2 = Array[128*16+1..256*16] of Byte;
Const
Fnt2 : Font2=
0, 0,108, 56, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
12, 24,108, 56, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
96, 48,108, 56, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
48, 16,108, 56, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
20, 40,108, 56, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
0, 0,108, 56, 0,120, 12,124,204,204,204,118, 0, 48, 48, 0,
0, 0, 56,108, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
6, 12, 56,108, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
192, 96, 56,108, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
28, 4, 56,108, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
54,108, 56,108, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
0, 0, 56,108, 0,120, 12,124,204,204,204,118, 0, 48, 48, 0,
0, 0, 56,108, 0,124,198,254,192,192,198,124, 0, 0, 0, 0,
6, 12, 56,108, 0,124,198,254,192,192,198,124, 0, 0, 0, 0,
192, 96, 56,108, 0,124,198,254,192,192,198,124, 0, 0, 0, 0,
28, 4, 56,108, 0,124,198,254,192,192,198,124, 0, 0, 0, 0,
54,108, 56,108, 0,124,198,254,192,192,198,124, 0, 0, 0, 0,
0, 0, 56,108, 0,124,198,254,192,192,198,124, 0, 48, 48, 0,
0, 0, 0, 6, 2,126,198,198,198,198,198,124, 0, 0, 0, 0,
0, 12, 24, 6, 2,126,198,198,198,198,198,124, 0, 0, 0, 0,
0, 96, 48, 6, 2,126,198,198,198,198,198,124, 0, 0, 0, 0,
0, 56, 8, 22, 2,126,198,198,198,198,198,124, 0, 0, 0, 0,
0, 54,108, 6, 2,126,198,198,198,198,198,124, 0, 0, 0, 0,
0, 0, 0, 6, 2,126,198,198,198,198,198,124, 0, 48, 48, 0,
0, 0, 56,108, 0,124,198,198,198,198,198,124, 0, 0, 0, 0,
6, 12, 56,108, 0,124,198,198,198,198,198,124, 0, 0, 0, 0,
192, 96, 56,108, 0,124,198,198,198,198,198,124, 0, 0, 0, 0,
14, 2, 60,108, 0,124,198,198,198,198,198,124, 0, 0, 0, 0,
54,108, 56,108, 0,124,198,198,198,198,198,124, 0, 0, 0, 0,
0, 0, 56,108, 0,124,198,198,198,198,198,124, 0, 48, 48, 0,
0, 0, 0, 6, 2,206,204,204,204,204,204,118, 0, 0, 0, 0,
0, 12, 24, 6, 2,206,204,204,204,204,204,118, 0, 0, 0, 0,
0, 96, 48, 6, 2,206,204,204,204,204,204,118, 0, 0, 0, 0,
0, 56, 8, 22, 2,206,204,204,204,204,204,118, 0, 0, 0, 0,
0, 54,108, 6, 2,206,204,204,204,204,204,118, 0, 0, 0, 0,
0, 0, 0, 6, 2,206,204,204,204,204,204,118, 0, 48, 48, 0,
0, 0, 12, 24, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
0, 0, 96, 48, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
0, 56, 8, 16, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
0, 0, 54,108, 0,120, 12,124,204,204,204,118, 0, 0, 0, 0,
0, 0, 0, 0, 0,120, 12,124,204,204,204,118, 0, 48, 48, 0,
0, 0, 12, 24, 0,124,198,254,192,192,198,124, 0, 0, 0, 0,
0, 0, 96, 48, 0,124,198,254,192,192,198,124, 0, 0, 0, 0,
0, 56, 8, 16, 0,124,198,254,192,192,198,124, 0, 0, 0, 0,
0, 0, 54,108, 0,124,198,254,192,192,198,124, 0, 0, 0, 0,
0, 0, 0, 0, 0,124,198,254,192,192,198,124, 0, 48, 48, 0,
0, 0, 12, 24, 0, 56, 24, 24, 24, 24, 24, 60, 0, 0, 0, 0,
0, 0, 48, 24, 0, 56, 24, 24, 24, 24, 24, 60, 0, 0, 0, 0,
17, 68, 17, 68, 17, 68, 17, 68, 17, 68, 17, 68, 17, 68, 17, 68,
85,170, 85,170, 85,170, 85,170, 85,170, 85,170, 85,170, 85,170,
221,119,221,119,221,119,221,119,221,119,221,119,22 1,119,221,119,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24,248, 24, 24, 24, 24, 24, 24, 24, 24,
0, 56, 8, 16, 0, 56, 24, 24, 24, 24, 24, 60, 0, 0, 0, 0,
0, 0, 54,108, 0, 56, 24, 24, 24, 24, 24, 60, 0, 0, 0, 0,
0, 0, 24, 24, 0, 56, 24, 24, 24, 24, 24, 60, 0, 24, 24, 0,
0, 0, 12, 24, 0,124,198,198,198,198,198,124, 0, 0, 0, 0,
54, 54, 54, 54, 54,246, 6,246, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
0, 0, 0, 0, 0,254, 6,246, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 54, 54, 54,246, 6,254, 0, 0, 0, 0, 0, 0, 0, 0,
54, 54, 54, 54, 54, 54, 54,254, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 96, 48, 0,124,198,198,198,198,198,124, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,248, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 31, 0, 0, 0, 0, 0, 0, 0, 0,
24, 24, 24, 24, 24, 24, 24,255, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,255, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 31, 24, 24, 24, 24, 24, 24, 24, 24,
0, 0, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0,
24, 24, 24, 24, 24, 24, 24,255, 24, 24, 24, 24, 24, 24, 24, 24,
0, 56, 8, 16, 0,124,198,198,198,198,198,124, 0, 0, 0, 0,
0, 0, 54,108, 0,124,198,198,198,198,198,124, 0, 0, 0, 0,
54, 54, 54, 54, 54, 55, 48, 63, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 63, 48, 55, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 54, 54, 54,247, 0,255, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,255, 0,247, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 54, 54, 54, 55, 48, 55, 54, 54, 54, 54, 54, 54, 54, 54,
0, 0, 0, 0, 0,255, 0,255, 0, 0, 0, 0, 0, 0, 0, 0,
54, 54, 54, 54, 54,247, 0,247, 54, 54, 54, 54, 54, 54, 54, 54,
24, 24, 24, 24, 24,255, 0,255, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,124,198,198,198,198,198,124, 0, 48, 48, 0,
0, 0, 0, 0, 0,255, 0,255, 24, 24, 24, 24, 24, 24, 24, 24,
0, 0, 12, 24, 0,204,204,204,204,204,204,118, 0, 0, 0, 0,
0, 0, 96, 48, 0,204,204,204,204,204,204,118, 0, 0, 0, 0,
0, 56, 8, 16, 0,204,204,204,204,204,204,118, 0, 0, 0, 0,
0, 0,108,216, 0,204,204,204,204,204,204,118, 0, 0, 0, 0,
0, 0, 0, 0, 0,204,204,204,204,204,204,118, 0, 48, 48, 0,
0, 0, 12, 24, 0,198,198,198,198,198,198,126, 6, 12,248, 0,
0, 0, 96, 48, 0,198,198,198,198,198,198,126, 6, 12,248, 0,
24, 24, 24, 24, 24, 24, 24,248, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 31, 24, 24, 24, 24, 24, 24, 24, 24,
255,255,255,255,255,255,255,255,255,255,255,255,25 5,255,255,255,
0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,
0, 0, 56, 8, 16,198,198,198,198,198,198,126, 6, 12,248, 0,
0, 0, 54,108, 0,198,198,198,198,198,198,126, 6, 12,248, 0,
255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,118,220,216,216,216,220,118, 0, 0, 0, 0,
0, 0, 0, 0,120,204,216,204,198,198,198,204,192,192, 0, 0,
0, 0, 0,254,198,198,192,192,192,192,192,192, 0, 0, 0, 0,
0, 0, 0, 0,128,254,108,108,108,108,108,108, 0, 0, 0, 0,
0, 0, 0,254,198, 96, 48, 24, 48, 96,198,254, 0, 0, 0, 0,
0, 0, 0, 0, 0,126,216,216,216,216,216,112, 0, 0, 0, 0,
0, 0, 0, 0,102,102,102,102,102,124, 96, 96,192, 0, 0, 0,
0, 0, 0, 0,118,220, 24, 24, 24, 24, 24, 24, 0, 0, 0, 0,
0, 0, 0,126, 24, 60,102,102,102, 60, 24,126, 0, 0, 0, 0,
0, 0, 0, 56,108,198,198,254,198,198,108, 56, 0, 0, 0, 0,
0, 0, 56,108,198,198,198,108,108,108,108,238, 0, 0, 0, 0,
0, 0, 30, 48, 24, 12, 62,102,102,102,102, 60, 0, 0, 0, 0,
0, 0, 0, 0, 0,126,219,219,219,126, 0, 0, 0, 0, 0, 0,
0, 0, 0, 3, 6,126,207,219,243,126, 96,192, 0, 0, 0, 0,
0, 0, 28, 48, 96, 96,124, 96, 96, 96, 48, 28, 0, 0, 0, 0,
0, 0, 0,124,198,198,198,198,198,198,198,198, 0, 0, 0, 0,
0, 0, 0, 0,254, 0, 0,254, 0, 0,254, 0, 0, 0, 0, 0,
0, 0, 0, 0, 24, 24,126, 24, 24, 0, 0,255, 0, 0, 0, 0,
0, 0, 0, 48, 24, 12, 6, 12, 24, 48, 0,126, 0, 0, 0, 0,
0, 0, 0, 12, 24, 48, 96, 48, 24, 12, 0,126, 0, 0, 0, 0,
0, 0, 14, 27, 27, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24,216,216,216,112, 0, 0, 0, 0,
0, 0, 0, 0, 24, 24, 0,126, 0, 24, 24, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,118,220, 0,118,220, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,198,198,198,198,198,198,126, 6, 12,248, 24,
0, 0, 12, 30, 12, 60,108,204,204,204,204,118, 0, 0, 0, 0,
0, 0,248,108,102,102,246,102,102,102,108,248, 0, 0, 0, 0,
0, 15, 12, 12, 12, 12, 12,236,108,108, 60, 28, 0, 0, 0, 0,
0,216,108,108,108,108,108, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,112,152, 48, 96,200,248, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,124,124,124,124,124,124,124, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
(**************)
var
R : Registers;
gd,gm,i: integer;
st : String;
ch,ch1,ch2: Char;
Fnt : Font;
(**************)
Procedure Set_Color(color : byte);
Begin
port[$3c4]:=2;
port[$3c5]:=color;
End;
(**************)
Procedure Out_Text(st : string);
Var
C16 : Array[1..16] Of Byte;
x,y,n,i,ofset,l,j : integer;
ch1 : Char;
Begin
Set_Color(GetColor);
l:=length(st);
For j:=1 To l Do
Begin
ch1:=st[j];
n:=Ord(ch1);
x:=GetX;
y:=GetY;
ofset:=80*y+(x div Cool;
For i:=1 To 16 Do
Begin
C16[i]:=Fnt[16*n+i];
ofset:=80*(y+i-1)+(x div Cool;
Mem[$A000:ofset]:=C16[i];
End;
x:=x+8;
if x>632 Then
Begin
x:=0;
y:=y+19;
End;
moveto(x,y);
End;
End;
(**************)
procedure Sch_Repl(Var S : String; Sch, Repl : String);
Var
i, j : Byte;
Begin
j := 0;
Repeat
i := Pos(Sch, S);
If i > 0 then
Begin
Delete(S, i, Length(Sch));
Insert(Repl, S, i);
j := j + 1;
End;
Until (i = 0);
End;
(**************)
Procedure Read_Font;
Var
sm,os,i : Word;
Begin
R.AX := $1130;
R.BH := 6;
Intr($10,R);
sm:=R.ES;
os:=R.BP;
For i:=1 To 128*16 Do Fnt[i]:=Mem[sm:os+i-1];
For i:=128*16+1 To 256*16 Do Fnt[i]:=Fnt2[i];
End;
(**************)
Procedure Load_Graph_Font;
Begin
R.AX := $1121;
R.CX := 16;
R.BL := 0;
R.DL :=Round(480/R.CX);
R.ES := Seg(Fnt);
R.BP := Ofs(Fnt);
Intr($10,R);
End;
(**************)
Procedure UnLoadFont;
Begin
R.AH := $11;
R.AL := $24;
R.BL := 30;
Intr($10, R);
End;
(**************)
Function Vn(S : String) : String;
Begin
Sch_Repl(S, 'aw', chr(128));
Sch_Repl(S, chr(128)+'s', chr(129));
Sch_Repl(S, chr(128)+'f', chr(130));
Sch_Repl(S, chr(128)+'r', chr(131));
Sch_Repl(S, chr(128)+'x', chr(132));
Sch_Repl(S, chr(128)+'j', chr(133));
Sch_Repl(S, 'aa', chr(134));
Sch_Repl(S, chr(134)+'s', chr(135));
Sch_Repl(S, chr(134)+'f', chr(136));
Sch_Repl(S, chr(134)+'r', chr(137));
Sch_Repl(S, chr(134)+'x', chr(138));
Sch_Repl(S, chr(134)+'j', chr(139));
Sch_Repl(S, 'ee', chr(140));
Sch_Repl(S, chr(140)+'s', chr(141));
Sch_Repl(S, chr(140)+'f', chr(142));
Sch_Repl(S, chr(140)+'r', chr(143));
Sch_Repl(S, chr(140)+'x', chr(144));
Sch_Repl(S, chr(140)+'j', chr(145));
Sch_Repl(S, 'ow', chr(146));
Sch_Repl(S, chr(146)+'s', chr(147));
Sch_Repl(S, chr(146)+'f', chr(148));
Sch_Repl(S, chr(146)+'r', chr(149));
Sch_Repl(S, chr(146)+'x', chr(150));
Sch_Repl(S, chr(146)+'j', chr(151));
Sch_Repl(S, 'oo', chr(152));
Sch_Repl(S, chr(152)+'s', chr(153));
Sch_Repl(S, chr(152)+'f', chr(154));
Sch_Repl(S, chr(152)+'r', chr(155));
Sch_Repl(S, chr(152)+'x', chr(156));
Sch_Repl(S, chr(152)+'j', chr(157));
Sch_Repl(S, 'uw', chr(158));
Sch_Repl(S, 'w', chr(158));
Sch_Repl(S, chr(158)+'s', chr(159));
Sch_Repl(S, chr(158)+'f', chr(160));
Sch_Repl(S, chr(158)+'r', chr(161));
Sch_Repl(S, chr(158)+'x', chr(162));
Sch_Repl(S, chr(158)+'j', chr(163));
Sch_Repl(S, 'as', chr(164));
Sch_Repl(S, 'af', chr(165));
Sch_Repl(S, 'ar', chr(166));
Sch_Repl(S, 'ax', chr(167));
Sch_Repl(S, 'aj', chr(168));
Sch_Repl(S, 'es', chr(169));
Sch_Repl(S, 'ef', chr(170));
Sch_Repl(S, 'er', chr(171));
Sch_Repl(S, 'ex', chr(172));
Sch_Repl(S, 'ej', chr(173));
Sch_Repl(S, 'is', chr(174));
Sch_Repl(S, 'if', chr(175));
Sch_Repl(S, 'ir', chr(181));
Sch_Repl(S, 'ix', chr(182));
Sch_Repl(S, 'ij', chr(183));
Sch_Repl(S, 'os', chr(184));
Sch_Repl(S, 'of', chr(190));
Sch_Repl(S, 'or', chr(198));
Sch_Repl(S, 'ox', chr(199));
Sch_Repl(S, 'oj', chr(208));
Sch_Repl(S, 'us', chr(210));
Sch_Repl(S, 'uf', chr(211));
Sch_Repl(S, 'ur', chr(212));
Sch_Repl(S, 'ux', chr(213));
Sch_Repl(S, 'uj', chr(214));
Sch_Repl(S, 'ys', chr(215));
Sch_Repl(S, 'yf', chr(216));
Sch_Repl(S, 'yr', chr(221));
Sch_Repl(S, 'yx', chr(222));
Sch_Repl(S, 'yj', chr(248));
Sch_Repl(S, 'dd', chr(249));
Sch_Repl(S, 'DD', chr(250));
Sch_Repl(S, '~', '');
Vn := S;
End;
(**************)
Begin
Clrscr;
gd:=0;
initgraph(gd,gm,'c:\tp\bgi');
if graphresult<>0 then
Begin
writeln(VN('Co loi do hoa'));
Readln;
End;
DirectVideo:=False;
clearDevice;
Read_Font;
TextColor(MAGENTA);
SetColor(RED);
Load_Graph_font;
st:='Xin chafo casc bajn. ';
st:=st+'Xin mowfi bajn gox tieesng Vieejt cos daasu !';
st:=st+' aasn ESC ddeer thoast';
Out_Text(VN(st));
ch:=Readkey;
MoveTo(0,20);
While ch<>#27 Do
Begin
ch1:=ch;
Out_Text(ch);
ch:=Readkey;
st:=ch1+ch;
st:=Vn(st);
If Length(st)=1 Then
Begin
ch:=st[1];
MoveTo(GetX-8,GetY);
End;
End;
directvideo:=False;
ClearDevice;
st:=VN('Tajm bieejt, hejn gawjp laji !');
Writeln(st);
moveto(0,200);
Out_Text(st);
moveto(0,400);
st:='See You Again !';
Out_Text(st);
Readln;
ClearDevice;
moveto(0,20);
TextColor(WHITE);
for i:=0 to 255 do Out_Text(chr(i)+' ');|
eadln;
closegraph;
End.


_________________
Đi lang thang về miền đơn độc
Với vầng trăng chếnh choáng
Trên yên ngựa mỏi mòn
Về Đầu Trang Go down
Xem lý lịch thành viên http://trucninhb.forumvi.com
 
Gõ tiếng việt trong turbo pascal
Về Đầu Trang 
Trang 1 trong tổng số 1 trang
 Similar topics
-
» GTA IV (PC) DVDrip

Permissions in this forum:Bạn không có quyền trả lời bài viết
Trường THPT Trực Ninh B :: Học hỏi :: Tin học-
Chuyển đến