返回列表 回复 发帖

跪求改一个汇编语言源程序。有报酬!感激不尽啊!!!

各位电脑爱好者好友们:
                       大家好!
{请管理员和斑竹给我多点参考答案啊,不要那么早关闭回复啊,谢谢啊……}
   我在学习过程中遇到一个难题,请知道的帮我一下好吗?我将会有酬谢的。我的QQ是:692005(感谢大家)
    请帮我改个汇编语言源程序:

    问题:利用键盘和扬声器实现电子琴功能:按不同的按键发出不同频率的声音。键可以设置是1,2,3……如此等等都可以。我有报酬的,不管改多了只要改了就好。(顺便加点注释,谢谢)我的QQ是:692005,汇编程序如下:

         .model  small
        .386
        .stack  20h
        .code

start:  mov  ah,6
         mov  dl,0ffh
         int  21h

        je    start
       .if   al!=0dh
       call  beep
       jmp   start
       .endif
      nop
      .exit

      ep  proc near
      mov      al,0b6h         ;the control word is moved to 43h
      out    43h,al         


      mov   cx,0fffh   ;the count value is 0fffh
      mov      al,cl           ;the low byte is moved to 42h
      out      42h,al          ;
      mov      al,ch           ;the high byte is moved to 42h
      out      42h,al          ;

      in       al,61h          ;read port 61h
      or       al,3            ;set b1 and b0
      out      61h,al          ;drive the speaker

      mov   ecx,0fffffffh   ;move the value for delay into ecx
     lay:  loopd   delay           ;delay

      in       al,61h          ;read port 61h
      and      al,0fch         ;clear b1 and b0
      out      61h,al          ;close the speaker

      ret
     ep  endp
     end  start
★欢迎大家光临我的淘宝瑞奇专卖店★
便宜QQ号,QQ宠物套餐,Q币随便你拿!联系QQ:692005
不知道  看不懂,你想达到什么目的呢?

再说这么短的程序,改的肯定没有重写快
返回列表