[FWD] Re: 也談漢字的快速顯示
>From News server: news.freesoft.cei.gov.cn
From: "Miao YuCheng" <helios@online.sh.cn>
Newsgroups: chinese.comp.linux.development
Subject: ¤]½Íº~¦rªº§Ö³tÅã¥Ü
Date: Fri, 17 Dec 1999 22:30:33 +0800
[posted and mailed]
On 17 Dec 1999, you wrote in chinese.comp.linux.development:
>³Ìªñ¥¿¦b¬ÝMichael Abrash's Graphics Programming¶Â¥Ö®Ñ,
>²`¨ü±Òµo. Áp¨t¥H«e¹ïyact, cce¤@¨Çº~Åã¾÷²zªº¤F¸Ñ, °µ¤F
>¤@¨Ç¸ÕÅç, µo²{¦pªG¥Î¼g¼Ò¦¡3Á׶}out«ü¥Oªº¸Ü, ¥i¥H¨Ï³æ¦r
>Åã¥Üªº³t«×©úÅã¥[§Ö. °µ¤F¤@¤U¤ñ¸û, ¥Î³q±`·N¸q¤Wªº§Ö³t¤è
>ªk, §Y³q¹L¨C¦¸¼g¦ì«Ì½ª±H¦s¾¹Åã¥Ü8Ópixelªº¤è®×³Ì¤Ö¤]n
>15000microseconds(1 microseconds = 1000 ns), ¦Ó¥Î¼g¼Ò
>¦¡3¥i¥H¹F¨ì5000microsendsªº³t«×¥H³æ¦rÅã¥Ü½Õ¥Î¼gº¡¥þ«Ì
>(§Y¤Ï´_½Õ¥Î¤ñ¦pwrite_hanzi³o¼Ë¤@ÓÅã¥Ü³æ¦rªº¹Lµ{²Kº¡«Ì
>¹õ, ¤]´N¬O¥]¬A¤Fpush, popªº®É¶¡, ¦pªG¼g¦b¤@Ó¹Lµ{¤¤ªÖ©w
>·|§ó§Ö¤@ÂI). ¦pªG»¡¼g¼Ò¦¡3¥Îªº¤£¦hªºì¦]¦b¤_©MEGA¤£Ý®e
>ªº¸Ü, ¨º¤\«ö·Ó²{¦bVGA¦p¦¹´¶¤Îªº±¡§Î, §Ú·Q¸Ó¤£¥Î¦A¦Ò¼{©M
>EGA¶¡ªºÝ®e©Ê¤F§a. §Úקï¤Fcce¤¤ªºÅã¥Üascii¦r²Åªº¹Lµ{,
>«·s½sĶ¦Z, ´ú¸Õ¤F¤@¤UÅã¥Üyact·½½X¤¤test¥Ø¿ý¤Uªº¤LÓ
>ASCII ART ¤å¥ó, ¤ñ¦pearth(¥ÎASCII¦r²Åµe¤@Ó±ÛÂ઺¦a²y,
>ÁÙ¦³³\¦h¨ä¥L¦nª±ªºªF¦è, ¦p¸t½Ï°Êµeµ¥, «Ü¸g¨å),
>³t«×©úÅã§Ö¤F³\¦h, ©Mgce¬Û¤ñÁÙ¬O§Ö(·Q¨Ó, gce¤£·|¬O¥Î¼g¼Ò
>¦¡3Åã¥Ü¦r²Åªº). ¦ý¦b¤å¥ó¤ñ¸û¦hªº¥Ø¿ý¤U°õ¦æ¤@¦¸lsµo²{¨S
>¦³©úÅ㪺³t«×¼W¥[, cce¤§©Ò¥HºC¬Ý¨ÓnÂk©S¤_¨÷«Ìªº°ÝÃD¤F,
>cce³q¹L«þ¨©Åã¦s¹ê²{¨÷«Ì, ¬ùn¥e¥h40000microsecondsªº®É
>¶¡, ©MÅã¥Ü¤@¾ã«Ìº~¦r¬Û¤ñ, Àu¤Æ¦Z³t«×µL©Ç¨S¦³©úÅ㪺¼W¥[.
>¦Ò¼{¥Î°_©l¦æ±½´y±H¦s¾¹(¦ôpgce¤]¬O³o¤\°µªº), ÁÙ¬O¦³¨Ç°Ý
>ÃDªº, ¤@¬O¤_64K¬M®gÅã¦sªº¨î, ¬ù¥u¯à¨÷18¦æ, 18¦æ¦ZÁÙ
>¬On¦³¤@¦¸¤j¶qªºÅã¦s--Åã¦s«þ¨©, ¦pªG¯àÁקK, ·íµM³Ì¦n.
>¤G¬O¥Î°_©l±½´y±H¦s¾¹ªº¸Ü, ¨C¦¸¨÷«Ì, ³£n«µeª¬ºA±ø, ¸Ó
>¦p¦óÁקK? ©î¤À«Ì¹õ¬O§_¯à¸Ñ¨M¦¹°ÝÃD. ¦pªG¤Wz¨âªÌ³£¤£¯à
>ÁקKªº¸Ü, ¦ôºâ¤F¤@¤U, ¨C¨÷«Ì18¦æ, ¥§¡¨C¦¸¨÷«Ì©Ò¤Æ®É¶¡
>4500microseconds, ÁöµMÁÙ¬O»·»·¤p¤_cceªº®É¶¡, ¦ý«o¤£¬O
>³Ì²z·Qªº. §Ú¦b³o¨½°Q½×, §Æ±æ¦³¹Lº~¦r©Î¹Ï§Î½sµ{¸gÅ窺ªB
>¤Í¯à»¡»¡¸Ñ¨M¤§¹D.
>
>¥tªþ§Q¥Î¼g¼Ò¦¡3¹ê²{³æ¦rÅã¥Üªº¹Lµ{:
>#void hz16_draw (int row, int col, char** hzbm);
>#row -- ¦æ
>#col -- ¦C
>#hzbm - º~¦r¦ì¹Ï
>
>hz16_draw:
> pushl %ebp
> movl %esp, %ebp
> pushl %ecx
> pushl %edx
> pushl %esi
> pushl %edi
>
> # ¥Îoffset_tableªíªº¤èªk¼W¥[³t«×,
> # µ¥®Ä¤_¤U±ª`ÄÀªº¥N½X
> movl 8(%ebp), %eax
> shll $2, %eax
> movl offset_table(%eax), %edi
> movl 12(%ebp),%edx
> shll $1, %edx
> addl %edx, %edi
>
> # simpliest but slowest
> # movl 8(%ebp), %eax
> # imul $1440, %eax
> # movl %eax, %edi
>
> movl 16(%ebp), %esi
> addl graph_mem, %edi
>
> #draw background
> movw $0x3CE, %dx
> movw $0xf00, %ax # replace 0xf with background
> outw %ax, %dx
>
> movw $0xffff, (%edi)
>
> #draw foreground
> movw $0x0000, %ax # replace 0x0 with foreground
> outw %ax, %dx
>
> # º¾¦s¾¹¤¤³£¬O¤@¼ËªºÈ, ¬G¥u¸Ë¤J¤@¦¸
> # ¸`¬ù2000microseconds :-)
> movw (%edi), %ax
> movl $18, %ecx
>draw2:
> movw (%esi), %ax
> movw %ax, (%edi)
> addl $80, %edi
> inc %esi
> inc %esi
> loop draw2
>
> popl %edi
> popl %esi
> popl %edx
> popl %ecx
> popl %ebp
> ret
>
>
>
>
--
[ debian-simplified-chinese@lists.debian.org is the mailing-list that ]
[ this mail was originally sent to, and was forwarded to this list ]
[ automatically. GB characters are also converted to Big5 at the same ]
[ time. Note that there may be errors during the conversion as this ]
[ is not done by a human! ]
Reply to: