;#############################################
;### Videotextdekoder-spezifische Routinen ###
;#############################################
;macro AcqOff ;Akquisitoren ausschalten
;macro AcqOn ;Akquisitoren einschalten
;proc ProgAcq
;Programmiert VTD auf die Suche nach
;PE: DX=Seite, Bit 15=Wildcard-Flag
; CX=Unterseite, Bit 15=Wildcard-Flag
; BH=Akquisitor-Nummer 0..3(..7)
;PA: CY=1: Fehler auf I2C-Bus
;VR: AX, ein paar Bytes von [Buf]
;proc GetPageInfo
;hole aus [SI] (Abbild der Zeile 25) die Angaben über:
;DX- Seite
;CX- Unterseite
;BX- C-Bits
;AH- HamErrors
;VR:AX,SI
;*********************************************
macro AcqOff ;Akquisitoren ausschalten
mov si,ofs AcqOff$
call SStrI2C
endm
macro AcqOn ;Akquisitoren einschalten
mov si,ofs AcqOn$ ;Extension Packet Enable=ON, 60Hz=OFF
call SStrI2C
endm
;#############################################
proc ProgAcq
;Programmiert VTD auf die Suche nach
;PE: DX=Seite, Bit 15=Wildcard-Flag
; CX=Unterseite, Bit 15=Wildcard-Flag
; BH=Akquisitor-Nummer 0..3(..7)
;PA: CY=1: Fehler auf I2C-Bus
;VR: AX, ein paar Bytes von [Buf]
push di cx dx cx
mov cx,0f04h ;Standardschiebelänge
mov di,ofs Buf0 ;Liegt vor dem Puffer
; mov ax,0401h ;Ab Register 1 (mit ACQON)
; stosw
mov al,2 ;Ab Register 2
stosb
mov al,bh
shl al,cl
stosb ;Acq-Nummer
mov al,dh
or al,8 ;/HOLD =1, also NotHold
call @@Stoss3BytesAL ;entspr. DoCare einpopeln
pop dx ;Subp
call @@Stoss4Bytes ;Gemeinsame Routine
call SBufEI2C ;von Buf bis [DI], ganz simpel!?
pop dx cx di ;restaurieren
ret
@@Stoss4Bytes: ;Für Subpage
mov al,dh
shr al,cl ;cx immer noch =0f04h
call @@StossByte
mov al,dh
@@Stoss3BytesAL: ;für Page
and al,ch
call @@StossByte
mov al,dl
shr al,cl
call @@StossByte
mov al,dl
and al,ch
@@StossByte:
test dh,80h ;DontCare?
jnz @@StossNoCare
or al,10h
@@StossNoCare:
stosb
ret
endp
proc GetPageInfo
;hole aus [SI] (Abbild der Zeile 25) die Angaben über:
;DX- Seite
;CX- Unterseite
;BX- C-Bits
;AH- HamErrors
;VR:AX,SI
mov cx,0004h ;CH=Speicher für HamErrors
call @@i
mov dl,al ;Einer
call @@i
shl al,cl ;Zehner
or dl,al
push dx
call @@i
mov dl,al
call @@i
mov ah,al ;C4 retten
and al,7
shl al,cl
or dl,al
shl ah,1
and ah,10h
mov bl,ah
call @@i
mov dh,al
call @@i
shl al,cl
mov ah,al
and al,30h
or dh,al
shr ah,1 ;C5 und C6
and ah,60h
or bl,ah
xor ah,ah
call @@i
shr al,1
rcr ah,1
or bl,ah ;C7 bis C10
mov bh,al
call @@i
dec cl ;CL=3
shl al,cl
or bh,al ;C11 bis C14
mov ah,ch ;HamErrors nach AH
xchg cx,dx ;Unterseite nach CX
pop dx
lodsb
and al,7 ;Magazin
mov dh,al
ret
@@I: lodsb
test al,10h
jz @@1
stc
@@1: rcr ch,1 ;Carry einschieben
and al,0fh ;nur unteres Nibble
ret
endp
Detected encoding: OEM (CP437) | 1
|
|