pp.asm

来自「with timer we can listen to do , ré ,」· 汇编 代码 · 共 52 行

ASM
52
字号


data segment
      tab dw 1000, 2000, 3000, 5000, 6000 ,8000 ,9000 
data ends


Prog segment
        assume ds:data, cs:prog
  debut:      mov ax,data
              mov ds,ax

        ;prog 8255

		mov al,80h
		mov dx ,63h
		out DX,al
        ;activetimer
		in al,61h
		or al,03h
		out 61h,al
        ;8254
		mov al,0B6h
		mov DX,43h
		out DX,al
		
		mov cx,7
		mov si,0
		
boucle:                          ;freq
      
		mov ax,tab[si]
		mov DX ,42h
		out dx,al
		mov al,ah
		out Dx,AL


		mov AH,01h
		int 21h
		inc si
		inc si
		loop boucle
	;arret timer 
		in al,61h
		and al,0FCh
		out 61h,al		

  	      mov ah,4ch
              int 21h
prog ends
end debut

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?