¼gÓµ{¦¡ÁÙ¦³¡u¤ß¸ô¾úµ{¡v¡H¯u¬O¨£°¤F¡C¦ý¬O¤£ÄF§AÌ¡A§Ú¯uªº¦³¨Ç·Qªk¡C°_·½¬O³Ìªñ¼g²Õ¦X»y¨¥ªº¤H¯uªº¶V¨Ó¶V¤Ö¤F¡A³s¤j³°ªº Aogo ·J½s¤p¯¸ ( ¤j³°ºÙ²Õ¦X»y¨¥¬°·J½s»y¨¥ ) ªº°Q½×°Ï³£§N²Mªº¥i¥H¡A§ó§O»¡¥xÆW¤F¡C¬Æ¦ÜÁÙ¦³¤H»¡¡A²Õ¦X»y¨¥¤w¦º¡CÁöµM¦³ÂI¨¥¹L¨ä¹ê¡A¦ý¬O¤j®a¤@©w¤]³£¦P·N¡A²Õ¦X»y¨¥¯à°µ±o¨ì¦Ó°ª¶¥»y¨¥°µ¤£¨ìªº¨Æ¡A´X¥G¬O¨S¦³¤F¡C¤j®a¤]³£¦P·N¡A°ª¶¥»y¨¥¯à°µ±o¨ìªº¡A²Õ¦X»y¨¥¤@©w¯à°µ±o¨ì¡C¨º²{¦b²Õ¦X»y¨¥ÁÙ¦³¤°»òÀu¶Õ©O¡H©Î³\¦b½ÆÂøªºpºâ¹Lµ{¡AÁÙ¦³¨Ç³\ªºÀu¶Õ¡A¤£¹L¤]¥i¯à«Ü§Ö´N¨S¤F¡C
³Ìªñ´X¦~ ( ¥Á°ê 106 ¦~¡A¦è¤¸ 2017 ¦~¥ª¥k )¡A³\¦h°ê®a³£·Q¿ìªk¦b¤¤¤p¾ÇùØ¡A§âµ{¦¡³]p¦C¬°¾Ç¥Í¾Ç²ßªº¶µ¥Ø¡A§Ú°ê¬F©²¤]·Q±À¦æ³o¬Fµ¦¡C¦ý¬O¥H¤p¤ì°¸³o¼Æ¤Q¦~¨ÓªºÆ[¹î¡A·Qn¾Ç²ßµ{¦¡³]p¡A«D±on¨ã¦³²M´·ªºÅÞ¿è¥H¤Î°ò¥»ªº¼Æ¾Ç¬°°ò¦¡F¦ý³oÁÙ¤£¬O«D±`«nªº¡A§ó«nªº¬On¦³°í¼Ýªº@¤ß¡C«e±¨âÓ±ø¥ó¡A³\¦h´¼°Ó°ªªº¤H¡A»´¦Ó©öÁ|´N¯à°µ¨ì¡F¦ý¬OÁ¿¨ì@¤ß¡A´N¤£¬O¤@¯ë¤H¯à°µ¨ì¤F¡C¤×¨ä¬O¦b¾ú©¡¬F©²ªº¬Fµ¦¡u¹ª»R¡v¤U¡A§Æ±æ¯à´î§C¤U¤@¥NªºÀ£¤O¡A©ó¬O³y¦¨¯à°÷¦YW@³Ò¡B¯à¦³«í¤ß¦³¼Ý¤Oªº¦~»´¤H¤w¸g¶V¨Ó¶V¤Ö¡C³oºØª^³ò¤§¤U¡A¯à±À¼sµ{¦¡³]p¡A§Ú¬Ý¬O«ÜÃø¡C
¦n¤F¡Aµo¨cÄÌ´N¦¹¥´¦í¡C¤p¤ì°¸¥´ºâ¦b±µ¤U¨Óªº´X³¹¤º¡A°O¿ý¤p¤ì°¸¼¶¼g±N¬Y¤@¥¿¾ã¼Æ¤À¸Ñ¦¨½è¦]¼Æ¼¿nªº¹Lµ{¡C¦b³o¹Lµ{¤º¡A·|¥Î¨ì´XӰƵ{¦¡¡A¨Ò¦p¡A¨D¤p©ó¬Y¥¿¾ã¼Æªº½è¼Æ¡B¨D¤@¥¿¾ã¼Æªº¥¤è®Ú¡B§PÂ_¤@¥¿¾ã¼Æ¬O§_¬°½è¼Æµ¥¡C¤p¤ì°¸Ä±±o¥¦Ì®¼ºÞ¥Îªº¡A¦]¦¹§â¥¦Ì»s§@¦¨°ÊºA³sµ²µ{¦¡®w ( dynamic-link library )¡C¦]¦¹³o¤@³¹ªº¼ÐÃD´NÅܦ¨¡u½è¼Æ (1)¡@ݽͰʺA³sµ²µ{¦¡®w¡v¡A¬Ý¦ü¨âÓµLÃöªº¥DÃD¡A«o¦X¦b¤@°_¤F¡C
¨Æ¹ê¤W¡A¦b Win64 ¨t²Î¤º¡A·Qn»s§@°ÊºA³sµ²µ{¦¡®w¡A©M¦b Win32 ¨t²Î´X¥G¤@¼Ë¡C°ÊºA³sµ²µ{¦¡®w¥i¥H¬Ý¦¨¬O¤@¨Ç°Æµ{¦¡ªº¶°¦X©Î¬O¬Y¨Ç¸ê·½ªº¶°¦X¡C³o¨Ç°Æµ{¦¡©Î¬O¸ê·½¡A³£¬O³Q¨ä¥Lµ{¦¡©Ò©I¥s©Î¨Ï¥Î¡A©Ò¥H¤£»Ýn«Ø¥ßµøµ¡¡A¤]¤£»Ýn°T®§°j°é©Î²×µ²µøµ¡ªºµ{¦¡½X¡C¨CӰʺA³sµ²µ{¦¡®wªº®æ¦¡³£©T©wªº¡A©³¤U´N¥ý¨Ó¬Ý¬Ý°ÊºA³sµ²µ{¦¡®wªº¼Ë¤l¡G
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20
21 22 23 24
25 26 27 28
29 30 31 32
33 34 35 36
37 38 39 40
41 42 43 44
45 46 |
OPTION CASEMAP:NONE
OPTION WIN64:7
;°²¦p»Ýn¥Î¨ì¥]§tÀÉ¡A¨º»ò¥i¥H¦b¦¹³B©w¸q
INCLUDE WINDOWS.INC
INCLUDELIB KERNEL32.LIB
;*****************************************************************************************
.DATA?
;¦¹³B©w¸q¥¼ªì©l¤ÆªºÅܼÆ
;*****************************************************************************************
.CODE
;-----------------------------------------------------------------------------------------
;¶i¤J¡þÂ÷¶}°Æµ{¦¡ªº¶i¤JÂI
DLLEntry PROC hInstance,dwReason,dwReserved
mov rax,dwReason
.IF rax==DLL_PROCESS_ATTACH
;«O¦shInstance
;ªì©l¤Æ°ÊºA³sµ²µ{¦¡®w»Ýnªº¦UºØ¸ê·½
.IF ;ªì©l¤Æ¦¨¥\
mov rax,TRUE
.ELSE
mov rax,FALSE
.ENDIF
.ELSEIF rax==DLL_THREAD_ATTACH
;ÄÀ©ñ°ÊºA³sµ²µ{¦¡®w¨Ï¥Îªº¸ê·½
.ELSEIF rax==DLL_THREAD_DETACH
;¬°·sªº°õ¦æºü¤À°t¸ê·½
.ELSEIF rax==DLL_PROCESS_DETACH
;¬°°õ¦æºüÄÀ©ñ¸ê·½
.ENDIF
DLLEntry ENDP
;¶i¤J¡þÂ÷¶}°Æµ{¦¡µ²§ô
;-----------------------------------------------------------------------------------------
SubRoutine1 PROC Param1,Param2 ;¦¹³B¬°²Ä¤@ӰƵ{¦¡ªº°Ñ¼Æ
;¦¹³B¬°²Ä¤@ӰƵ{¦¡ªºµ{¦¡½X
ret
SubRoutine1 ENDP
;-----------------------------------------------------------------------------------------
SubRoutine2 PROC ParamA,ParamB ;¦¹³B¬°²Ä¤GӰƵ{¦¡ªº°Ñ¼Æ
;¦¹³B¬°²Ä¤GӰƵ{¦¡ªºµ{¦¡½X
ret
SubRoutine2 ENDP
;*****************************************************************************************
END DLLEntry |
¤W±ªº°ÊºA³sµ²µ{¦¡®w¼ÒªO¡A¬O¥Ñ¤@ÓºÙ¬° DLLEntry °Æµ{¦¡¤Î¨âӰƵ{¦¡²Õ¦¨¡ADLLEntry °Æµ{¦¡ºÙ¬°¡u¶i¤J¡þÂ÷¶}°Æµ{¦¡¡v¡A¨CӰʺA³sµ²µ{¦¡®w³£·|¦³³oӰƵ{¦¡¡A¥¦ªº¦WºÙ¨ä¹ê¥i¥H¥ô·Nq©w¡A¥un²Å¦X²ÕĶ¾¹ªº©R¦W³W«h§Y¥i¡CÁöµM¡u¶i¤J¡þÂ÷¶}°Æµ{¦¡¡v¤]¥s°Æµ{¦¡¡A¦ý¬O¨Ã¤£¹³¨ä¥L°Æµ{¦¡¤@¼Ë¬OÅý¨ä¥Lµ{¦¡©I¥sªº¡A¦Ó¬O§@·~¨t²Î¸ü¤J©Î¨ø¸ü°ÊºA³sµ²µ{¦¡®w®É¡A¥Ñ§@·~¨t²Î©I¥s¡AÅý§@·~¨t²Î¦³¾÷·|°µ¤@¨Ç¨Æ«e³B²z©Î¬OÂ÷¶}®É§@¤@¨Ç²M°£°Ê§@¥Îªº¡C¡u¶i¤J¡þÂ÷¶}°Æµ{¦¡¡v¦³©T©wªº®æ¦¡°õ¦æ¤@¨Ç°Ê§@¡A°²¦p¤£»Ýn°µ³o¨Ç°Ê§@ªº¸Ü¡A¡u¶i¤J¡þÂ÷¶}°Æµ{¦¡¡v¤]¥i¥H¥u¬O§â 1 ¦s¤J RAX ùØ¡AµM«á§â 1 ·í¦¨ªð¦^È´N¸õÂ÷¡C
n§â©Ò¦³½è¼Æ¦C¥X¨Ó¦¨¤@±iªí¡A³o¬O¤£¥i¯àªº¡C¦¦b¦è¤¸«e¤T¦Ê¦h¦~¡A¥j§Æþ¼Æ¾Ç®a¼Ú´X¨½¼w´N¤w¸gÃÒ©ú¤F¡u¦³µL¦hÓ½è¼Æ¡v( ¨£©÷ª¨¤u§@§{ )¡C¬JµM«Ø¥ßµLªk¦³µL¦hÓªº½è¼Æªí®æ¡A¥u¯à°h¦Ó¨D¨ä¦¸¡A¥un¯à«Ø¥ß¤p©ó¬YÓ¥¿¾ã¼Æªº½è¼Æ§Y¥i¡C¦Ó 64 ¦ì¤¸ªº CPU¡A©Ò¯àªí¥Üªº¥¿¾ã¼Æ³Ì¤j¬° 264¡Ð1¡A©Ò¥H¤p¤ì°¸´N·Q¼g¥X¤@°Æµ{¦¡¡A¯à¦C¥X¤p©ó 264¡Ð1 ªº©Ò¦³½è¼Æ¡C( ¦U¦ì¬Ý¾¡A¥E¬Ý¤§¤U¡A·|¥H¬°³oӼƤ£¤j¡A¦ý¹ê»Úºâ¹L«á±oª¾¡A264¡Ð1¡×18446744073709551615¡Ü1.8447¡Ñ1019¡A¨ä¹ê¬O«Ü¤jªº¼Æ¡A¦@¦³ 20 ¦ì¼Æ¡C)
¦bºô¸ô¤W¬d¸ß¥i¥Hª¾¹D¡A¦³³\¦h¤èªk¯àpºâ½è¼Æªí¡A¤p¤ì°¸¨Ï¥Î Eratosthenes ¿z¿ïªk¡C³oÓ¤èªkªºì²z«Ü²³æ¡A©³¤U²z³oºØ¤èªk¡C°²³]·Qn¦C¥X¤p©ó N ªº½è¼Æ¡A¥i¥H¥ý¥Ñ 2 ¶}©l§â¤p©ó N ªº¥¿¾ã¼Æ¤@¤@¦C¥X¡AµM«á§â 2 ªº¿¼Æ§R¥h¡C¤§«á¦A¥Ñ 2 ¶}©l§ä¨ì²Ä¤@Ó¨S³Q§R¥hªº¼Æ¡A3¡A§Y¬°½è¼Æ¡A¦A§â 3 ªº¿¼Æ§R¥h¡C§R¥h¤§«á¦A¥Ñ 3 ¶}©l¡A§ä¨ì²Ä¤@Ó¨S³Q§R¥hªº¼Æ¡A5¡A³o´N¬O¤U¤@Ó½è¼Æ¡A¦A§R¥h 5 ªº¿¼Æ¡CµM«á¥Ñ 5 ¶}©l¡A§ä¨ì¤U¤@Ó¨S³Q§R¥hªº¼Æ¡A7¡A7 ´N¬O¤UÓ½è¼Æ¡K¡K¦p¦¹´`Àô¤£¤w¡Aª½¨ì N ¬°¤î¡Cµ²ªG¦p¤U¹Ï¡G
¦pªG¥Î Eratosthenes ¿z¿ïªk·í¦¨ºtºâªk¡A¼g¦¨¹q¸£µ{¦¡¨Ó¦C¥X½è¼Æªº¨BÆJ¡A¤jP´N¬O¡G①¥ý°t¸m N Ó¤¸¯Àªº°}¦C¡C②³]¤@Ó¨â¼hªº°j°é¡A²Ä¤@¼h°j°é¥Ñ 2 ¶}©l¡A¨ì N µ²§ô¡A¨C¤@¦¸³£¥ýÀˬd¦¹¼Æ¬O§_¤w³Q§R°£¡A¦pªG§R°£¡A´N¤£¶i¤J²Ä¤G¼h°j°é¡Aª½±µ¸õ¨ì²Ä¤@¼h°j°éªº¤U¤@Ó¼ÆÄ~Äò¡C¦pªG¨S³Q§R°£¡Aªí¥Ü¦¹¼Æ¬°½è¼Æ¡AµM«á¶i¤J²Ä¤G¼h°j°é¡C③²Ä¤G¼h°j°é¥Ñ¸Ó¼Æ¶}©l¡Aª½¨ì N µ²§ô¡A¥Dn¥Øªº¬OÀˬd½ü¨ìªº¼Æ¬O§_¬°¸Ó¼Æªº¿¼Æ¡A¦pªG¬O«h§R°£¡C④µ²§ô¡C
Eratosthenes ¿z¿ïªkªºì²zÁöµM²³æ¡A¦ý¬O¦pªG N «Ü¤j®É¡A¯ÊÂI´N·|Åã²{¥X¨Ó¡A¨º´N¬O¡G
¦]¦¹¦³¥H¤Uªº§ï¶i¤èªk¡C
©³¤U»¡©ú«Ø¥ß½è¼Æªí®É¡A¦p¦ó¼W¶i³t«×¡C¦]¬°©³¤Uªº»¡©ú¡A¤Ó¹L©óº¾¸H¡A»Ý°t¦Xì©l½X¡A¬Û¤¬¾\Ū¡A¤j¬ù¤~¯à¤F¸Ñ¡C
¥Î²Õ¦X»y¨¥¡A´N¯àÀ±¸É²Ä¤@Ó¯ÊÂI¡A¦]¬°²Õ¦X»y¨¥«Ü¾Õªø³B²z¦ì¤¸¡A¦]¦¹¤p¤ì°¸§ï¥Î¥H¤@¦ì¤¸¥N´À¤@ӼơA¦Ó¤£¬O¥Î¤@Ӧ줸²Õªí¥Ü¤@ӼơC¥t¥~¡A°¸¼Æ¤¤´N¥u¦³ 2 ¬O½è¼Æ¡A¬G°®¯ÜÃB¥~³B²z 2¡AµM«á§â°¸¼Æ¥þ³¡§R¥h¡A³o¼Ëªº¸Ü¤@Ӧ줸²Õ´N¯à¥Nªí 16 ӼƤF¡C¤]´N¬O»¡¡A²Ä¹sӦ줸²Õªº²Ä¹s¦ì¤¸¥Nªí 3¡B²Ä¤@¦ì¤¸¥Nªí 5¡B²Ä¤G¦ì¤¸¥Nªí 7¡B²Ä¤T¦ì¤¸¥Nªí 9¡K¡A¨£¤U¹Ï³Ì©³¤U¤@¦æªº¥Õ¦â¦r¡C¦]¦¹¦pªG¬O²Ä P Ӧ줸²Õªº²Ä Q Ӧ줸¡A©Ò¥Nªíªº¼Æ¥i¥H»´©öºâ¥X¬O¡u16P¡Ï2Q¡Ï3¡v¡A·íµM P¡BQ §¡±q 0 ¶}©l¡AQ ¥²¶·¬O 0 ¨ì 7 ªº¾ã¼Æ¡C¨Ò¦p¡A²Ä 3 Ӧ줸²Õªº²Ä 4 Ӧ줸¡A¥Nªí 59¡C¤Ï¹L¨Ó¡A¦pªGn¨D¬YÓ©_¼Æ¡AX¡A¦b²Ä´XӦ줸²Õ ( ¥H P ªí¥Ü ) ùرªº²Ä´XӦ줸 ( ¥H Q ªí¥Ü )¡A¥i¥H¸g¥Ñ¤U±¨BÆJºâ¥X¡G
¡@¡@P¡×( X¡Ð3 )¡Ò16 ªº°Ó¼Æ ¡@¡@Q¡×( X¡Ð3 )¡Ò16 ªº¾l¼Æ¡A¦A°£¥H 2
°t¸m°O¾ÐÅé®É¡A¤@¯ë¬O©I¥s GlobalAlloc¡A¥i¥H¥Î GPTR °Ñ¼Æ¨Ï©Ò°t¸mªº°O¾ÐÅ餺®e§¡³]¬° 0¡C¦]¦¹¤p¤ì°¸³]©w¡GY¬YӦ줸¬° 0¡Aªí¥Ü¦¹¦ì¤¸©Ò¥Nªíªº¼Æ¬°½è¼Æ¡FY¬YӦ줸¬° 1¡Aªí¥Ü¦¹¦ì¤¸©Ò¥Nªíªº¼Æ¤£¬O½è¼Æ¡C¤@¶}©l¡A¥ý°²©w©Ò¦³ªº¼Æ§¡¬°½è¼Æ¡A¬G¨CӦ줸³£¬° 0¡A¦ý¦pªG¬Y¼Æ¬O 2 ªº¿¼Æ¡A©Î¨ä¥L¼Æªº¿¼Æ¡Aªí¥Ü¦¹¼Æ¥i¥H³Q¸Ó¼Æ¾ã°£¡A´N¤£¬O½è¼Æ¡AÀ³±N¦¹¦ì¤¸³]¬° 1¡C¨Ò¦p 15 ¥i³Q 3 ¾ã°£¡A¤£¬O½è¼Æ¡A¸Ó¦ì¤¸À³³]¬°¤@¡C¤£¹L 2 ¤w¸g§R°£¡A©Ò¥H±q 3 ¶}©l¡C°Ñ¦Ò¤U¹Ï¡A±zÀ³¸Ó¥i¥Hµo²{¡A¶ZÂ÷ 3 ©¹¥k¤TӦ줸³Bªº 9 ¬O 3 ªº¿¼Æ¡A¦¹¦ì¤¸À³¸Ó³]¬°¤@¡F¦A©¹¥k¤TӦ줸ªº 15 ¤]¬O 3 ªº¿¼Æ¡A¦¹¦ì¤¸¤]À³³]¬°¤@¡K¡K¡C¦pªG¨Æ¥ý§â³o¨Ç¦ì¤¸³]¬°¤@¡Aªí¥Ü§R°£ªº¸Ü¡A±N¨Ó´N¥i¥H´î¤Ö³\¦hpºâ¡C
¬JµM¦p¦¹¡A¦ó¤£¤@¶}©l´N°®¯Ü³s 5 ©M 7 ªº¿¼Æ¡A¤]¥ý§R°£¡C¤]´N¬O»¡¡A¦b°t¸m°O¾ÐÅ餧«á¡A´N¥ý§â 3¡B5¡B7 ªº¿¼Æ©Ò¥Nªíªº¦ì¤¸³]¬° 1¡A³o¼Ë´N¥i¥H´î¤Ö§ó¦hpºâ¡C°Ñ¦Ò¤U¹Ï¡A±z·|¥i¥Hµo²{¡A§R°£ 5 ªº¿¼Æ®É¡A¬O¤Ó¤@¼Æ¡A¸Ó¦ì¤¸´N¬O¥Nªí 5 ªº¿¼Æ¡F§R°£ 7 ªº¿¼Æ®É¡A¬O¤CÓ¤@¼Æ¡A¸Ó¦ì¤¸´N¬O¥Nªí 7 ªº¿¼Æ¡C·íµM¡A¦b§R°£ 5 ¿¼Æ®É¡A¦³¨Ç¥i¯à¦b§R°£ 3 ªº¿¼Æ®É¡A´N¤w¸g§R¥h¤F¡A¨Ò¦p 15¡F¦P¼Ëªº¨Æ¡A¤]µo¥Í¦b§R°£ 7 ªº¿¼Æ®É¡Cºî¦X¤Wzµ²ªG¡A²Ä¹s¡ã¥|Ӧ줸²Õªº¼ÆȤÀ§O¬O 48H¡B9AH¡B0A5H¡B0CDH¡B0B2h¡A¦p¤U¹Ï©Ò¥Ü¡C
¦pªG·Qn¦bpºâ«e¡A¨Æ¥ý§R°£ 3¡B5¡B7 ªº¿¼Æ¡A¦A¥[¤W¨C 8 ӼƲզ¨¤@Ӧ줸²Õ¡A¦Ü¤Ö»Ýn 3¡Ñ5¡Ñ7¡Ñ8 Ӧ줸¡A«ê¦n¬O 105 Ӧ줸²Õ¡C·N«ä¬O¡A¨C 105 Ӧ줸²Õ·|«½Æ¥X²{¡C¦]¦¹¥i¥H¥ý©w¸q³o 105 Ӧ줸²Õªº¸ê®Æ¡AµM«á¦b°t¸m°O¾ÐÅ餧«á¡A§â³o 105 Ӧ줸²Õªº¸ê®Æ¡A¥H²Õ¦X»y¨¥ REP MOVSB «ü¥O¡A«½Æªº¶ñ¤J°t¸m§¹¦¨ªº°O¾ÐÅ餺¡A´N¥ß¨è§R°£¤F 2¡B3¡B5¡B7 ªº¿¼Æ¡C¦ý¬O¡Anª`·Nªº¬O¡A²Ä¹sӦ줸²Õ¨Ã¤£·|«½Æ¡A¦]¬°¥Nªí 3¡B5¡B7 ªº¦ì¤¸¨S³Q§R°£¡A¦¹¤T¦ì¤¸¬° 0¡A¬O½è¼Æ¡C¦Ó¨ä«áªº 3 Ӧ줸²Õ¡A·|¦b 105 Ӧ줸²Õ¤§«á«½Æ¥X²{¡C¤p¤ì°¸¥Hµ§ºâªá¤F¤@¨Ç®É¶¡±o¨ìµ²ªG¡A«á¨Ó·Q·Qµ§ºâ«Ü¥i¯àºâ¿ù¡A«á¨ÓÁÙ¬O¼g¤FÓµ{¦¡°µ³o¥ó¨Æ¡C³Ì«á³o 105 Ӧ줸²Õ¬O¥i¬d¾\³oùØ¡C
°£¤F¤W±ªº¤èªk¤§¥~¡AÁÙ¦³´XÓ¤èªk¥i¥H´î¤Öpºâ¦¸¼Æ¡Cº¥ý¡A§ä¨ì¬YÓ½è¼Æ«á¡An§R¥h¸Ó½è¼Æªº¿¼Æ®É¡A¥i¥H±q¸Ó½è¼Æªº¥¤è¶}©l§R°£¡A¦]¬°«e±ªº¿¼Æ³£¤w¸g§R¥h¡C¨Ò¦pn§R¥h 11 ªº¿¼Æ®É¡A3¡Ñ11¡B5¡Ñ11¡B9¡Ñ11 ¥²©w³£¤w¸g¦b§R°£ 3¡B5 ªº¿¼Æ®É§R¥h¤F¡A©Ò¥H±q 11¡Ñ11 ¶}©l§R°£§Y¥i¡C¨º»ò¡An«ç»ò§ä¨ì½è¼Æªº¥¤è©O¡H¦pªG±z¥J²ÓÆ[¹î¤W¹Ï¡A·|µo²{¡G
32 ©Ò¥Nªíªº¦ì¤¸¡A¶ZÂ÷ 3 ¦³ 3 Ӧ줸»·¡C 3 ¥i¥H¼g¦¨ 1¡Ñ3 52 ©Ò¥Nªíªº¦ì¤¸¡A¶ZÂ÷ 5 ¦³ 10 Ӧ줸»·¡C10 ¥i¥H¼g¦¨ 2¡Ñ5 72 ©Ò¥Nªíªº¦ì¤¸¡A¶ZÂ÷ 7 ¦³ 21 Ӧ줸»·¡C21 ¥i¥H¼g¦¨ 3¡Ñ7 92 ©Ò¥Nªíªº¦ì¤¸¡A¶ZÂ÷ 9 ¦³ 36 Ӧ줸»·¡C36 ¥i¥H¼g¦¨ 4¡Ñ9
±q«e±´XÓ½è¼Æªº¥¤è¡A´N¯à¬Ý¥X¨Ó¤@¨Ç³W«ß¡C½è¼Æªº¥¤è¶ZÂ÷¸Ó½è¼Æ¡A¦³ ( n¡Ñ½è¼Æ ) Ӧ줸¨º»ò»·¡An ¬O±q¤@¶}©lªº¥¿¾ã¼Æ¡A¥¦¥Nªí¥Ñ¤T¶}©lªº²Ä´XÓ©_¼Æ¡C©ÎªÌ´«¤@¤è¦¡«ä¦Ò¡A§ÚÌ¥i¥H§â©Ò°t¸mªº°O¾ÐÅé¡A¬Ý¦¨¥Ñ 0 ¶}©l¨ì 100 ©Î 1000 ©Î 10000 Ӧ줸©Ò²Õ¦¨ªº¡A¨Ã·Q¦¨¨Ï¦ì¤¸²Õªº¬É®ø¥¢¡A¥ç§Y¤£¨Ï¤KӦ줸Åܦ¨¤@Ӧ줸²Õ¡C²Ä¹sӦ줸´N¥Nªí 3¡A²Ä¤@Ӧ줸´N¥Nªí 5¡K¡K²Ä¤KӦ줸¥Nªí 19¡A²Ä¤EӦ줸¥Nªí 21¡K¡K¨º»ò¡An ´N¬O©Ò°t¸mªº°O¾ÐÅ餤ªº²Ä´XӦ줸¦A¥[¤@¡CR11 ¼È¦s¾¹¡A´N¥Nªí³oÓ¼ÆÈ¡A¦bì©l½Xªº²Ä 153 ¦æ´N©w¸q¤F R11 ±q 4 ¶}©l¡A¦Ó²Ä 154¡ã160 ¦æ¡A´N¬Opºâ¥X±q¬YÓ½è¼Æ¶}©l¡A¨ì½è¼Æªº¥¤è¦³¦h¤ÖӦ줸¡C
¨CÓ½è¼Æªº¿¼Æ¶ZÂ÷¤U¤@Ó¿¼Æ¡A¦³¦h¤Ö¦ì¤¸¡H±z¤]¥i¥H±q¤W¹ÏÆ[¹î¡C¡G
3 ¶ZÂ÷ 9 ¦³ 3 Ӧ줸¡A15 ¶ZÂ÷ 9 ¦³ 3 Ӧ줸¡A21 ¶ZÂ÷ 15 ¦³ 3 Ӧ줸¡K¡K 5 ¶ZÂ÷ 15 ¦³ 5 Ӧ줸¡A15 ¶ZÂ÷ 25 ¦³ 5 Ӧ줸¡A25 ¶ZÂ÷ 35 ¦³ 5 Ӧ줸¡K¡K 7 ¶ZÂ÷ 21 ¦³ 7 Ӧ줸¡A21 ¶ZÂ÷ 35 ¦³ 7 Ӧ줸¡A35 ¶ZÂ÷ 49 ¦³ 7 Ӧ줸¡K¡K
´«¥y¸Ü»¡¡A½è¼Æªº¿¼Æ¶ZÂ÷¤U¤@Ó¿¼Æªº¦ì¤¸¼Æ¡A¶ZÂ÷©M½è¼Æ¤j¤p¤@¼Ë¡C·N«ä¬O¡A§ÚÌ¥i¥H¥H¥[ªk²Ö¶i§R°£½è¼Æªº¿¼Æ¡A¦Ó¤£¥Î¼ªk¡A¦]¬°¼ªk³t²v¸û¥[ªkºC¡C¦bì©l½Xªº²Ä 167 ¦æ´N¤wpºâ§¹¦¨¡A¨CÓ¿¼Æ¶ZÂ÷¤U¤@Ó¿¼Æªº¦ì¤¸¼Æ¡A°O¿ý¦b R8:R9 ùØ¡C¦]¬°°O¾ÐÅ餤¡A¤´¥H¦ì¤¸²Õ¤ºªº²Ä´XӦ줸ªí¥Ü¡A©Ò¥Hµ{¦¡ùØ R8:R9 ªº·N«ä¡A½è¼Æªº¿¼Æ¶ZÂ÷¤U¤@Ó¿¼Æ¦³ R8 Ӧ줸²Õ¦A¥[¤W R9 ¦ì¤¸³o»ò»·¡C
ÁÙ¦³¤@Ó¥i¥H¥[§Ö Eratosthenes ¿z¿ïªkªº¤èªk¡C¦pªG·Qn§â¤p©ó N ªº½è¼Æ¦C¥X¨Ó¡A¥H Eratosthenes ¿z¿ïªk¿z¿ï¡A¥un¿z¿ï¨ì´N¥i¥H¤F¡C¨Ò¦pn¦C¥X 100 ¥H¤Uªº½è¼Æ¡A¥un¿z¿ï±¼ 10 ¥H¤Uªº½è¼Æ¿¼Æ´N¥i¥H¤F¡C¦b§R°£ 2 ªº¿¼Æ®É¡A¥²©w·|§R°£ 2¡Ñ11¡B2¡Ñ13¡B2¡Ñ17¡K¡F¦b§R°£ 3 ªº¿¼Æ®É¡A¤]·|§R°£ 3¡Ñ11¡B3¡Ñ13¡B3¡Ñ17¡K¡F¦Ó¥B¨âÓ³£¤j©ó 10 ªº¼Æ¬Û¼©Ò±oªº¼¿n¤@©w¶W¹L 100¡A¨Ò¦p 11¡Ñ11¡×121¡CºîÆ[¤W±ªº²z¥Ñ¡A´N¥i±oª¾¡A¥u»Ý§R°£¨ì´N¥i¥H¤F¡C
¤@¼Æªº¥¤è®Ú¥i¥H¥Î FPU «ü¥O¡AFSQRT pºâ¡A¦ý¬O³oÓ«ü¥O¥u¯àpºâ¤p©ó 9223372036854775807 ( ¡×263¡Ð1 ) ªº¥¤è®Ú¡A¶W¹L³oӼơA¥u¦n¥Î¤û¹yªk¨D¨ì¾ã¼Æ¦ì¡C¦³Ãö¤û¹yªk¨D¤@¼Æ¤§¥¤è®Ú¡A¥i¥H°Ñ¦Ò¤j³°³Õ«È¶éªº¡u¤@Ó Sqrt ¨ç¼Æ¤Þµoªº¦å®×¡v¤å³¹¡C¤p¤ì°¸¤w¸g¼¶¼g¦n¤@ӰƵ{¦¡¡Asquare_root¡A¥i¨Ñ©I¥s¡C¥H square_root pºâ¨Ï¥ÎªÌ©Ò¿é¤J¼ÆȪº¥¤è®Ú¡A¨Ã±N¨äÂàÅܦ¨ SqrtByte ¤Î SqrtBit¡C³o¨âÓÅܼơA¤À§O¥Nªí©Ò¿é¤J¼ÆȪº¥¤è®Ú¡A¦b©Ò°t¸m°O¾ÐÅ骺²Ä SqrtByte ¦ì¤¸²Õªº²Ä SqrtBit ¦ì¤¸ ( ¨£µ{¦¡½X²Ä 107¡ã119 ¦æ )¡C¦bµ{¦¡½Xªº²Ä 153 ¦æ¡A³]©w R11 ¬°¥|¡A´N¬O¶}©l§R°£ 11 ªº¿¼Æ¡A11 ªº¿¼Æ§R§¹¡A´N½ü¨ì 13 ªº¿¼Æ¡A13 ªº¿¼Æ§R§¹¡A´N½ü¨ì 17 ªº¿¼Æ¡K¡Kª½¨ì²Ä 188¡ã191 ¦æ¡A´N¬OÀˬd¬O§_¤w¸g§R°£¨ì¤F¡C
¬J¤wpºâ¥X½è¼Æ¦Cªí¡An§PÂ_¬YÓ¥¿¾ã¼Æ¬O§_¬°½è¼Æ¡A´N¤£¬O¥óÃø¨Æ¤F¡C¥un¥H¸Ó¥¿¾ã¼Æ·í°µ³Q°£¼Æ¡A§â¤p©ó¸Ó¥¿¾ã¼Æªº½è¼Æ·í°µ°£¼Æ¡A°µ°£ªk¹Bºâ¡A¦p¯à¾ã°£¡A¨º»ò¸Ó¥¿¾ã¼Æ´N¤£¬O½è¼Æ¡F¦pªG©Ò¦³¤p©ó¸Ó¥¿¾ã¼Æªº½è¼Æ¡A³£¤£¯à¾ã°£¸Ó¥¿¾ã¼Æ¡A¨º»ò³oÓ¥¿¾ã¼Æ´N¬O½è¼Æ¡C¤£¹L¬°¤F¥[³t¡A¥i¥H¤£»Ýn§â©Ò¦³½è¼Æ¦C¥X¨Ó¡A¤~°µ°£ªk¹Bºâ¡C¤p¤ì°¸ªº°µªk¬O¡A¥un¤@§ä¨ì½è¼Æ¡A´N¥ß¨è¬Û°£¡C³o¼Ë´N·|¨Ï³t²vÅܧ֫ܦh¡C¦]¬°¥u»Ý§PÂ_¬O§_¬°½è¼Æ§Y¥i¡A¥t¥~¤]¥i«ü¥X¬Oþ¤@Ó½è¼Æ¯à¾ã°£¸Ó¥¿¾ã¼Æ¡C
Á¿¤F³o»ò¦h¡A³o¤@³¹n»s§@¤TӰƵ{¦¡¡Gsquare_root¡Bfind_prime¡Bis_prime¡A¨ä¥\¥Î¤À§O¬O¨D¥X¬Y¼Æªº¥¤è®Ú¡B¨D¥X¤p©ó©Îµ¥©ó¬Y¥¿¾ã¼Æªº©Ò¦³½è¼Æ¡B§PÂ_¬Y¥¿¾ã¼Æ¬O§_¬°½è¼Æ¡C¤p¤ì°¸·Q¡A©Î³\¥i¥H§â³o¤TӰƵ{¦¡¡A¥]¸Ë¦¨¤@ӰʺA³sµ²µ{¦¡®w ( DLL )¡A¦WºÙ¬°¡uPRIMEDLL.ASM¡v¡C¦Ó²Ä¤@ӰƵ{¦¡¡Asquare_root¡A¸û¬°Â²³æ©Ò¥H¤£¯S§O»¡©ú¡C
°Æµ{¦¡¡Afind_prime¡A¬O¥Î¨Ó¦C¥X©Ò¦³¤p©ó¬YÓ¥¿¾ã¼Æªº½è¼Æ¡A¨ä쫬¬°¡G
find_prime PROTO num:QWORD,pMemPrm:LPSTR
¥¦¦³¨âӰѼơAnum¡BpMemPrm¡C²Ä¤@ӰѼơAnum¡A¬°¥¿¾ã¼Æ¡A¶Çµ¹ find_prime °Æµ{¦¡¡A¨Ï¤§pºâ¤p©ó©Îµ¥©ó num ªº½è¼Æ¡C¦Ó¨äµ²ªG¦s©ó²Ä¤GӰѼơApMemPrm¡A©Ò«üªº°O¾ÐÅé°Ï¶ôùØ¡C³o¶ô°O¾ÐÅé¡A¥²¶·¥Ñ¥Dµ{¦¡°t¸m¦n¡A¨Ã±N¨ä¦ì§}¡ApMemPrm¡A¶Çµ¹ find_prime¡CpMemPrm ©Ò«üªº°O¾ÐÅé°Ï¶ôªø«×»P num ¤§È¦³Ãö¡A¬°Ó¦ì¤¸²Õ¡A¨Ã¥B¤@¶}©l¡A¨CӦ줸²Õ³£À³¸Ó¬O 0¡A¦]¦¹¦pªG¬O©I¥s GlobalAlloc ¨Ó«Ø¥ß pMemPrm °O¾ÐÅé°Ï¶ô¡AÀ³¨Ï¥Î GPTR °Ñ¼Æ¡C
°Æµ{¦¡¡Ais_prime¡Aªºì«¬¬O
is_prime PROTO num:QWORD
¦o¥u¦³¤@ӰѼơAnum¡Anum ¬°¥¿¾ã¼Æ¡Cis_prime ·|pºâ num ¬O§_¬°½è¼Æ¡Aªð¦^®É¡AY RAX¡×0¡Aªí¥Ü num ¬° 0 ©Î 1¡FY RAX¡×1¡Aªí¥Ü num ¬°½è¼Æ¡FY RAX ¬°¨ä¥L¼Æ¡Aªí¥Ü num ¤£¬O½è¼Æ¡A¦Ó RAX ¬°¨ä³Ì¤p¤§½è¦]¼Æ¡C
©³¤U¬O PRIMEDLL.ASM ªºì©l½X¡G
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20
21 22 23 24
25 26 27 28
29 30 31 32
33 34 35 36
37 38 39 40
41 42 43 44
45 46 47 48
49 50 51 52
53 54 55 56
57 58 59 60
61 62 63 64
65 66 67 68
69 70 71 72
73 74 75 76
77 78 79 80
81 82 83 84
85 86 87 88
89 90 91 92
93 94 95 96
97 98 99 100
101 102 103 104
105 106 107 108
109 110 111 112
113 114 115 116
117 118 119 120
121 122 123 124
125 126 127 128
129 130 131 132
133 134 135 136
137 138 139 140
141 142 143 144
145 146 147 148
149 150 151 152
153 154 155 156
157 158 159 160
161 162 163 164
165 166 167 168
169 170 171 172
173 174 175 176
177 178 179 180
181 182 183 184
185 186 187 188
189 190 191 192
193 194 195 196
197 198 199 200
201 202 203 204
205 206 207 208
209 210 211 212
213 214 215 216
217 218 219 220
221 222 223 224
225 226 227 228
229 230 231 232
233 234 235 236
237 238 239 240
241 242 243 244
245 246 247 248
249 250 251 252
253 254 255 256
257 258 259 260
261 262 263 264
265 266 267 268
269 270 271 272
273 274 275 276
277 278 279 280
281 282 283 284
285 286 287 288
289 290 291 292
293 294 295 296
297 298 299 300
301 302 303 304
305 306 307 308
309 310 311 312
313 314 315 316
317 318 319 320
321 322 323 324
325 326 327 328
329 330 331 332
333 334 335 336
337 338 339 340
341 342 343 344
345 346 347 348
349 350 351 352
353 354 355 356
357 358 359 360
361 362 363 364
365 366 367 368
369 370 371 372
373 374 375 376
377 378 379 380
381 382 383 384
385 386 387 388
389 |
;¦¹µ{¦¡¥u¥]§t¤TӰƵ{¦¡¡A¬°64¦ì¤¸ª©¥»
;1.square_root¨D¬Y¼Æ¥¤è®Ú
;2.find_prime¡G©ó°O¾ÐÅ餤¡A¦C¥X¤p©ó©Îµ¥©ó¬Y¥¿¾ã¼Æªº½è¼Æ¡C
;3.is_prime¡G§PÂ_¬Y¥¿¾ã¼Æ¬O§_¬°½è¼Æ
OPTION CASEMAP:NONE
OPTION WIN64:7
INCLUDELIB KERNEL32.LIB
GlobalAlloc PROTO :QWORD,:QWORD
GlobalFree PROTO :QWORD
;*****************************************************************************************
.CODE
;-----------------------------------------------------------------------------------------
DLLEntry PROC hInstance,dwReason,dwReserved
mov rax,1
ret
DLLEntry ENDP
;-----------------------------------------------------------------------------------------
;¨Dnumªº¥¤è®Ú¡A§â¥¤è®Úªº¾ã¼Æ³¡¥÷¦s©óRAX«áªð¦^¡CYnum¡Ø7fffffffffffffffh¡A¥ÎNDP(FPU)¹B
;ºâ¡FY¶W¹L¡ANDPµLªk³B²z§ï¥Î¤û¹yªkpºâ(µ{¦¡½X¦ì©óbig_number¨ìsqrt_root_ok¤§¶¡)
;©I¥s«e«á¤£Åܪº¼È¦s¾¹¡GR9¡ãR15¡BRBX¡BRSI¡BRDI
;¿é¤J¡Gnum¡Ð¨Dnum¤§¥¤è®Ú¡Anum¬°µL¸¹¼Æ
;¿é¥X¡GRAX¡×®Ú¸¹num¤§¾ã¼Æ³¡¤À
square_root PROC num:QWORD
mov rdx,7fffffffffffffffh
cmp rcx,rdx
ja big_number
finit
fild num
fsqrt
fistp num
mov rax,num
jmp sqrt_root_ok
big_number: mov r8,3719550786 ;xn¡×3719550786
next_time: sub rdx,rdx
mov rax,num
div r8
add rax,r8
shr rax,1
cmp rax,r8
je sqrt_root_ok
mov r8,rax
jmp next_time
sqrt_root_ok: ret
square_root ENDP
;-----------------------------------------------------------------------------------------
;find_prime°Æµ{¦¡¥Î¨Ó·j´M¤p©ó©Îµ¥©ó¥¿¾ã¼Ænumªº©Ò¦³½è¼Æ¡Aªð¦^®É§âµ²ªG°O¿ý¦bpMemPrm©Ò«üªº¦ì
;§}¡CpMemPrm©Ò«ü°O¾ÐÅé°Ï¶ô¡A¥Ñ¤÷µ{¦¡°t¸m¡Aªø«×¬°(num/16+20h)¦ì¤¸²Õ¡C(¦]¬°°¸¼Æ¤£¶·¦û¥Î¦ì¤¸
;¡A¥B¨CӼƦû¥Î¤@¦ì¤¸¡A¬G8Ó©_¼Æ¦û¥Î¤@Ó¤¸²Õ¡A¬G°£¥H16)¡C
;©I¥s«e«á¡A¤£Åܪº¼È¦s¾¹¡GR12¡ãR15¡BRBX¡BRSI¡BRDI
;¿é¤J¡Gnum¡Ð¤@¥¿¾ã¼Æ¡Afind_prime·|pºâ¤p©ó¦¹¥¿¾ã¼Æªº©Ò¦³½è¼Æ
;¡@¡@¡@pMemPrm¡Ð°O¾ÐÅé°Ï¶ô¦ì§}¡A¨ä¤º®eÀ³¥þ¬°0¡Afind_primepºâ«á¡AY¬Y¤@¦ì¤¸¬°0¡Aªí¥Ü¸Ó¦ì¤¸
;¡@¡@¡@¡@¡@¡@¡@¡@©Ò¥Nªíªº¼Æ¬°½è¼Æ¡FY¬Y¦ì¤¸¬°1¡A¸Ó¦ì¤¸©Ò¥Nªíªº¼Æ¤£¬O½è¼Æ¡C²ÄP¦ì¤¸²Õªº²ÄQÓ
;¡@¡@¡@¡@¡@¡@¡@¡@¦ì¤¸¡A©Ò¥Nªíªº¼Æ¡×16P¡Ï2Q¡Ï3¡AP¥Ñ0¶}©l¡A0¡ØQ¡Ø7¡C
;¿é¥X¡GRAX¡Ð¤p©ó©Îµ¥©ó¥¿¾ã¼Ænumªº½è¼ÆÓ¼Æ
find_prime PROC USES rsi rdi num:QWORD,pMemPrm:QWORD
LOCAL MaxByte:QWORD,MaxBit:QWORD ;³Ì¤j¦ì¤¸¼Æ
LOCAL SqrtByte:QWORD,SqrtBit:QWORD ;numªº¥¤è®Ú¦b²Ä´XӦ줸²Õ¤ºªº²Ä´X
;¨Ï¥Î§Þ¥©¡G ;Ӧ줸
;1.pMemPrm©Ò«üªº°O¾ÐÅé°Ï¶ô¤ºªº¨CӦ줸¥Nªí¤@Ó©_¼Æ¡A¥ç§Y¤w§R°£2ªº¿¼Æ
;2.¦b¼Ð¸¹again:³B¤Î¨ä«á¼Æ¦æ¡A¸ü¤J¤@Ó105¦ì¤¸²Õªº¦r¦ê¡A´N¯à§R°£3¡B5¡B7ªº¿¼Æ
;3.¥ÑpMemPrm©Ò«ü¤§°O¾ÐÅé°Ï¶ô¶}©l¡A¬ÝþӦ줸¬°0¡A§Y¬°½è¼Æ¡F1¬°¦X¼Æ
;4.²Ä¹sӦ줸²Õªº²Ä¹s¡B¤@¡B¤G¦ì¤¸¤À§O¥Nªí3¡B5¡B7¡A²Ä¤TӦ줸¬O9¡A¦b¦¹°Æµ{¦¡ªº«e´X¦æµ{¦¡½X´N
;¡@¤w³Q§R°£¡A¬G±q²Ä¥|Ӧ줸¶}©l¡A¦¹¦ì¤¸¥Nªí11¡A¶}©l§R°£11ªº¿¼Æ¡C
;5.¦ý¬O§R°£®É¡A3*11¡B5*11¡B7*11¡B9*11³£¤w¸g§R°£¹L¤F¡A´«¥y¸Ü»¡¥un±q11*11©l´N¥i¥H¤F¡C½è¨¥¤§
; ¡A¨C¦¸§ä¨ì½è¼Æp¡An§R°£pªº¿¼Æ®É¡A¥u»Ý±qpªº¥¤è¶}©l§R¥h§Y¥i¡Aª½¦Ünum¬°¤î
;6.½è¼Æ11ªº¿¼Æ§R°£«á¡A¦A·j´M¤U¤@Ó¬O0ªº¦ì¤¸¡A¸Ó¦ì¤¸©Ò¥Nªíªº¼Æ¬°½è¼Æ¡A¦A±q¸Ó½è¼Æªº¥¤è§R¥h
;¡@¸Ó½è¼Æªº¿¼Æ
;7.«½Æ¨BÆJ6¡A¤@ª½¨ìnumªº¥¤è®Ú¬°¤î¡A§Y¥i§ä¨ì¤p©ónumªº½è¼Æ
mov rdi,rdx
mov al,48h
stosb
.IF rcx<=1
xor rax,rax ;¨Ï¥ÎªÌ¿é¤J0¡B1
.ELSEIF rcx==2
mov rax,1 ;¨Ï¥ÎªÌ¿é¤J2
.ELSEIF rcx<=4
mov rax,2 ;¨Ï¥ÎªÌ¿é¤J3¡B4
.ELSEIF rcx<=6
mov rax,3 ;¨Ï¥ÎªÌ¿é¤J5¡B6
.ELSEIF rcx<=10
mov rax,4 ;¨Ï¥ÎªÌ¿é¤J7¡B8¡B9¡B10
.ELSE
jmp over_10
.ENDIF
jmp exit_fp
;§R°£3¡B5¡B7ªº¿¼Æ¡A©Ò»Ýªº¸ê®Æ¡C¦@105Ӧ줸²Õ¡C±q²Ä¤@Ӧ줸²Õ¶}©l¡A²Ä0Ӧ줸²Õ¬O48h¡A¨S¦C¤J
multiple_of_357 DB 09ah,0a5h,0cdh,0b2h,076h,049h,0b7h,0a6h,0d9h,0d2h,02ch,079h,09eh
DB 034h,04bh,09bh,065h,0edh,092h,06eh,04dh,0b3h,0a5h,059h,0f2h,03ch
DB 069h,096h,036h,0cbh,0dah,025h,0ddh,09ah,066h,04bh,0b3h,0e4h,079h
DB 0d2h,02ch,06dh,096h,0b5h,04bh,0bah,035h,0cdh,096h,066h,0c9h,0f3h
DB 0a4h,059h,0dah,02ch,06bh,097h,074h,06bh,09ah,02dh,0cdh,092h,0e7h
DB 049h,0b3h,0b4h,059h,0d6h,02eh,0e9h,0d6h,034h,05bh,09ah,025h,0cfh
DB 093h,066h,069h,0b3h,0ach,05dh,0d2h,0adh,069h,0b6h,034h,04bh,09eh
DB 027h,0cdh,0d2h,066h,059h,0bbh,0a4h,05bh,0d3h,06ch,069h,096h,03ch
DB 04fh
;¤Uªí¬O¥Î¨Ópºâ¬YӦ줸²Õ¤º¡A¦@¦³´XӦ줸¬O¹s¡A¨Ò¦p²Ä0µ§¸ê®Æ¬O8¡A§Y¼ÆȬO0ªº¦ì¤¸²Õ¦³8Ó0
;¡F²Ä¤@µ§¸ê®Æ¬O7¡A§Y¼ÆȬO1ªº¦ì¤¸²Õ¦³7Ó0¡F²Ä¤Gµ§¸ê®Æ¬O7¡A§Y¼ÆȬO2ªº¦ì¤¸²Õ¦³7Ó0
tbl_of_no_of_0 DB 8,7,7,6,7,6,6,5,7,6,6,5,6,5,5,4,7,6,6,5,6,5,5,4,6,5,5,4,5,4,4,3
DB 7,6,6,5,6,5,5,4,6,5,5,4,5,4,4,3,6,5,5,4,5,4,4,3,5,4,4,3,4,3,3,2
DB 7,6,6,5,6,5,5,4,6,5,5,4,5,4,4,3,6,5,5,4,5,4,4,3,5,4,4,3,4,3,3,2
DB 6,5,5,4,5,4,4,3,5,4,4,3,4,3,3,2,5,4,4,3,4,3,3,2,4,3,3,2,3,2,2,1
DB 7,6,6,5,6,5,5,4,6,5,5,4,5,4,4,3,6,5,5,4,5,4,4,3,5,4,4,3,4,3,3,2
DB 6,5,5,4,5,4,4,3,5,4,4,3,4,3,3,2,5,4,4,3,4,3,3,2,4,3,3,2,3,2,2,1
DB 6,5,5,4,5,4,4,3,5,4,4,3,4,3,3,2,5,4,4,3,4,3,3,2,4,3,3,2,3,2,2,1
DB 5,4,4,3,4,3,3,2,4,3,3,2,3,2,2,1,4,3,3,2,3,2,2,1,3,2,2,1,2,1,1,0
over_10: INVOKE square_root,rcx
;®Ú¸¹num¦bpMemPrm©Ò«ü°O¾ÐÅ骺²ÄSqrtByteӦ줸²Õªº²ÄSqrtBitӦ줸¡A¥H
;SqrtByte:SqrtBit°O¿ý¤§
test rax,1 ;RAX¡×numªº¥¤è®Ú
jnz odd_0
dec rax ;Y¬°num¤§¥¤è®Ú¬°°¸¼Æ¡A´î¤@¨Ï¦¨©_¼Æ
odd_0: sub rdx,rdx ;SqrtByte¡×(RAX-3)/16¤§°Ó
sub rax,3 ;SqrtBit¡×(RAX-3)/16¤§¾l¼Æ¦A°£¥H2
mov r8,16
div r8
mov SqrtByte,rax
shr rdx,1
mov SqrtBit,rdx
;ºâ¥XpMemPrm©Ò«üªº°O¾ÐÅé°Ï¶ô¡A³Ì¦h¨ìMaxByteӦ줸²Õ¤ºªº²ÄMaxBitӦ줸
mov rax,rcx
test rcx,1
jnz odd_1
dec rax ;¨Ï¥ÎªÌ¿é¤J°¸¼Æ¡A¦]¦¹³Ì«áªº°¸¼Æ¤£¥Îpºâ
odd_1: shr rax,1 ;°£¥h°¸¼Æ
xor rdx,rdx
mov r8,8
div r8
mov MaxByte,rax
mov MaxBit,rdx ;³Ì«á¤@Ӧ줸¬O²ÄMaxByte¦ì¤¸²Õªº²ÄMaxBit¦ì¤¸
;§R°£3¡B5¡B7ªº¿¼Æ¡A¤èªk¬O§âmultiple_of_357¦r¦ê¦@105Ӧ줸²Õ¡A¶ñ¤JpMemPrm©Ò«üªº°O¾ÐÅéùØ
xor rdx,rdx
mov r11,105
div r11
mov r9,rax
or rax,rax
jz remain
again: mov rcx,r11
lea rsi,multiple_of_357
rep movsb
dec r9
jnz again
remain: mov rcx,rdx
lea rsi,multiple_of_357
rep movsb
;¦bhMemPrm°O¾ÐÅé°Ï¶ôùØ¡A¨CӦ줸¥Nªí¤@Ó©_¼Æ¡A±q²Ä0Ӧ줸²Õªº²Ä2Ӧ줸¶}©l·j´M¡A
;²Ä¤@Ó§ä¨ìªº¦ì¤¸¬°0ªºªí¥Ü¦¹¬°½è¼Æ¡A±N¨ä¿¼Æ§R¥h¡AµM«á¦A§ä¨ì¤U¤@Ӧ줸¬°¹sªº¡A´N
;¬O½è¼Æ¡K¨Ì¦¹µ{§Ç¡Aª½¨ì³Ì«á¤@Ӧ줸
mov rdi,pMemPrm
mov rsi,MaxByte
;§âpMemPrm°O¾ÐÅé°Ï¶ôªº¦ì¤¸²Õ¡B¦ì¤¸¬É®ø¥¢¡A¬Ý¦¨³sÄò¦ì¤¸¡AR11¡×²Ä´XӦ줸¡A±q0¶}
;©l¨ì(num-1)
mov r11,4 ;R11¡×4¡Aªí¥Ü¼ÆÈ11¡A¼ÆÈ¡×2*R11+3
find_a_prime: mov rax,r11
mov r8,r11
shl rax,1
inc r8
add rax,3
mov r9,rax ;RAX¡×R9¡×§ä¨ìªº½è¼Æ
mul r8 ;RAX¡×½è¼Æªº¥¤è©Ò¥Nªíªº¦ì¤¸¶ZÂ÷¸Ó½è¼Æ¦³¦h¤ÖӦ줸¡×(R11+1)*RAX
add rax,r11
mov r8,r9
mov rcx,rax
and rcx,7 ;±q½è¼Æªº¥¤è¶}©l¡A§R¥h½è¼Æªº¿¼Æ¡C
and r9,7 ;½è¼Æªº¥¤è¦b²ÄRAX:RCX³B¡A¨C¦¸¼W¥[R8:R9
shr rax,3
shr r8,3
next_multiple: cmp rax,rsi ;§R¥h¤§«e¡A¥ýÀˬdRAX:RCX¬O§_¶W¹LMaxByte:MaxBit
jb set_bit_on ;Y¨S¦³¶W¹L¡A¸õ¨ìset_bit_on
ja next_number
cmp rcx,MaxBit
ja next_number
set_bit_on: mov r10b,1
shl r10b,cl
or [rdi+rax],r10b
add rcx,r9
add rax,r8
cmp rcx,7
jbe next_multiple
inc rax
sub rcx,8
jmp next_multiple
next_number: inc r11 ;¤w¸g§R°£¸Ó½è¼Æªº¿¼Æ¡AÀˬd¤U¤@Ӧ줸©Ò¥Nªíªº¼Æ¬O§_¬°½è¼Æ
mov r10,r11 ;¤U¤@ӼƴN¬O¨ÏR11¼W¥[¤@¡A¤]´N¬O¦bpMemPrm©Ò«üªº°O¾ÐÅé°Ï¶ô
mov rcx,r11 ;ªº²ÄR11¦ì¤¸¶·§â³oÓ°O¾ÐÅé°Ï¶ôµø¬°³sÄòªº¦ì¤¸²Õ¦¨¡A¨Ï¦ì¤¸
shr r10,3 ;²Õªº¬É®ø¥¢¡A¦Ó²ÄR11Ӧ줸¬O¦b²ÄR10Ӧ줸²Õùتº²ÄRCX¦ì¤¸
and rcx,7
cmp r10,SqrtByte ;¦bÀˬd¤U¤@¦ì¤¸«e¡A¥ýÀˬd¬O§_¶W¹LSqrtByte:SqrtBit
jbe lt_max ;¦pªG¶W¹L¡Aªí¥Ü¤w¸g§R°£¤F©Ò¦³¤p©ó®Ú¸¹num©Ò¦³½è¼Æ¤§
cmp rcx,SqrtBit ;¿¼Æ¡A¸õ¦Üget_no_of_prm³B
jae get_no_of_prm
lt_max: mov al,1
shl al,cl
test [rdi+r10],al ;Àˬd¤UӦ줸¡A¦pªG¬°0¡Aªí¥Ü¤U¤@¦ì¤¸©Ò¥Nªíªº¼Æ¬°½è
jnz next_number ;¼Æ¡A¸õÅD¦Üfind_a_prime³B¡F§_«hªí¥Ü¤£¬O½è¼Æ¡A´N
jmp find_a_prime ;¸õ¨ìnext_number
;¤w¸gÀˬd¨ìnum¥¤è®Ú¡Aªí¥Ü¦bpMemPrm©Ò«üªº°O¾ÐÅé°Ï¶ô¡AªøMaxByteӦ줸²Õ¤ºªº¦ì¤¸¬°0ªÌ¬°
;½è¼Æ¡C©³¤U¬Opºâ¤p©ó©Îµ¥©ónumªº½è¼Æ¦@¦³¦h¤ÖÓ
get_no_of_prm: mov r10,OFFSET tbl_of_no_of_0
mov r8,0
mov rax,1 ;²Ä¤@Ó½è¼Æ¤£¦bpMemPrm©Ò«üªº°O¾ÐÅ餺¡A¬G¥Ñ1¶}©l
;pºâ¦bpMemPrm©Ò«ü°O¾ÐÅ餺ªº¨C¤@Ӧ줸²Õ¦@¦³´XӦ줸¬°0¡A¨Ã¥B±N¨äÁ`¥[°_¨Ó
next_8_bits: cmp r8,MaxByte
jae less_1_byte
movzx r9,BYTE PTR [rdi+r8]
movzx rsi,BYTE PTR [r10+r9]
add rax,rsi
inc r8
jmp next_8_bits
;pºâ§¹¾ãªº¦ì¤¸²Õ«áÁٳѴXӦ줸¡Apºâ¦ì¤¸¬°0ªºÓ¼Æ
less_1_byte: mov dl,[rdi+r8]
mov rcx,MaxBit
jrcxz exit_fp
@@: shr dl,1
jc nxt_bit
inc rax
nxt_bit: loop @b
exit_fp: ret
find_prime ENDP
;-----------------------------------------------------------------------------------------
;§PÂ_num¬O§_¬°½è¼Æ
;©I¥s«e«á¤£Åܪº¼È¦s¾¹¡GR12¡ãR15¡BRBX¡BRSI¡BRDI
;¿é¤J¡Gnum¡Ð§PÂ_num¬O§_¬°½è¼Æ¡Anum¥²¶·¤p©ó18446744073709551616(¡×2^64)
;ªð¦^È¡GRAX¡×0¡Aªí¥Ünum¬°0©Î1
;¡@¡@¡@¡@RAX¡×1¡Aªí¥Ünum¬°½è¼Æ
;¡@¡@¡@¡@RAX¡×¨ä¥L¼Æ¡Aªí¥Ünum¤£¬O½è¼Æ¡A¥BRAX¬°¨ä³Ì¤p¤§½è¦]¼Æ
is_prime PROC USES r12 r13 rsi rdi num:QWORD
LOCAL sqrt_n:QWORD ;¡Ôn
LOCAL hMem:QWORD
or rcx,rcx
je num_is_1_or_0
cmp rcx,1
jne chk_2_3_5
num_is_1_or_0: xor rax,rax
jmp quit
three_five DB 9ah,25h,0cdh,92h,66h,49h,0b3h,0a4h,59h,0d2h,2ch,69h,96h,34h,04bh
;ÀˬdRCX¬O§_¬°2¡B3¡B5¡A¦pªG¬Oªº¸Ü¡Aªð¦^®É¡ARAX¡×1
chk_2_3_5: cmp rcx,2
je num_is_235
cmp rcx,3
je num_is_235
cmp rcx,5
jne chk_even
num_is_235: mov rax,1
jmp quit
;ÀˬdRCX¬O§_¬°°¸¼Æ¡A¦pªG¬Oªº¸Ü¡Aªð¦^®É¡ARAX¡×2
chk_even: test rcx,1
jnz odd_number0
mov rax,2
jmp quit
;Àˬdnum¬O§_¬°3©Î5ªº¿¼Æ
odd_number0: mov rax,num
mov rcx,3
xor rdx,rdx
div rcx
or rdx,rdx
jnz chk_5
mov rax,rcx
jmp quit
chk_5: mov rax,num
mov rcx,5
xor rdx,rdx
div rcx
mov rax,rcx
or rdx,rdx
jz quit
INVOKE square_root,num
test rax,1
jnz odd_number1
inc rax
odd_number1: mov sqrt_n,rax
mov rdx,rax
;©³¤Un°t¸m°O¾ÐÅé¡A¨CÓ©_¼Æ¦û¥Î¤@¦ì¤¸¡A°¸¼Æ¤£¥²¦û¥ÎªÅ¶¡¡A¦]¦¹¨CӦ줸²Õ¥i®e¯Ç8Ó©_
;¼Æ¡A¦Ó©_¡B°¸¼Æ¬Û¹j¡A©Ò¥Hnpºâ¨ì¼ÆȤj¤p¬°RDX¡A¥un°t¸mRDX/16Ӧ줸²Õ¡A¬°¨D«OÀI¡A
;¦A¦h20hӦ줸²Õ
shr rdx,4
add rdx,20h
and rdx,0fffffffffffffff0h
INVOKE GlobalAlloc,40h,rdx ;GPTR¡×40h
mov hMem,rax
;pºâ³Ì«á¤@Ӧ줸¦bhMem«áªº²ÄR10(±q²Ä0Ӧ줸²Õ¶}©l)Ӧ줸²Õ¸Ì±ªº²ÄR11Ӧ줸
mov r10,sqrt_n
test r10,1
jnz odd_number2
dec r10
odd_number2: mov r11,r10
shr r10,4
sub r11,3
mov rdi,rax
and r11,0fh
shr r11,1
;²Ä¤@Ӧ줸²Õªº²Ä0¡B1¡B2¡B3¡B4¡B5¡B6¡B7¤À§O¥Nªí3¡B5¡B7¡B9¡B11¡B13¡B15¡B17¡Apºâ§¹
;¦¨«á¡AY¬Y¦ì¤¸¬°1¡Aªí¥Ü¦X¼Æ¡FY¬Y¦ì¤¸¬°0¡Aªí¥Ü½è¼Æ¡C¦]¦¹pºâ§¹¦¨«á¡A²Ä¤@Ӧ줸²Õ
;¬Oªº²Ä0¦ì¤¸¨ì²Ä7¦ì¤¸¤À§O¬O0¡B0¡B0¡B1¡B0¡B0¡B1¡B0¡A¥ç§Y48h¡C
mov al,48h
stosb
mov rdx,r10
;§â3¡B5ªº¿¼Æ©Ò¥Nªíªº¦ì¤¸³]¬°1
next_15bytes: mov rcx,15
lea rsi,three_five
rep movsb
sub rdx,15
jg next_15bytes
;ÀˬdhMemùتº¨C¤@¦ì¤¸¡AY¬°1¡Aªí¥Ü«D½è¼Æ¡A¦AÀˬd¤U¤@¦ì¤¸¡FY¬°0¡Aªí¥Ü½è¼Æ¡A¥ýÀˬd
;n¬O§_¯à³Q¸Ó½è¼Æ¾ã°£¡A¦pªG¯àªº¸Ü¡A«h¨ÏRAX¡×¸Ó½è¼Æ¡A¨Ã¸õ¥X¦¹°Æµ{¦¡¡A¦pªG¤£¯à¾ã°£¡A
;«h¨Ï¸Ó½è¼Æªº©Ò¦³¿¼Æ©Ò¥Nªíªº¦ì¤¸Åܬ°1¡A¦AÀˬd¤U¤@¦ì¤¸
mov rsi,hMem
mov r8,0 ;¥HR8:RCX«ü¦VhMemùتº¨CӦ줸
mov rcx,2 ;±q½è¼Æ7¶}©lÀˬd¡AR8:RCX¡×0:2¡Aªí¥Ü7
next_bit: cmp r8,r10 ;¥ýÀˬd¬O§_¶W¹Lsqrt_n¡AR10:R11¡×sqrt_n¦b²ÄR10Ӧ줸²Õùتº
jb not_max ;²ÄR11Ӧ줸
ja n_is_prime
cmp rcx,r11
ja n_is_prime
not_max: mov al,1
shl al,cl
test [r8+rsi],al
jz a_prime
inc rcx ;¦¹¦ì¤¸¥Nªíªº¼Æ¨Ã«D½è¼Æ¡A¸õ¨ì¤U¤@¼Æ
cmp rcx,8 ;Àˬd¬O§_¤w¸g¨ì¤U¤@Ӧ줸²Õ
jne next_bit
xor rcx,rcx
inc r8
jmp next_bit
;R8:RCX©Ò¥Nªíªº¼Æ¬°·s§äµÛªº½è¼Æ¡A¥ý¸ÕÅç¬O§_¯à¾ã°£num¡AµM«á¦A§R°£¸Ó½è¼Æªº¿¼Æ
a_prime: mov r9,r8
shl r9,4
mov rdx,rcx
add r9,3
shl rdx,1
add r9,rdx ;R9¡×16R8¡Ï2RCX¡Ï3¡×½è¼Æ
mov rax,num
xor rdx,rdx
div r9
or rdx,rdx
jnz indivisibility ;indivisibility¬O°£¤£ºÉªº·N«ä
push r9 ;num¯à³Q§ä¨ìªº½è¼Æ¡AR9¾ã°£
INVOKE GlobalFree,hMem
pop rax
jmp quit
;num¤£¯à³Q§äµÛªº½è¼Æ¾ã°£¡An±q¸Ó½è¼Æªº¥¤è³B¶}©l¡A§R°£¸Ó½è¼Æªº¿¼Æ¡C
indivisibility: mov rax,r9
dec rax
xor rdx,rdx
shr rax,1
mul r9 ;¸Ó½è¼Æªº¥¤è¡A¶ZÂ÷¸Ó½è¼Æ(R8:RCX©Ò«üªº¦ì¤¸)¦³RAXӦ줸
mov rdx,rax ;RAX¡×½è¼Æ¡Ñ(½è¼Æ¡Ð1)/2
and rax,7
shr rdx,3
add rax,rcx
add rdx,r8
push rcx ;RCX¬°«ü¦VhMemùتº¨CӦ줸¡A¦b«e±¥HR8:RCXªí¥Ü¡A¦]¦¹
cmp rax,7 ;¥²¶·«O¦s°_¨Ó
jbe start_to_del
sub rax,8
inc rdx
start_to_del: mov r13,r9 ;pºâR12:R13¡AR12:R13¬O¨C¦¸¼W¥[ªº½è¼Æ©Ò¥Nªíªº¦ì¤¸²Õ¼Æ
mov r12,r9 ;¤Î¦ì¤¸¼Æ
mov rcx,rax
shr r12,3
and r13,7 ;±qRDX:RCX¶}©l¡A¨C¦¸¼W¥[R12:R13¡Aª½¨ìR10:R11
chk_over: cmp rdx,r10 ;Àˬd¬O§_¶W¹LR10:R11
jb chk_not_over
ja set_1_over
cmp rcx,r11
ja set_1_over
chk_not_over: mov al,1 ;¦pªG¨S¦³¶W¹LR10:R11¡A§â¨CÓ½è¼Æªº¿¼Æ©Ò¥Nªíªº¦ì¤¸³]¬°1
shl al,cl
or [rsi+rdx],al
add rcx,r13
add rdx,r12
cmp rcx,8
jb chk_over
inc rdx
sub rcx,8
jmp chk_over
set_1_over: pop rcx ;¤w§â©Ò¦³½è¼Æ¿¼Æ©Ò¥Nªíªº¦ì¤¸³]¬°1¡An·j´M¤U¤@Ó½è¼Æ
inc rcx
cmp rcx,8
jb next_bit
sub rcx,8
inc r8
jmp next_bit
n_is_prime: INVOKE GlobalFree,hMem
mov rax,1
quit: ret
is_prime ENDP
;*****************************************************************************************
END DLLEntry |
PRIMEDLL.DEF ªº¤º®e¬O¡G
1 2 3 4 |
EXPORTS
square_root
find_prime
is_prime |
¦b¡u©R¥O´£¥Ü¦r¤¸¡vùØ¡A¨Ì¤U±¤èªk²ÕĶ¤Î³sµ²¡G
E:\HomePage\SOURCE\Win64\PRIME>uasm64 -win64 PRIMEDLL.ASM [Enter] UASM v2.46, Jan 8 2018, Masm-compatible assembler. Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved. Source code is available under the Sybase Open Watcom Public License. PRIMEDLL.ASM: 386 lines, 3 passes, 26 ms, 0 warnings, 0 errors E:\HomePage\SOURCE\Win64\PRIME>link /DLL /DEF:PRIMEDLL.DEF PRIMEDLL.OBJ [Enter] Microsoft (R) Incremental Linker Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. /SUBSYSTEM:WINDOWS /DEBUG Creating library PRIMEDLL.lib and object PRIMEDLL.exp E:\HomePage\SOURCE\Win64\PRIME>
¦b PRIMEDLL.ASM ªº²Ä 199¡ã217 ¦æ¡C¦Ó¦b tbl_of_no_of_0 ³B¡A©w¸q¤F 256 ¦U¦ì¤¸²Õ©Ò²Õ¦¨ªº°}¦C¡A¦p¤U±¡G
tbl_of_no_of_0 DB 8,7,7,6,7,6,6,5,7,6,6,5,6,5,5,4,7,6,6,5,6,5,5,4,6,5,5,4,5,4,4,3 DB 7,6,6,5,6,5,5,4,6,5,5,4,5,4,4,3,6,5,5,4,5,4,4,3,5,4,4,3,4,3,3,2 ¡K¡K
±q 0 ¨ì 255 ¨CӼƳ£¥i¥H¥H 8 Ӧ줸ªí¥Ü¡A±z¤]¯à»¡ 8 Ӧ줸¥i¥Hªí¥Ü 0¡ã255 ¦@ 256 Ó¾ã¼Æ¡C¦Ó³o 8 Ӧ줸¦³´XӦ줸¬O 0¡H¦³´XӦ줸¬O 1¡H¥i¥H°Ñ·Ó¤W±ªº tbl_of_no_of_0 °}¦C¡C¨Ò¦p²Ä 0 Ӧ줸²Õ¥Nªí 0¡A¦³ 8 Ӧ줸¬O 0¡F²Ä¤@Ӧ줸²Õ¥Nªí¼ÆÈ 1¡A¦³ 7 Ӧ줸¬O 0¡F²Ä¤GӦ줸²Õ¥Nªí¼ÆÈ 2¡A¦³ 7 Ӧ줸¬O 0¡K¡C©Ò¥H¦b²Ä 199¡ã217 ¦æ´N¬O¥H¬dªíªº¤è¦¡¡A¥hpºâ¨C 16 Ó©_¼ÆùØ¡A¦@¦³´XӦ줸¬O 0¡A´N¥Nªí¦³´XÓ½è¼Æ¡AµM«á¥þ³¡²Ö¥[°_¨Ó¡A³Ì«á°O¿ý¦b RAX ùØ¡C
¦]¬°²Ä¤@Ó½è¼Æ¬O 2¡A¤£¦b hMemPrm ©Ò«üªº°O¾ÐÅé°Ï¶ô¤¤¡A¦]¦¹ RAX ¥Ñ 1 ¶}©l¡C¦pªG num¡Õ10 ªº¸Ü¡A¤w¦b²Ä 73¡ã81 ¦æ³B²z¤F¡A©Ò¥H¥i¤jÁxªº³]©w RAX ¥Ñ 1 ¶}©l¡C
¦³¨Ç¸ê®Æ¡A¥u¦³¦b°Æµ{¦¡ùØ·|¥Î¨ì¡A¨ä¥L¦a¤è¥Î¤£µÛ¡C¨Ò¦p tbl_of_no_of_0 °}¦C¡Bmultiple_of_357 °}¦C¡A³£¥u¦b find_prime ùبϥΡA¨ä¥L¦a¤è³£¤£·|¥Î¨ì³o¨â°}¦Cªº¸ê®Æ¡C¹³³o®ÉÔ¡A¦pªGn§â°Æµ{¦¡«Ê¸Ë°_¨Ó¡A´N¥i¥H¹³¤W±ªº¼gªk¡A¦bµL±ø¥ó¸õÅD«ü¥O¤§«á¡A©w¸q³o¨Ç¸ê®Æ¡A¤£¹L³o¨Ç¸ê®Æ¡A¥u¯àŪ¨ú¡A¤£¯àקï¡A²¦³º³o¬O¦w´¡¦bµ{¦¡½X°Ï¬q¤¤ªº¸ê®Æ¡C