a4: kleinere Änderungen, hauptsächlich Statusbit wieder zurücksetzen
This commit is contained in:
parent
0edbf6ab02
commit
c243625e49
|
@ -65,6 +65,7 @@ tcwait equ 18432 ; 1843200 Hz / 18432 = 100 Hz => 10 ms
|
|||
twait equ 1 ; Wartezeit fuer offenen Vereinzeler (s)
|
||||
shcnt equ 4 ; Shiftcount Anzahl Teile
|
||||
pieces equ 8 ; Anzahl Teile initial
|
||||
lastBit equ 00000001b
|
||||
|
||||
start:
|
||||
|
||||
|
@ -122,7 +123,7 @@ ifzero:
|
|||
ifbelowzero:
|
||||
|
||||
mov dx, pieces << shcnt
|
||||
and dx, 10000010b
|
||||
and dx, 10000001b
|
||||
mov [status], dx
|
||||
|
||||
|
||||
|
@ -198,19 +199,20 @@ isr_opentimer: ; Timer fuer Vereinzeler (Zeit fuer Oeffnung)
|
|||
;Zeit abgelaufen ?
|
||||
mov ah, [divider]
|
||||
mov al, [status]
|
||||
test al, 00000010b
|
||||
test al, 0x1
|
||||
jz isr_opentimer_out
|
||||
|
||||
;Wenn Zeit nicht abgelaufen
|
||||
inc ah
|
||||
cmp ah, [tcountv]
|
||||
jnz isr_opentimer_out
|
||||
|
||||
mov ah, 0
|
||||
mov byte[dir], trechts
|
||||
and al, 0xfd
|
||||
;mov ah, 0
|
||||
;mov byte[dir], trechts
|
||||
;and al, 11111110b
|
||||
|
||||
isr_opentimer_out: ; Ausgang aus dem Service
|
||||
mov [status], al
|
||||
;mov [status], al
|
||||
mov [divider], ah
|
||||
mov al, eoi ; EOI an PIC
|
||||
out ocw_2_3, al
|
||||
|
@ -219,6 +221,7 @@ isr_opentimer_out: ; Ausgang aus dem Service
|
|||
|
||||
isr_lt: ; Lichttaster
|
||||
push ax
|
||||
push bx
|
||||
|
||||
mov al, [status]
|
||||
times shcnt shr al, 1
|
||||
|
@ -229,7 +232,9 @@ isr_lt: ; Lichttaster
|
|||
or [status], al
|
||||
mov [status], al
|
||||
|
||||
and al, 11111101b
|
||||
mov bl, lastBit
|
||||
not bl
|
||||
and al, bl
|
||||
cmp al, 0b
|
||||
jz left
|
||||
cmp al, 10b
|
||||
|
@ -245,9 +250,10 @@ right:
|
|||
|
||||
|
||||
isr_lt_out: ; Ausgang aus dem Service
|
||||
or byte [status], 00000010b
|
||||
or byte [status], lastBit
|
||||
mov al, eoi ; EOI an PIC
|
||||
out ocw_2_3, al
|
||||
pop bx
|
||||
pop ax
|
||||
iret
|
||||
|
||||
|
@ -258,7 +264,9 @@ isr_servotimer: ; Timer fuer Servo (Vereinzeler)
|
|||
inc ah
|
||||
cmp ah, [dir]
|
||||
jnz auf
|
||||
mov al, 0
|
||||
out ppi_a, al
|
||||
jmp isr_servotimer_out
|
||||
|
||||
auf:
|
||||
cmp ah, tpwm
|
||||
|
|
Loading…
Reference in New Issue