this programs displays key count on single 7-segment display
so when key is pressed – interrupt is generated – counter increments (c++)
the counter c takes values from 0 to 9 only
so in switch case all values from 0 to 9 are given.
the HEX value given to PORT0 coresponds to 7-segment code that will display that digit on 7-segment