home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1988 / 02 / bcitip / button.asm < prev    next >
Encoding:
Assembly Source File  |  1987-12-03  |  993 b   |  30 lines

  1. ;---------------------- BUTTON.ASM ------------------------
  2. ;       Abfrage eines Game Adapters unter BCI Pascal
  3. ;           Function Button (Maske) : boolean
  4. ;---------------------- 1987 by M.A. ----------------------
  5. public button
  6. code segment byte public 'PASCAL'   ; ... Grüße an BCI ...
  7. assume cs:code
  8.  
  9. button proc far                     ; Abfrage Buttons
  10.        pop bx
  11.        push cs
  12.        push bx
  13.        mov si,sp
  14.        mov bx,[si+4]                ; siehe oben...
  15.        mov cx,0001h
  16.        mov dx,0201h
  17.        in al,dx                     ; Port lesen
  18.        and al,0f0h                  ; Timer ausblenden
  19.        test al,bl                   ; sein oder nichtsein?
  20.        jp exit2
  21.        mov cx,0000h                 ; dann eben nicht...
  22. exit2: mov ax,cx
  23.        or ax,ax
  24.        ret 2                        ; siehe oben...
  25. button endp                         ; und fertig...
  26.  
  27. code ends
  28. end
  29. ;---------------------- Ende BUTTON.ASM -------------------
  30.