Reading from PROGMEM

In the code below the segments for the seven segment display are driven from PORTD

#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include <math.h>
#include <util/delay.h>

static const uint8_t PROGMEM sevsegascii_table[] = {
  0x00, 0x6, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x7, 0x7F, 0x6F, 0x40 // 0 1 2 3 4 5 6 7 8 9 -
};

void displayNumber(int number);
void printNumber(int number);
volatile int num;
volatile int ones;
volatile int tens;
volatile int hundreds;
volatile int thousands;

void printNumber(int number)
{
  int temp = 0;
  //splitting the number into separate numbers
  //to display on the 4 digit 7-segment display
  thousands = floor(number / 1000);
  temp = number % 1000;
  hundreds = floor(temp/100);
  temp = number % 100;
  tens = floor(temp/10);
  ones = temp % 10;
}
//displaying the number on the 7 segment display
void displayNumber(int number)
{
  if (number<0) {
    number*=-1;
  } 
  PORTD = pgm_read_byte(&sevsegascii_table[number]);
}

Is it possible to have the seven segments driven from PORT B and D as PORTD0 and PORTD2 are required for external interrupts.

What changes are required to be made? Target AVR is Atmega8@16MHz

BTW this is not the complete code.

Regards.

The title of your topic should better match the question.

Sure, it is possible. Just use PORTB instead of PORTD and of course you have to have connected appropriate pins on MCU (see the datasheet). However there is probably crystal or resonator on PB6 and PB7 as you referred Atmega8@16MHz. Maybe you could use PORTC. There are just 7 pins on C but you are not using PD7 either (it is always 0 ?). Another solution is to combine pins from 2 ports. Each pin can be driven separately by appropriate bit so it is not problem. You need not to afraid of response time cause ATmega at 16MHz is fast enough so small overhead in the code cannot be observable by naked eye.