Hi guys
I did a circuit to interface 7-segment with 8255 PPI ( which is inside the MTS trainer ) .. and I made this assembly program codes to display the number from 0 to F , and it work fine ..
But now I have to use ( two ) 7-segment displays to show numbers from 00 to 99 ( 00- 01- 02 .... 99 )
so How can I modify my codes to satisfy this purpose ?!
View attachment 68841
please help
jan de,
I did a circuit to interface 7-segment with 8255 PPI ( which is inside the MTS trainer ) .. and I made this assembly program codes to display the number from 0 to F , and it work fine ..
But now I have to use ( two ) 7-segment displays to show numbers from 00 to 99 ( 00- 01- 02 .... 99 )
so How can I modify my codes to satisfy this purpose ?!
View attachment 68841
Code:
_______________
PORTA EQU 0FFF9H
PORTB EQU 0FFFBH
CNT EQU 0FFFFH
CODE SEGMENT
ASSUME CS:CODE, DS:CODE
ORG 0
START: MOV DX, CNT ; this part for sending the control word
MOV AL, 80H
OUT DX, AL
J1: MOV BL,16
MOV SI, OFFSET FONT
MOV DX, PORTB ; turn ON the FND
MOV AL, 11H
OUT DX, AL
J2: MOV AL, [SI]
MOV DX, PORTA
OUT DX, AL
MOV CX, 0FFFFH
LOOP $
INC SI
DEC BL
JNZ J2
; PGFEDCBA
FONT DB 11000000B ;HEXA0
DB 11111001B ;HEXA1
DB 10100100B ;HEXA2
DB 10110000B ;HEXA3
DB 10011001B ;HEXA4
DB 10010010B ;HEXA5
DB 10000010B ;HEXA6
DB 11011000B ;HEXA7
DB 10000000B ;HEXA8
DB 10010000B ;HEXA9
DB 10001000B ;HEXA A
DB 10000011B ;HEXA B
DB 11000110B ;HEXA C
DB 10100001B ;HEXA D
DB 10000110B ;HEXA E
DB 10001110B ;HEXA F
CODE ENDS
END START
_______________________
please help
jan de,
Last edited: