home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1990 / 12 / tricks / show_led.asm < prev    next >
Encoding:
Assembly Source File  |  1990-09-12  |  1.1 KB  |  46 lines

  1. ;* ------------------------------------------------------- *
  2. ;*                     SHOW_LED.ASM                        *
  3. ;*          (c) 1990 Ulrich Schmitz & TOOLBOX              *
  4. ;* ------------------------------------------------------- *
  5. .model small
  6. .code
  7.  
  8. CODE SEGMENT BYTE PUBLIC
  9.           ASSUME CS:CODE
  10.           PUBLIC _show_led
  11.  
  12. _show_led PROC NEAR
  13.           mov bx, sp
  14.           mov ax, SS:[bx+4]
  15.           mov bl, al
  16.           cli
  17.           xor cx, cx
  18. l1:       in al, 64h          ;Inhalt Statusport
  19.           test al, 2
  20.           loopne l1
  21.  
  22. ;--- LED's setzen
  23.  
  24.           mov al, 0EDh        ;Set/Reset Mode Indikator
  25.           out 60h, al         ;als Befehlsbyte schreiben
  26. l2:       in al, 64h
  27.           test al, 1
  28.           loope l2
  29.  
  30.           mov al, bl          ;3-Bit Befehlscode schreiben
  31.           out 60h, al
  32. l3:       in al, 64h
  33.           test al, 1
  34.           loope l3
  35.  
  36.           sti
  37.  
  38.           ret 2
  39.  
  40. _show_led ENDP
  41.  
  42. CODE      ENDS
  43.           END
  44. ;* ------------------------------------------------------- *
  45. ;*                     SHOW_LED.ASM                        *
  46.