³o¤@³¹ùØ¡A¤p¤ì°¸±N¤¶²Ð PC ùرªºp®É´¹¤ù¡A8253/8254 ´¹¤ù¡CµM«á¥H 8253/8254 ´¹¤ù±À°Ê³â¥z¨Ï³â¥zµo¥XÁnµ¡C³oÓ³â¥z¬OÁôÂæb¥D¾÷ùتº¡A¤£¬O¥D¾÷¥~±±µ¦bµ®Ä¥d«á±ªº³â¥z¡C¦´Áªº¹q¸£¨S¦³«Ü±jªºÁnµ¥\¯à¡A¶È¶È¾a¥D¾÷ªOùتº³â¥zµo¥X¡y¹Í¡zªº¤@Án¡A¨Ò¦p·í¹q¸£±Ò°Ê®É¡A¦pªG¨S¦³°ÝÃD¡A¥¦·|µo¥X¤@µuÁn¡y¹Í¡z¡A©ÎªÌ·í±z¤@¤U¤l¿é¤J¤Ó¦h«öÁä¡A¹q¸£¨Ó¤£¤Î³B²z¡A¤]´NÁä½L½w½Ä°Ï¶ñ¤J¤Ó¦h¸ê®Æ¨Ó¤£¤Î³B²z®É¡A¹q¸£³â¥z¤]·|µo¥X¡y¹Í¡zªº¤@Án³qª¾±z¡C³o¤@³¹©Ò«üªº¥u¬OÅý³oÓ³â¥zµo¥X³oºØ³æ½ÕªºÁnµ¡A¤£¬O±z·Qªº¹³¬y¦æºq¦±ªº¨ººØÁnµ¡C
¥»³¹¥½¤F¡A¦A¥H 8253/8254 ´¹¤ù¬°°ò¦¡A³]p¤@Óºë±Kp®É¾¹µ{¦¡¡A¦¹p®É¾¹¥i¥H©µ¿ð¤@¬q®É¶¡¡Aºë±K«×¹F¤@·L¬í¡A§Q¥Î¦¹¯S©Ê¡A¤p¤ì°¸¦A¼¶¼g¤@Ó¥i¥H¼u«µ¤@º¦±¤lªºµ{¦¡¡C
IBM ¦b±À¥X PC/XT ®É¡Aùرt³dp®Éªº¬O 8253 ´¹¤ù¡A¨ì¤F IBM ±À¥X AT ¯Å¹q¸£®É§ï¥Î 8254 ´¹¤ù¡A¤£¹L³o¨âÓ´¹¤ù´X¥G§¹¥þ¬Û®e¡A®t§O¦³¤G¡G8254 ¦³Åª¦^¼Ò¦¡¡A8253 «hµL¦¹¼Ò¦¡¡F¥t¥~ 8253 ¥i±µ¨üªº³Ì¤j®É¯ß¬° 2.6MHz¡A¦Ó 8254 ¬° 10MHz¡A¤£¹L¦b PC ¤W¡A¥¦Ì³£¬O±µ¦¬¥D¾÷ªO¤Wªº¤@Ó¥Û^¾_Àú¾¹©Ò²£¥Íªº®É¯ß¡A¦¹¾_Àú¾¹¨C¬í¾_Àú 1193180 ¦¸¡A©Ò¥H¹ïµ{¦¡³]p®v¨Ó»¡´X¥G¬O¬Û¦Pªº¡C¦¹¥~¥¦Ìªºp®É¤è¦¡¥i¥HÂǥѵ{¦¡ªº³W¹º¦Ó§ïÅÜ¡A©Ò¥H¤]ºÙ¬°¥iµ{¦¡p®É´¹¤ù ( programmable interval timer )¡A¤]¥iÁY¼g¬° PIT¡C
8253/8254 ¤º³¡¥Ñ¤TÓp®É³q¹D ( ©ÎªÌ»¡ 8253/8254 ¤º³¡¦³¤TÓp®É¾¹ ) ¤Î¤@Ó¼Ò¦¡±±¨î¼È¦s¾¹ ( mode control register ) ²Õ¦¨¡C³o¤TÓp®É¾¹½s¸¹¬O 0¡B1¡B2¡A¤À§O¹ïÀ³ I/O °ð 40H¡B41H¡B42H¡C³o¤TÓp®É¾¹¡A¨C¤@Óp®É¾¹³£¦³¤»ºØp®É¼Ò¦¡¡A¥i¥HÂǥѧïÅÜ 8253/8254 ¼Ò¦¡±±¨î¼È¦s¾¹«·s³W¹ºp®É¼Ò¦¡ ( ¦ý³Ì¦n¤£n³o¼Ë°µ¡A¦]¬°¨t²Î¤¤©Ò¦³ªºp®É¤u§@³£¥Ñ 8253/8254 t³d¡A¤@¥¹§ïÅÜp®É¼Ò¦¡«Ü®e©ö·í¾÷ )¡C¼Ò¦¡±±¨î¼È¦s¾¹¦b I/O °ð½s¸¹ 43H¡A¨äªø«×¶È¤@Ӧ줸²Õ¡A¤]´N¬O¤KӦ줸ªø¡A³o¤KӦ줸©Ò¥Nªí·N¸q¦p¤Uªí¡G
¦ì¤¸ | ¦ì¤¸È | ·N¡@¡@¸q |
7¡B6 | 00 | ¿ï¾Üp®É³q¹D 0 |
01 | ¿ï¾Üp®É³q¹D 1 | |
10 | ¿ï¾Üp®É³q¹D 2 | |
11 | «ü©wŪ¦^©R¥O ( ¶È 8254 ¥i¥Î ) | |
5¡B4 | 00 | «O¯d¦í¥Ø«e¼ÆÈ |
01 | ¶ÈŪ¼g¸û°ªªº¦ì¤¸²Õ | |
10 | ¶ÈŪ¼g¸û§Cªº¦ì¤¸²Õ | |
11 | ¥ýŪ¼g¸û§Cªº¦ì¤¸²Õ¡A¦AŪ¼g¸û°ªªº¦ì¤¸²Õ | |
1¡B2¡B3 | 000 | p®É¼Ò¦¡ 0 |
001 | p®É¼Ò¦¡ 1 | |
010 | p®É¼Ò¦¡ 2 | |
011 | p®É¼Ò¦¡ 3 | |
100 | p®É¼Ò¦¡ 4 | |
101 | p®É¼Ò¦¡ 5 | |
0 | 0 | ¨Ï¥Î¤G¶i¦ì®æ¦¡ªº¼ÆÈ |
1 | ¨Ï¥Î BCD ®æ¦¡ªº¼ÆÈ |
8253/8254 ¤ºªº³o¤TÓp®É¾¹¡A¨C¤@Óp®É¾¹¤W¥Ñ¤T³¡¥÷²Õ¦¨¡G
¨C·íp®É¾¹«·s³Q³W¹º«á¡A¥Ñ I/O °ð¼g¤Jªº¼ÆÈ·|³Q«O¯d¦b¬¼È¦s¾¹ùØ¡AµM«á½Æ»s¤@¥÷¨ìp¼Æ¼È¦s¾¹¤¤¡Ap¼Æ¼È¦s¾¹¨Ì®É§Ç¯ß½Ä°T¸¹¶}©l»¼´î˼ƨì¹s®É¡A«K·|¦³¤@¤èªi¸g¹L±±¨î¹h¡A°²¦p±±¨î¹h¶}±Ò¡A¦¹¤èªi°T¸¹«K·|³q¹L¿é¥XºÝ¦Ó¨ì¹F©PÃä¸Ë¸m¡A©PÃä¸Ë¸m«K¦¬¨ì¤@Ó°T¸¹¡A°²¦p±±¨î¹hÃö³¬¡A«h¿é¥XºÝ«KµL§@¥Î¡A©PÃä¸Ë¸m«K¦¬¤£¨ì°T¸¹¡C
¥Hp®É¾¹¹s¨Ó»¡¡A¥¦³Q PC ¥Î¨Ó§@¬°¨t²Î®É¯ß¡A¥¦ªº¬¼È¦s¾¹¤@¶}¾÷®É¶ñ¤J 0¡AµM«á§â³oÓ 0 ½Æ»s¨ìp¼Æ¼È¦s¾¹¤¤¡Ap¼Æ¼È¦s¾¹ªº 0 ¶}©l»¼´îÅܦ¨ 0FFFFH¡B0FFFEH¡K¡K¤@ª½¨ì¦A«×Åܬ°¹s®É¡A«Kµo¥X¤@Ó°T¸¹¡A¦¹°T¸¹¥ý«á³q¹L±±¨î¹h»P¿é¥XºÝ¨ì¹F 8259 ´¹¤ù¡A8259 ²£¥Í¤@Ó INT 8 ¤¤Â_¡C¦]¬° 8253/8254 ±µ¦¬¨C¬í 1193180 ¦¸ªº¾_Àú¡A¦Ó¥Ñ 0 ´î¨ì 0 ¦@p¼Æ 65536 ¦¸¤~²£¥Í¤@Ó¤èªi¡A©Ò¥H¨C¬í 8253/8254 ²£¥Í 18.2 ¦¸ªº²Ä¤K¸¹¤¤Â_¡C
1193180¡Ò65536¡×18.2
±`±`¦³³\¦h°ª¤â´N¬O§Q¥Î¦¹¤@¤è¦¡Àˬd INT 8¡A¨Ó¹F¦¨±`¾nªº¥Øªº¡A¦]¬°µwÅé¨C¬í·|²£¥Í 18.2 ¦¸¤¤Â_¤K¡C¥unª¾¹D¤¤Â_¤Kªº°_ÂI¡A±`¾nµ{¦¡«Ü®e©ö´N¯à´x´¤±±¨îÅv¡C¦Ü©óp®É¾¹¤@»Pp®É¾¹¤G¬O¤À§O¥Î¨Ó©w®É§ó·s DRAM °O¾ÐÅ餺ªº¸ê®Æ»P±À°Ê³â¥z¡C¥Ñ¤W±»¡©ú¥i¥Hª¾¹D¡A³o¤TÓp®É¾¹³£¤w¦³¤F©T©wªº¥Î³~¡A¦Ó¥Bp®É¾¹¹s»Pp®É¾¹¤@³£©M¨t²Îªºp®É¦³Ãö¡A¨ä±±¨î¹h¤£¯à¸gµ{¦¡Ãö³¬¡A¦Ó¥B¬¼È¦s¾¹¤ºªºp¼ÆȦpªG¥ô·N¿y§ïªº¸Ü¡A«Ü®e©ö·í¾÷¡A©Ò¥H¥u³Ñ¤Up®É¾¹¤G¥i¨Ñµ{¦¡³]p®v¨Ï¥Î¤£P¦³·í¾÷ªº¦MÀI¡A·íµM¸gÅçÂ×´Iªºµ{¦¡³]p®v¤£¦b¦¹¡C©³¤Uªºªí¬O¦C¥X¦Up®É¾¹¤º©wªº¥Î³~¤Î³]©wÈ¡G
¦WºÙ | I/O °ð | ¤º©wp ®É¼Ò¦¡ |
¥Î¡@¡@³~ |
p®É¾¹ 0 | 40H | 3 | ¨t²Îp®É |
p®É¾¹ 1 | 41H | 2 | DRAM ¨ê·s |
p®É¾¹ 2 | 42H | ¡@ | PC ³â¥z |
¼Ò¦¡±±¨î¼È¦s¾¹ | 43H | ¡@ | ³]©wp®É¾¹¤§p®É¼Ò¦¡¤Î¿é¤J®æ¦¡ |
p®É¾¹ 2 »P¹q¸£ÂǥѰð 42H ·¾³q¡A¦Óp®É¾¹ 2 ¤S»P PC ³â¥z¬Û³s¡A¦]¦¹§^¤H§ïÅÜ°ð 42H ¤§p¼ÆÈ¡A«K¥i¥H§ïÅܳâ¥zªºÀW²v¡C·íµMn¨Ï³â¥zµo¥XÁnµÁÙ±o¥´¶}p®É¾¹ 2 ªº±±¨î¹h¡A¦¹±±¨î¹h¦b°ð 61H ªº¦ì¤¸ 0¡Cp®É¾¹ 2 »P³â¥zªº³s±µ¥Ü·N¹Ï¦p¤U¡G
¦Ü©óp¼ÆÈÀ³¸Ó¶ñ¤J¤°»ò¼ÆÈ©O¡Hµª®×ÅãµM¤£¬OÁnµªºÀW²v¡C¦]¬°ÁnµÀW²v¶V¤j¡A¨C¬í®¶°Ê¶V¦h¦¸¡Ap¼Æ¼È¦s¾¹À³¸Ón«Ü§ÖªºÅܬ°¹s¡A©Ò¥Hp¼Æ¼È¦s¾¹©Ò¶ñ¤Jªº¼ÆÈn¤p¤~¦æ¡A¤]´N¬O»¡§ÚÌ©Ò¶ñ¤Jªº¼ÆȬO¬Y¼Æ°£¥HÀW²v¡C¬Y¼Æ¤S¬O¦h¤Ö©O¡H¥H C ¤j½Õªº Do ¬°¨Ò¡A¨äÀW²v¬O 262Hz¡A¤]´N¬O»¡¨C¬ín®¶°Ê 262 ¦¸¡Ap¼Æ¼È¦s¾¹¨C¤@¬ínÂk¹s 262 ¦¸¡A¦Ó 8253/8254 ¨C¬í±µ¦¬¨ì¥Û^¾_Àú¾¹ 1193180 ¦¸ªº®¶°Ê¡A©Ò¥Hp®É¾¹À³¶ñ¤J 4554¡G
1193180¡Ò262¡×4554
¦Ó Re ÀW²v¬° 294Hz¡A©Ò¥Hp¼Æ¼È¦s¾¹À³¶ñ¤J 4058¡G
1193180¡Ò294¡×4058
¨ä¾l¨Ì¦¹Ãþ±À¡C´«¥y¸Ü»¡¡Ap¼Æ¼È¦s¾¹¤ºªº¼ÆÈÀ³¬° 1193180 °£¥HÀW²v¥H«áªº°Ó¼Æ¡C
©³¤U¬O PIANO.ASM ªºì©lµ{¦¡¡A§â¥¦²ÕĶ¡B³sµ²¦n¨ÃÂà´«¦¨ PIANO.COM ¡A§Y¥i¦b DOS ©Î Win 9x DOS ¼Ò¦¡¤U°õ¦æ¡C
;§âÁä½L¼ÒÀÀ¦¨¿ûµ^ªºµ{¦¡¡G ;1¡GDo¡@2¡GRe¡@3¡GMi¡@4¡GFa¡@5¡GSol¡@6¡GLa¡@7¡GSi¡@8¡GDo ;*************************************** code segment assume cs:code,ds:code org 100h ;--------------------------------------- start: jmp short begin message db 'PAINO v 1.0',0dh,0ah db '¥HÁä½L¼ÒÀÀ¿ûµ^ªºµ{¦¡',0dh,0ah,0dh,0ah db 'Áä½L 1¡B2¡K¡K8 ªí¥Ü Do¡BRe¡K¡KDo¡C',0dh,0ah db '«ö Esc Áä°h¥Xµ{¦¡¡C$' freq dw 262,294,330,347,392,440,494,524 ;14 ÀW²v begin: mov ah,9 mov dx,offset message int 21h gt_key: mov ah,7 int 21h ;20 Ū¨ú«öÁä cmp al,1bh je exit ;22 Y¬° Esc Áä¡A«h°h¥Xµ{¦¡ sub al,'1' cbw mov bx,ax shl bx,1 mov ax,34dch mov cx,freq[bx] ;28 ¨ú±o«öÁä©Ò¥NªíªºÀW²v mov dx,12h ;29 DX:AX=1234DCH=1193180D div cx mov bx,ax ;31 BX=(1193180/ÀW²v)¤§°Ó¼Æ mov al,10110110b ;33 ·Ç³Æ§â BX ¼g¤J°ð 42H ·í§@p¼Æ¼È¦s¾¹ out 43h,al mov ax,bx out 42h,al ;36 ¥ý¶Ç¥X BX ¤§§C¦ì¤¸²Õ mov al,ah out 42h,al ;38 ¦A¶Ç¥X BX ¤§°ª¦ì¤¸²Õ in al,61h or al,00000011b out 61h,al ;41 ¥´¶}³â¥zµo¥XÁnµ mov cx,0ffffh ;43 delay: mov dx,400h dec_dx: dec dx jnz dec_dx loop delay ;47 ¨ÏÁnµ©µÄò¤@¬q®É¶¡ in al,61h and al,11111100b ;50 ¾B±¼¦ì¤¸ 0 ¤Î¦ì¤¸ 1 out 61h,al ;51 Ãö±¼³â¥z jmp gt_key exit: int 20h ;--------------------------------------- code ends ;*************************************** end start
®e¤p¤ì°¸µy°µ¸Ñ»¡¡Cµ{¦¡²Ä 33¡B34 ¦æ¡A§â 10110110B ¶ñ¤J°ð 43H¡C¬°¦ó¶ñ¤J 10110110B ³oӼƩO¡H½Ð°Ñ¦Ò«eªí¥iª¾¡A¦]¬°¿ï¾Üp®É¾¹ 2¡A©Ò¥H²Ä 6¡B7 ¦ì¤¸¬O 10¡Fn¥ýŪ¼g¸û§Cªº¦ì¤¸²Õ¦AŪ¼g¸û°ªªº¦ì¤¸²Õ¡A©Ò¥H²Ä 4¡B5 ¦ì¤¸¬° 11¡F¥Hp®É¼Ò¦¡ 3 p®É¡A©Ò¥H²Ä 1¡B2¡B3 ¦ì¤¸¬° 011¡F¿é¤J¼ÆÈ¥H¤G¶i¦ì®æ¦¡ ( §Y¤Q¤»¶i¦ì ) ªí¥Ü¡A©Ò¥H²Ä 0 ¦ì¤¸¬° 0¡C
¦¹µ{¦¡¬°¼ÒÀÀ¿ûµ^Áä½Lµo¥XÁnµ¡A©Ò¥H·í¨Ï¥ÎªÌ¨C«ö¤U¤@Áä¡A´N¨Ï³â¥zµo¥X¸ÓÁä©Ò¹ïÀ³ÀW²vªºÁnµ¡A¨Ã¨ÏÁnµ«ùÄò¤@¬q®É¶¡¦Ó«á°±¤îµoµ¡Cn¨Ï³â¥zµLÁn¡A¥un¨Ï°ð 61H ªº²Ä 0 ©Î²Ä 1 ¦ì¤¸¥ô¦ó¤@Ó¬°¹s§Y¥i¡A¦ý¤S¨Ï¨ä¥L¦ì¤¸¤£§ó°Ê¡A©Ò¥H¦b 50 ¦æ¨Ï¥Î AND «ü¥O¢¨Ï¦ì¤¸ 0 ¤Î¦ì¤¸ 1 Åܬ°¹s¡C
µ{¦¡²Ä 43 ¦æ¨ì²Ä 47 ¦æ¬O¥Î¨Ó©µ¿ð³â¥zµo¥XÁnµªº¡C³o¬O¦]¬°²{¦b¹q¸£°õ¦æ³t«×«Ü§Ö¡A°²¦p¨S¦³³o¬q©µ¿ð®É¶¡µ{¦¡¡A¤@Àþ¶¡´N·|°õ¦æ¨ì²Ä 49 ¦æ¨ÏÁnµ¤Óµu¡Aµu¨ì±zÅ¥¤£¨£¡A©Ò¥Hn¤@¬q©µ¿ð®É¶¡¨Ï³â¥zµo¥XªºÁnµ°÷ªø¡C¦Ü©ón©µ¿ð¦h¤Ö¡A¥²¶·µø¹q¸£³t«×½Õ¾ã¡A³t«×¶V§Öªº¹q¸£¥²¶·¨Ï DX §ó¤j¤~¦æ¡C¤p¤ì°¸ªº¹q¸£¬O AMD K6-2-500¡A¤]´N¬O 500MHz µ¥¯Åªº¡A°²¦p±zªº¹q¸£¬O 2GHz ¯Åªº¡ADX À³·ín§ó¤j¡C
©³¤U¤p¤ì°¸¤¶²Ð¦p¦ó¹ê§@¤@Óp®É¾¹¡A³oÓp®É¾¹¤]¥i¥H¥Î¦bקï PIANO µ{¦¡¡A¤£¥²¦A¥Î¹Á¸Õ¿ù»~ªº¤èªk©µ¿ð®É¶¡¡C
8253 ´¹¤ùÁö¯à±À°Ê³â¥z¡A¦ý³o¥u¬O¥¦ªþÄݪº¥\¯à¡A¥¦¥Dnªº¥\¯à¨ä¹ê¬Op®É¡C³oùةҿתºp®É¬O«ü¨â¨Æ¥óµo¥Í¬Û¶Z¦h¤Ö®É¶¡¡AºÙ¬°®É¶¡¶¡¹j¡C¦³Ãöp®É¾¹ªº¤èªk¡A¤@¯ë¬O§Q¥Î AH=2CH/INT 21H ©Î CMOS ´¹¤ù¤À§OŪ¨ú¨â¨Æ¥óµo¥Íªº®É¶¡¡AµM«ápºâ®É¶¡®t´N¯à¨D¥X®É¶¡¶¡¹j¡A³o¼Ëªºp®É¤èªkºë±K«×¶È¯à¨ì¹F¦Ê¤À¤§¤@¬í¡C¦¹³B¤p¤ì°¸¥HŪ¨ú 8253 ¤º§tªºp¼Æ¼È¦s¾¹¨Óp®É¡A³o¼Ëªºp®É¤èªkºë±K«×¥i±µªñ·L¬í ( ¤@·L¬íµ¥©ó 10¡Ð6 ¬í )¡C¤£¹L¦bºC³tªº¹q¸£¡A¦p 8088¡B80286¡A°õ¦æ¤@¹D«ü¥Oªº®É¶¡¤ñ¤@·L¬íµy¤p¡A©Ò¥H¹ê»Ú¤W¦³¤@¨Ç¨îµLªk¯u¥¿¹F¨ì¦p¦¹ºë±K«×¡A¦ýÁÙ¬O¤ñ AH=2CH/INT 21H ©ÎŪ¨ú CMOS ¨t²Î®É¶¡¨Ó±oºë±K¡C
§Q¥Î 8253 p®Éªºì²z¨ä¹ê«Ü²³æ¡C«e±´£¨ì¡A8253/8254 p®É¾¹¹s¨C¬íµo¥X 18.2 ¦¸ªº INT 8H ¤¤Â_¡A¦¹¤¤Â_¦¸¼Æ·|³Q BIOS °O¿ý¦b°O¾ÐÅé¦ì§} 0000:046C ³B¡A¥HÂù¦r²Õªºªø«×ªí¥Ü¡C¹q¸£¤@¶}¾÷«á¡ABIOS «K¶}©l¨Ï¸ÓÂù¦r²Õ¥Ñ¹s³vº¥¼W¥[¡A¦¹«á¥H¨C¬í¼W¥[ 18.2¡A´«¥y¸Ü»¡¡A¨C 0.055 ¬í¡A0000:046C ³BªºÂù¦r²Õ·|¼W¥[¤@¡G
1¡Ò18.2¡×0.055
©Ò¥H¦pªGŪ¨ú¨â¦¸¦ì©ó°O¾ÐÅé 0000:046C Âù¦r²Õ¡A¨Ã¨D¥X¨âªÌ¤§®tÈ¡A¦A°£¥H 18.2 ´N¬O¨â¦¸Åª¨úªº®É¶¡¶¡¹j¡A¨ä³æ¦ì¬°¡y¬í¡z¡C¤£¹L³o¼Ëªºp®Éºë±K«×¶È¶È 0.055 ¬í¡C
¦pªGn¦A¼W¥[ºë±K«×¡AÁÙ¥i¥H¦AŪ¨ú 8253/8254 p®É¾¹¹sùرªºp¼Æ¼È¦s¾¹¼ÆÈ¡C¸Ó¼ÆȦb 0.055 ¬í¤º¡A·|¥Ñ 0FFFFH ³v¦¸»¼´î¦Ü 0¡A©Ò¥Hºë±K«×¬° 8.4¡Ñ10¡Ð7 ¬í¡A¤j¬ù¤@·L¬í¡G
0FFFFH¡×65536
0.055¡Ò65536¡×8.4¡Ñ10¡Ð7
»¡¤F³o»ò¦h¡A¾ã²z¤@¤U¡C§Ú̪ºp®É¾¹¬O¤TÓ¦r²Õ²Õ¦¨ªº¡A«e¨âÓ¦r²Õ¬OŪ¨ú 0000:046C ªºÂù¦r²Õ¡A¦¹Âù¦r²Õ¬O¥H 0.055 ¬í¬°³æ¦ì¡F«á¤@Ó¦r²Õ¬OŪ¨úp®É¾¹ 0 ¤ºªºp¼ÆÈ¡A¦¹p¼ÆȬ°¤@¦r²Õªø«×¡A¥H 8.4¡Ñ10¡Ð7 ¬í¬°³æ¦ì¡C
·í¬Y¨Æ¥óµo¥Í®É¡A¦]¬°p¼Æ¼È¦s¾¹¤ºªºp¼ÆÈ»¼´î¦Ü¹s®É¡A0000:046C ¤§¤¤Â_¦¸¼Æ¤~¼W¤@¡A©Ò¥H§ÚÌÀ³¥ýŪ¨úp¼Æ¼È¦s¾¹¤ºªºp¼ÆÈ¡A¦AŪ¨ú 0000:046C ¤ºªº¤¤Â_¦¸¼Æ¡A³o¼Ë¤~§ó±µªñ¨Æ¥óµo¥Íªº®É¶¡¡C¦ý¬O·í§ÚÌŪ¨úp¼Æ¼È¦s¾¹«á¡A¨äp¼Æ¾¹¤ºªº¼ÆȤ´¤£Â_¦a˼ơA¦³¥i¯à¦bŪ¨úp¼Æ¼È¦s¾¹¤§«á¡A¦ý¬O©|¥¼Åª¨ú 0000:046C ªº³o¬q®É¶¡¤º¡Ap¼Æ¼È¦s¾¹´N¤wÂk¹s¡A³o¼ËŪ¨úªº¤¤Â_¦¸¼Æ¨ä¹ê¬O»Ýn´î¤Ö¤@ªº¡C³oÓ°ÝÃD·|µo¥Í¦bp¼Æ¼È¦s¾¹¤ºªº¼ÆȤw¸g«Ü±µªñ¹s®É¡A¬°ÁקK³oÓ°ÝÃDµo¥Í¡A¤p¤ì°¸ªº°µªk¬O¥ý¸T¤î¤¤Â_µo¥Í¡A«ÝŪ¨ú 0000:046C ¤§¤¤Â_¦¸¼Æ«á¦A¨Ï¤¤Â_¯àµo¥Í¡C
©³¤U¤p¤ì°¸§Q¥Î¤Wzì²z¼¶¼g¤@µ{¦¡¡APLAY.ASM¡A¦¹µ{¦¡¥i¥H§Q¥Î PC ³â¥z¼u«µ¤@º¦±¤l¡C©Ò¼u«µªº¦±¤l¥H¯Â¤å¦rÀɧΦ¡´yz¡A¤p¤ì°¸ºÙ¤§¬°ºq¦±ÀÉ¡A¨ä®æ¦¡²Ä¤@¦æ¬°ºq¦±¦WºÙ¡A²Ä¤G¦æ¥H«á¨C 6 Ӧ줸²Õªí¥Ü¤½uÃФ¤ªº¤@Óµ²Å¡A«e¨âӦ줸²Õªí¥Üµ°ª¡A³o¨âӦ줸²Õªº²Ä¤@Ӧ줸²Õªí°ªµ©Î§Cµ¡A°ªµ¥Î¡y+¡zªí¥Ü¡A§Cµ¥H¡y-¡zªí¥Ü¡A¡y0¡zªí¥Ü¥¿±`¡A²Ä¤GӦ줸²Õªí¥Üµ¶¥¡AC ªí¥Ü Do¡BD ªí¥Ü Re¡BE ªí¥Ü Mi¡BF ªí¥Ü Fa¡K¡K¡BB ªí¥Ü Si¡A¦pªG¬O 0 ªí¥Ü¥ð¤î²Å¡C
¤§«á©Ò±µªº¤@Ӧ줸²Õ¬O¤À¹j²Å¸¹¡A¥i¥Î¡y,¡z©ÎªÅ¥Õªí¥Ü¡A¨ä¹ê¦b PLAY.ASM ùبèS¦³Àˬd¤@©wn¥Î¡y,¡z©ÎªÅ¥Õ¡C±µ¤U¨Óªº¨âӦ줸²Õªí¥Ü¦¹µ²Åªº©ç¤l¡A01 ªí¥Ü¤Q¤»¤Àµ²Å ( ¥|¤À¤§¤@©ç )¡B02 ªí¥Ü¤K¤Àµ²Å ( ¥b©ç )¡B04 ªí¥Ü¥|¤Àµ²Å ( ¤@©ç )¡B06 ªí¥ÜªþÂI¥|¤Àµ²Å ( ¤@©ç¥b )¡B08 ªí¥Ü¤G¤Àµ²Å ( ¨â©ç )¡B16 ªí¥Ü¥þµ²Å ( ¥|©ç )¡C©ç¤l§¹«á¡A±µ¤U¨Óªº¤@Ӧ줸²Õ¬O¤À¹j²Å¸¹¡A¡y,¡z¡C¨Ò¦p©³¤U¬O¤@º¦Ñºq¡A¡y¯¬§A©¯ºÖ¡z¡Aªººq¦±ÀÉ¡AÀɦW¬O bless_you_happy.txt¡A±z¥i¥Î¤å®Ñ³nÅé½s¿è¡G
¯¬§A©¯ºÖ 0G,06,0A,01,0G,01,0E,04,0G,04 0C,04,0D,02,0C,01,0D,01,0E,08 0G,06,0A,02,+C,04,0A,02,0E,02 0G,16 0C,06,0C,02,0D,02,0C,01,0D,01,0E,02,0G,02 0G,02,0A,02,+C,02,+D,02,0A,01,0G,01,0E,04 00,02,0G,02,0G,02,0E,03,0D,02,0E,02,0E,02,0D,02 0C,16 0A,06,0G,01,0A,01,+C,04,0A,02,+C,02 +C,02,+D,02,+C,02,+C,02,+E,08 00,02,+D,02,+C,02,0A,02,0G,02,+C,02,0A,01,0G,01,0E,02 0G,16 0C,06,0C,02,0D,02,0C,01,0D,01,0E,02,0G,02 0G,02,0G,02,0E,02,0G,02,0A,02,0A,01,0G,01,0A,04 00,02,0G,02,0G,02,+E,02,+D,02,+C,02,0G,02,+D,02 +C,16
°õ¦æ®É¡A¦b DOS ¼Ò¦¡¤U¿é¤J
D:\HomePage\SOURCEG>play bless_~1.txt [Enter] ºt«µ¡y¯¬§A©¯ºÖ¡z ¡÷µ{¦¡¦^À³ºq¦±¦W
´N¥i¥H¬Ý¨£¿Ã¹õ¤WÅã¥Üºq¦W¡A¨Ãµo¥XÁnµ¡C¦b³oÓµ{¦¡ùØ¡A±z¤]¥i¥H¨Ï¥ÎªøÀɦW¡A¦Û±q Win 95 ¤W¥«¥H¨Ó¡AÀɦW´N¤£¦b¨ü©ó 8.3 ®æ¦¡¡A©Ò¥Hµ{¦¡¤]¤£À³¸Ó¨î¥u¯à¨Ï¥Î 8.3 ®æ¦¡ªºÀɦW¡A¨Æ¹ê¤W¦b Win 9X DOS ¼Ò¦¡ùتº AH=71H/INT 21H ¦³¤@¨t¦C¦³Ãö³B²zªøÀɦWªºªA°È¤¤Â_¡A½Ð°Ñ¦Ò²Ä 15 ³¹©Î Ralf Brown's Home Page ªº»¡©ú¡C©Ò¥H°õ¦æ PLAY.COM ®É¡A±z¤]¥i¥H¿é¤J
D:\HomePage\SOURCEG>play bless_you_happy.txt [Enter] ¡÷¨Ï¥ÎªøÀɦW
ºt«µ¡y¯¬§A©¯ºÖ¡z
©³¤U¬Ý¬Ý PLAY.ASM¡C§â PLAY.ASM ²ÕĶ¡B³sµ²¦n¡A¥i±o PLAY.EXE¡A¦A¥Î EXE2BIN.EXE Âà´«¦¨ PLAY.COM ¥i°õ¦æÀÉ¡C
file_info struc ;01 ©w¸q file_info µ²ºcÅé attributes dd ? creation_time dq ? last_access_time dq ? last_write_time dq ? volume_serial_number dd ? file_size_high dd ? file_size_low dd ? number_of_links_to_file dd ? unique_file_identifier_high dd ? unique_file_identifier_low dd ? file_info ends ;12 µ²ºcÅéµ²§ô ;*************************************** play segment assume cs:play,ds:play org 100h ;--------------------------------------- start: jmp begin song_info file_info <?> handle dw ? msg1 db 'Àɮ׶}±Ò©ÎŪ¨ú¿ù»~¡C$' msg2 db 'ºt«µ¡y$' msg3 db '¡z',0dh,0ah,'$' msg4 db 'ÀɮפӤj¡C$' freq1 dw 131,147,165,174,196,220,247 ;26 §CµÀW²v freq2 dw 262,294,330,347,392,440,494 freq3 dw 524,588,660,694,784,880,988 ;28 °ªµÀW²v lst_buf dw ? time1 dw ?,?,?,0 time2 dw ?,?,?,0 begin: mov si,81h ;33 «ü¦V PLAY.COM °Ñ¼Æ¦ì§} cld nxt0: lodsb cmp al,' ' je nxt0 mov dx,si dec dx ;39 ºq¦±ÀɦW°_©l¦ì§} nxt1: lodsb cmp al,0dh jne nxt1 dec si mov byte ptr [si],0 ;44 ºq¦±ÀɦWµ²§ô¦ì§} mov si,dx sub bx,bx mov dx,1 mov cx,dx mov ax,716ch int 21h ;50 ¶}±ÒÀÉ®× jc exit0 mov handle,ax mov bx,ax mov dx,offset song_info mov ax,71a6h int 21h ;57 ¨ú±oÀɮ׸ê°T mov bx,handle mov cx,word ptr song_info.file_size_low cmp cx,0f000h ja exit2 mov dx,offset buffer mov ah,3fh int 21h ;63 Ū¨úÀÉ®× jnc ok0 exit0: mov dx,offset msg1 ;59 ¶}±ÒÀɮשÎŪ¨ú¿ù»~ exit3: mov ah,9 int 21h exit1: mov ax,4c00h int 21h exit2: mov dx,offset msg4 ;75 ÀɮפӤj jmp exit3 ok0: add dx,word ptr song_info.file_size_low mov lst_buf,dx ;79 pºâºq¦±Àɳ̫á¦ì§} call print_song_name ;81 Åã¥Üºq¦±¦W mov si,di nxt2: inc si ;83 «ü¦Vµ°ª nxt3: lodsw cmp al,0ah ;85 Àˬd¬O§_´«¦æ jne nt_lf ;86 Y¤£¬O´«¦æ¡A¨ì nt_lf dec si ;87 Y´«¦æ¡A±N SI ´î¤@ cmp si,lst_buf ;88 ¡A¦A¬d¬O§_¤w¨ìÀɮקÀµ²§ô je t_off ;89 Y¤w¨ìÀɮקÀ¡A¨ì t_off ³B jmp nxt3 nt_lf: cmp ax,3030h ;91 Àˬd¬O§_¬°¥ð¤î²Å jne nt_rst ;92 Y¤£¬O¥ð¤î²Å¡A¸õ¨ì nt_rst ³B call turn_off_speaker;93 Y¬O¥ð¤î²Å¡A«hÃö³¬³â¥z jmp short last_t nt_rst: call get_freq_addr ;96 ¨ú±oÀ³¼u«µÀW²v¦ì§} call sound last_t: mov di,offset time2 ;99 ¨ú±o INT 8 ¤¤Â_¦¸¼Æ¡A¨Ã¦s call get_time ;100 ©ó time2 Âù¦r²ÕÅܼÆùØ inc si lodsw ;103 ¨ú±o©ç¤lªø«× sub ax,3030h ;104 ©ç¤lªø«×ªº¤Q¦ì¼Æ¦b AL¡AÓ¦ì¼Æ¦b AH mov bl,ah cbw mov bh,10 mul bh add al,bl ;109 AX= ©ç¤lªø«×ªº¤Q¤»¶i¦ì¼Æ shl ax,1 ;110 °²³]¤@©çªº®É¶¡¬° 16/18.2 ¬í shl ax,1 ;111 AX= ¦b©ç¤l®É¶¡¤ºªº¤¤Â_¦¸¼Æ mov di,offset time2+2 add [di],ax ;113 timer2= ©ç¤lµ²§ô®Éªº¤¤Â_¦¸¼Æ adc word ptr [di+2],0 gt_tm: mov di,offset time1 ;116 ¨ú±o INT 8H ¤Îp¼Æ¾¹¼ÆÈ©ó time1 call get_time mov bx,offset time1+2 mov di,offset time2+2 mov ax,[bx+2] cmp ax,[di+2] ;122 ¤ñ¸û time1 ¬O§_¤j©ó©Îµ¥©ó time2 jb gt_tm ;123 Y§_¡A«h¦AŪ¨ú INT 8H ¤¤Â_¦¸¼Æ¤Îp¼ÆÈ mov ax,[bx] cmp ax,[di] jb gt_tm cmp si,lst_buf ;128 Y¬O¡Aªí¥Ü©ç¤l¤wµ²§ô¡AÀˬd¬O§_¨ìÀɮקÀ jne nxt2 t_off: call turn_off_speaker mov bx,handle mov ah,3eh int 21h ;133 Ãö³¬ÀÉ®× jmp exit1 ;--------------------------------------- ;¦L¥Xºq¦±¦W ;¿é¤J¡Ðbuffer ¤§¸ê®Æ print_song_name proc near mov di,offset buffer mov al,0dh ;140 ´M§ä²Ä¤@¦æµ²§ô¦ì§} repne scasb mov byte ptr [di-1],'$' ;142 ¥[¤W¡y$¡z·í§@ AH=9/INT 21H mov ah,9 ;143 ©Ò¦L¥X¦r¦êµ²§ô°O¸¹ mov dx,offset msg2 int 21h mov dx,offset buffer mov ah,9 int 21h mov dx,offset msg3 mov ah,9 int 21h ret print_song_name endp ;--------------------------------------- ;¨ú±oÀW²v¦ì§} ;¿é¤J¡ÐAL¡G0¡B¡Ï¡B¡Ðµ¥°ª§Cµ ; AH¡GCDEFGAB µ¥µ¶¥ ;¿é¥X¡ÐBX¡G«ü¦V freq1¡Bfreq2¡Bfreq3 ¨ä¤¤¤@ÓÀW²v¦ì§} get_freq_addr proc near mov dx,offset freq2 ;160 °²³]¤¤µ cmp al,'+' ;161 Àˬd¬O§_°ªµ jne if_low ;162 Y§_¡A¸õ¨ì if_low Àˬd¬O§_§Cµ mov dx,offset freq3 ;163 Y¬°°ªµ¡A¨Ï DX «ü¦V freq3 jmp short ok1 if_low: cmp al,'-' ;165 Àˬd¬O§_§Cµ jne ok1 ;166 Y§_¡A¸õ¨ì ok1 mov dx,offset freq1 ;167 Y¨Ï§Cµ¡A¨Ï DX «ü¦V freq1 ok1: and ah,0dfh ;169 ¨Ï¤p¼gÅܤj¼g cmp ah,'A' ;170 Àˬd¬O§_¬° La ©Î Si je ra_ton cmp ah,'B' je si_ton sub ah,'C' ton: mov bl,ah ;175 ¥H freq? ªº¦ì§}¬°°ò·Çpºâµ°ªÀW sub bh,bh ;176 ²v¬Û¹ï©ófreq? ¤§¦ì§}¡A shl bx,1 ;177 ¨Ã¦s©ó BX add bx,dx ;178 ¦A¥[¤W DX¡A«h BX ¬°±N¼u«µµ²Å¤§ÀW²v¦ì§} ret ra_ton: mov ah,5 jmp ton si_ton: mov ah,6 jmp ton get_freq_addr endp ;--------------------------------------- ;µo¥XÁnµ ;¿é¤J¡ÐBX¡G«ü¦VÁnµÀW²v¦ì§} ;¿é¥X¡Ðµo¥XÁnµ sound proc near mov ax,34dch mov cx,[bx] mov dx,12h div cx mov bx,ax mov al,10110110b out 43h,al mov ax,bx out 42h,al ;200 ¥ý¶Ç¥X§C¦ì¤¸ mov al,ah out 42h,al ;202 ¦A¶Ç¥X°ª¦ì¤¸ in al,61h or al,00000011b out 61h,al ;205 ¥´¶}³â¥zµo¥XÁnµ ret sound endp ;--------------------------------------- ;¨ú±oºwµª¦¸¼Æ¡A¦s©ó DI ©Ò«üªº¤TÓ¦r²Õ¤º ;¿é¤J¡ÐDS:DI «ü¦V¤T¦r²Õ¦ì§} ;¿é¥X¡ÐES:DI ©Ò«ü¦ì§}±N¦s¤J TIMER0 p¼ÆȤΠINT 8H ¤¤Â_¦¸¼Æ ; AX¡BBX ¤§È·|³Q¯}Ãa get_time proc near push ds ;214 «O¦s DS¡BSI push si sub ax,ax ;216 ¨Ï DS:SI «ü¦V 0000:046C mov si,46ch mov ds,ax cli ;220 ¸T¤îµwÅ餤Â_ mov al,0 ;222 n¨D«O¯dp®É¾¹¹sªºp¼ÆÈ out 43h,al in al,40h ;225 Ū¨úp¼Æ¾¹¤§È¡A¨Ã¦s©ó BX mov bl,al in al,40h mov bh,al not bx ;229 ¨Ï BX §ï¬°»¼¼W mov ax,bx ok: stosw ;232 ¦s¤Jp¼Æp¼ÆÈ movsw ;233 ¦s¤J INT 8H ¤¤Â_¦¸¼Æ movsw sti ;236 «ì´_¸T¤îªºµwÅ餤Â_ pop si pop ds ret get_time endp ;--------------------------------------- turn_off_speaker proc near in al,61h and al,0fch out 61h,al ;245 Ãö³¬³â¥z ret turn_off_speaker endp ;--------------------------------------- buffer: ;249 ºq¦±Àɸê®Æ¦s©ñ³B ;--------------------------------------- play ends ;*************************************** end start
¨ÌºD¨Ò¡A¤p¤ì°¸µy§@¸ÑÄÀ¡C1¡ã12 ¦æ¬O©w¸q¤@Óµ²ºcÅé¡A¦¹µ²ºcÅéªí¥ÜÀɮ׸ê°T¡A¦b 57 ¦æ¨ú±oÀɮ׸ê°T®É¡A¨t²Î·|§â bless_yuo_happy.txt ªº¸ê°T¶ñ¤J¦¹µ²ºcÅé¡C
³oÓ¤¤Â_ªA°Èµ{¦¡¬O¥Î¨ÓÀò±o¬YÓÀɮתº¸ê°T¡A¨ä¥Îªk¬O¨Ï AX ¶ñ¤J 71A6H¡ABX ¶ñ¤JÀÉ®×¥N½X¡ADS:DX «ü¦V¤@Óµ²ºcÅé¡C·í¦¨¥\¦a¨ú±o¸ÓÀɸê°T®É¡A¶i¦ìºX¼Ð·|³Q²M°£¡A¨Ã¦b DS:DX ©Ò«ü©wªºµ²ºcÅé¶ñ¤J¸ÓÀɪºÀɮ׸ê°T¡AÀɮ׸ê°Tªºµ²ºc¦p¤U¡G
°¾²¾¦ì§} | ¤j¤p | ·N¡@¡@¸q |
0 | Âù¦r²Õ | ÀÉ®×ÄÝ©Ê |
04 | ¥|¦r²Õ | «Ø¥ß®É¶¡ |
0C | ¥|¦r²Õ | ³Ì«áŪ¨ú®É¶¡ |
14 | ¥|¦r²Õ | ³Ì«á§ó°Ê®É¶¡ |
1C | Âù¦r²Õ | ¨÷§Ç¸¹ |
20 | Âù¦r²Õ | Àɮפj¤p ( ¸û°ªªº 32 ¦ì¤¸ ) |
24 | Âù¦r²Õ | Àɮפj¤p ( ¸û§Cªº 32 ¦ì¤¸ ) |
28 | Âù¦r²Õ | |
2C | Âù¦r²Õ | |
30 | Âù¦r²Õ |
µ{¦¡²Ä 33¡ã44 ¦æ¬O¨ú±o¨Ï¥ÎªÌ¦b©R¥O´£¥Ü¤U¿é¤J PLAY ¤§«áªº°Ñ¼Æ¡A¤]´N¬Oºq¦±ÀɦW¡C°Ñ¼Æ¦ì§}·|©ñ¦b PSP ªº 80H ³B¡A¦ý 80H ¬O¿é¤J°Ñ¼Æªºªø«×¡A©Ò¥H¦¹µ{¦¡¥Ñ 81H ¶}©l¡C¨Ò¦p±z¦b DOS ¼Ò¦¡¤U¿é¤J
D:\HomePage\SOURCEG>play bless_you_happy.txt [Enter]
¨º»ò¦b 80H ³B¡A·|¦³±z¿é¤Jªº°Ñ¼Æ¡A¦p¤U¡J
1825:0080 14 20 62 6C 65 73 73 5F-79 6F 75 5F 68 61 70 70 . bless_you_happ 1825:0090 79 2E 74 78 74 0D 00 00-00 00 00 00 00 00 00 00 y.txt........... 1825:00A0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
¬°¤F¥Î AX=716C/INT 21H ¶}±ÒÀɮסA¥²¶·§ä¨ìºq¦±Àɪº°_©l¦ì§}¡A¨Ã¦bÀɮקÀ¥[¤W¡y0¡zªí¥Üµ²§ô¡A³o´X¦æ´N¬O°µ³o¼Ëªº¨Æ¡C
¶}±Ò³oÓºq¦±Àɤ§«á¡A¥ý±o¨ì¦¹ÀɪºÀɮ׸ê°T¡A¥ÑÀɮ׸ê°TùبD¥XÀɮפj¤p¡C¦¹µ{¦¡³Ì«á·|Ū¨ú¾ãÓÀɮפº®e¡A¨Ã¦s©ñ¦bµ{¦¡§ÀºÝªº buffer: ¼Ð¸¹³B¡A©Ò¥H buffer: ¼Ð¸¹¦ì§}¥[¤WÀɮפj¤p´N¬Oµ¼ÖÀɤº®eªº³Ì«á¦ì§}¡C¤]´N¬O»¡·í¦¨¬Oºt«µ¨ì³oÓ¦ì§}§¹²¦¡A¾ãººq¦±´Nµ²§ô¤F¡A³oÓ¦ì§}³Q¦s¦b lst_buf ÅܼÆùØ ( ¦bµ{¦¡²Ä 29 ¦æ©w¸q)¡C½Ð¬Ý¬Ýµ{¦¡²Ä 52¡ã79 ¦æ´N¬O°µ³o¨Ç¨Æ±¡¡C
µ¥³o¨Ç¨Æ±¡°µ§¹¡Aµ{¦¡´N¶}©l¼u«µ¼Ö¦±¤F¡C¤@¯ë¦Ó¨¥¡A¤@Óµ¥]§tµ½Õ¤Î©ç¤l¡Aµ½Õ«üªº´N¬OÀW²v¡A©ç¤l¬O«ü³â¥zµo¥XªºÁnµÀ³«ùÄò¦h¤[¡C¦Ó©³¤Uªºµ{¦¡´N¬O³B²z³o¨âÓ°ÝÃD¡C
²Ä 83¡ã97 ¦æ¬OŪ¨ú buffer: ³Bªºµ¼ÖÀɸê®Æ¡A¦¹®É SI «ü¦Vµ¼ÖÀɺq¦±¦W¤§«áªº¦ì§}¡A¥Î LODSW ¸ü¤J¦Ü AX «áÀˬd¬O§_´«¦æ¡A¬O§_¨ìÀɮקÀ¡A¬O§_¬°¥ð¤î²Å¡A¦pªG³£¤£¬Oªº¸Ü¡Aªí¥Ü©ÒŪ¨ìªº¬Oµ°ª¡AµM«á¨ì 96 ¦æ¨ú±o¸ÓµªºÀW²v¡AµM«á¨ì 97 ¦æµo¥XÁnµ¡C
µo¥XÁnµ§¹«á«K¬O¨M©w³oÓÁnµ«ùÄò¦h¤[¡A¤p¤ì°¸ªº°µªk¦bµo¥XÁnµ«á¥ß§YŪ¨ú®É¶¡¡A¦¹®É¶¡´N¬Oµo¥XÁnµªº®É¶¡¡AµM«áŪ¨úºq¦±Àɪº©ç¤lªø«×¡A©ç¤lªø«×´N¬OÁnµ«ùÄòªº®É¶¡¡AÁnµ«ùÄòªº®É¶¡¦A¥[¤Wµo¥XÁnµªº®É¶¡´N¬O°±¤îÁnµªº®É¶¡¡AµM«á¶i¤J¤@Ó°j°é¡A¦¹°j°éªº²Ä¤@¨B¬OŪ¨ú®É¶¡¡A¦A¤ñ¸û¦¹®É¶¡¬O§_µ¥©ó°±¤îµo¥XÁnµªº®É¶¡¡A¦pªG¤£¬Ûµ¥¡A·|¦^¨ì°j°éªº²Ä¤@¨B¡A«½Æ³o¨Ç°Ê§@¡A¤@ª½¨ìŪ¨úªº®É¶¡µ¥©óÁnµ°±¤îªº®É¶¡¡AµM«á¶i¦æ¤U¤@Óµ²Å¡C
¤p¤ì°¸§Q¥Î¤@ӰƵ{¦¡¡Aget_time¡AŪ¨ú®É¶¡¡Cget_time ¦bµ{¦¡²Ä 214¡ã239 ¦æ¡A¥¦·|§â®É¶¡°O¿ý¦b ES:DI ©Ò«üªº¤TÓ¦r²Õªø«×ªº¦a¤è¡C°Æµ{¦¡¤@¶}©l¬O«O¦s SI ¨Ã¨Ï DS:SI «ü¦V 0000:046C¡A¦]¬° SI ¦b¥Dµ{¦¡¤¤ªí¥Üºq¦±Àɪº«ü¼Ð¡A¥²¶·«O¦s¡A§_«h´NµLªk±oª¾¤U¤@Óµ¦b¨º¨à¤F¡C±µ¤U¨Ó¸T¤îµwÅ餤Â_¡A¥Î CLI «ü¥O¡C
µM«áŪ¨úp®É¾¹ 0 ªºp¼Æ¼È¦s¾¹¤ºªº¼ÆÈ¡AŪ¨úªº¤èªk¬O¥ý
²Ä 26¡ã28 ¦æ¬O©w¸qµ²ÅÀW²v¡A¤@ººqùسq±`·|¦³¤Ö³¡¥÷§Cµ»P°ªµ¡CPLAY.COM ¨ú±o¬YÓµ²ÅÀW²vªº¹Lµ{¦b²Ä 160¡ã184 ¦æªº get_freq_addr °Æµ{¦¡¡A
µù¤@¡G¥»³¹ªº²Ä¤G³¡¥÷¥]§t¤@Ó©µ¿ð®É¶¡ªºµ{¦¡¡A¦¹³B¤p¤ì°¸¥Î 8253 p®É¾¹¨Ó¹F¨ì©µ¿ðªº¥Øªº¡AÅý³â¥z¯à«ùÄòµo¥X¤@¬qÁnµ¡C¨Æ¹ê¤W AT ¯Å¥H¤Wªº¹q¸£¤¤¡ABIOS ¤w¸g´£¨Ñ¤F³oÓªA°Èµ{¦¡¡C¾¨ºÞ BIOS ¤w¸g´£¨Ñ³oÓªA°Èµ{¦¡¡A¤£¹L¦Û¤v DIY ¤@µf¡A¤]¬O«Ü¦³½ìªº¡A¤£¬O¶Ü¡H
¦¹ BIOS ¤¤Â_ªA°Èµ{¦¡¥i¥H¨Ï¹q¸£©µ¿ð¤@·L¬í¦Ü¤@¤p®Éªº®É¶¡¡A¨Ï¥Î®É AH ¥²µ¥©ó 86H¡ACX:DX ¦s©ñn©µ¿ðªº®É¶¡¡A¦¹®É¶¡¥H 0.977 ·L¬í¬°³æ¦ì¡C( ¤@·L¬í = 10¡Ð6¬í )