a4: Änderungen
This commit is contained in:
parent
3cc43f71d0
commit
0edbf6ab02
@ -16,6 +16,7 @@ tcountv dw 100 * twait ; Impulszaehler fuer Verzoegerung * 10ms
|
||||
; Rueckwaertszaehler
|
||||
frei db 'frei ', 0 ; Texte
|
||||
belegt db 'belegt ', 0
|
||||
dir db 20
|
||||
|
||||
; Konstanten
|
||||
divider equ 0 ; Platzhalter fuer Ihre Zeitkonstante1
|
||||
@ -121,7 +122,7 @@ ifzero:
|
||||
ifbelowzero:
|
||||
|
||||
mov dx, pieces << shcnt
|
||||
and dx, 10000001b
|
||||
and dx, 10000010b
|
||||
mov [status], dx
|
||||
|
||||
|
||||
@ -194,26 +195,29 @@ init:
|
||||
isr_opentimer: ; Timer fuer Vereinzeler (Zeit fuer Oeffnung)
|
||||
push ax
|
||||
|
||||
; Ihr Programmcode
|
||||
;Zeit abgelaufen ?
|
||||
inc byte [divider]
|
||||
cmp byte [divider], tcountv
|
||||
jne isr_opentimer_out
|
||||
mov ah, [divider]
|
||||
mov al, [status]
|
||||
test al, 00000010b
|
||||
jz isr_opentimer_out
|
||||
|
||||
mov ax, [status]
|
||||
and ax, 11111110b
|
||||
mov [status], ax
|
||||
inc ah
|
||||
cmp ah, [tcountv]
|
||||
jnz isr_opentimer_out
|
||||
|
||||
|
||||
mov ah, 0
|
||||
mov byte[dir], trechts
|
||||
and al, 0xfd
|
||||
|
||||
isr_opentimer_out: ; Ausgang aus dem Service
|
||||
mov [status], al
|
||||
mov [divider], ah
|
||||
mov al, eoi ; EOI an PIC
|
||||
out ocw_2_3, al
|
||||
pop ax
|
||||
iret
|
||||
|
||||
isr_lt: ; Lichttaster
|
||||
; Ihr Programmcode
|
||||
push ax
|
||||
|
||||
mov al, [status]
|
||||
@ -223,12 +227,25 @@ isr_lt: ; Lichttaster
|
||||
times shcnt shl al, 1
|
||||
and byte [status], 00001111b
|
||||
or [status], al
|
||||
|
||||
mov [status], al
|
||||
|
||||
and al, 11111101b
|
||||
cmp al, 0b
|
||||
jz left
|
||||
cmp al, 10b
|
||||
je right
|
||||
|
||||
left:
|
||||
mov byte[dir], tlinks
|
||||
jmp isr_lt_out
|
||||
|
||||
right:
|
||||
mov byte[dir], trechts
|
||||
jmp isr_lt_out
|
||||
|
||||
|
||||
isr_lt_out: ; Ausgang aus dem Service
|
||||
mov [status], al
|
||||
or byte [status], 00000001b
|
||||
or byte [status], 00000010b
|
||||
mov al, eoi ; EOI an PIC
|
||||
out ocw_2_3, al
|
||||
pop ax
|
||||
@ -236,20 +253,24 @@ isr_lt_out: ; Ausgang aus dem Service
|
||||
|
||||
isr_servotimer: ; Timer fuer Servo (Vereinzeler)
|
||||
push ax
|
||||
push bx
|
||||
; Ihr Programmcode
|
||||
mov bl, [status]
|
||||
and bl, 11111110b
|
||||
|
||||
mov ah, [tcounts]
|
||||
inc ah
|
||||
cmp ah, [dir]
|
||||
jnz auf
|
||||
out ppi_a, al
|
||||
|
||||
cmp bl, 0x0
|
||||
jz auf
|
||||
auf:
|
||||
cmp ah, tpwm
|
||||
jnz isr_servotimer_out
|
||||
mov al, ppi_pa6
|
||||
out ppi_a, al
|
||||
|
||||
jmp isr_servotimer_out
|
||||
|
||||
|
||||
isr_servotimer_out: ; Ausgang aus dem Service
|
||||
mov al, eoi ; EOI an PIC
|
||||
out ocw_2_3, al
|
||||
pop bx
|
||||
pop ax
|
||||
iret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user