home *** CD-ROM | disk | FTP | other *** search
- ;----------------------- ANALOG.ASM -----------------------
- ; Abfrage eines Game Adapters unter BCI Pascal
- ; Function Analog (Maske) : integer
- ;---------------------- 1987 by M.A. ----------------------
- public analog
- code segment byte public 'PASCAL' ; ... Grüße an BCI ...
- assume cs:code
-
- analog proc far ; Abfrage Analogeingang
- pop bx
- push cs
- push bx ; hier geht's zurück
- mov si,sp
- mov bx,[si+4] ; hole Maske
- mov dx,0201h ; Portadresse
- mov cx,0000h ; unser Zähler
- mov ah,00h
- out dx,al ; starte Messung
- loop: in al,dx ; Wert einlesen
- and al,0fh ; Buttons ausblenden
- test al,bl ; schon fertig?
- jp exit1
- inc cx ; Zähler erhöhen
- cmp cx,1fffh ; kleine Notbremse
- jne loop
- exit1: mov ax,cx ; Ergebnis übergeben
- or ax,ax ; Flags säubern
- ret 2 ; Stack säubern
- analog endp ; und fertig...
-
- code ends
- end
- ;---------------------- Ende ANALOG.ASM -------------------