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