a4: rückwärts zählen und ausgeben
This commit is contained in:
parent
fa34bd80b8
commit
98c8ddf1b8
@ -13,7 +13,7 @@ status db 00000000b ; Statusbyte
|
||||
|
||||
tcounts db 0 ; Impulszaehler fuer Servo, Vorwaertszaehler
|
||||
tcountv dw 100 * twait ; Impulszaehler fuer Verzoegerung * 10ms
|
||||
; Rueckwaertszaehler
|
||||
count db 8 ; Rueckwaertszaehler
|
||||
frei db 'frei ', 0 ; Texte
|
||||
belegt db 'belegt ', 0
|
||||
|
||||
@ -85,9 +85,26 @@ start:
|
||||
again:
|
||||
|
||||
; Ihr Programmcode...
|
||||
;Ausgabe der Zähler Variable
|
||||
mov ax, [count]
|
||||
|
||||
cmp ax, 0x0
|
||||
jz ifzero
|
||||
|
||||
mov al, [count]
|
||||
out leds, al
|
||||
|
||||
jmp again
|
||||
|
||||
|
||||
|
||||
ifzero:
|
||||
mov al, 0x3F
|
||||
out sseg7, al
|
||||
mov ax, [pieces]
|
||||
mov [count], ax
|
||||
ret
|
||||
|
||||
|
||||
; Initialisierung Controller und Interruptsystem
|
||||
|
||||
init:
|
||||
@ -161,6 +178,11 @@ isr_opentimer_out: ; Ausgang aus dem Service
|
||||
iret
|
||||
|
||||
isr_lt: ; Lichttaster
|
||||
mov ax, [count];Zählen
|
||||
dec ax
|
||||
mov [count], ax
|
||||
iret
|
||||
|
||||
|
||||
; Ihr Programmcode
|
||||
|
||||
@ -179,3 +201,4 @@ isr_servotimer_out: ; Ausgang aus dem Service
|
||||
out ocw_2_3, al
|
||||
iret
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user