Metropoli BBS
VIEWER: irq.asm MODE: TEXT (ASCII)
include qlib.inc

.code
irq_enable proc uses ebx ecx,irqn:byte  ;0=enabled
  in al,0a1h
  mov ah,al
  in al,021h
  mov cl,irqn
  mov bx,1
  shl bx,cl
  not bx
  and ax,bx
  out 021h,al
  mov al,ah
  out 0a1h,al
  xor eax,eax
  ret
irq_enable endp
  
irq_disable proc uses ebx ecx,irqn:byte  ;1=disabled
  in al,0a1h
  mov ah,al
  in al,021h
  mov cl,irqn
  mov bx,1
  shl bx,cl
  or ax,bx
  out 021h,al
  mov al,ah
  out 0a1h,al
  xor eax,eax
  ret
irq_disable endp

end 
[ RETURN TO DIRECTORY ]