FAQ's
  • How do I make a reference to a value stored in Segment 1 with C language?
    • When referring to the content of program space on Segment 1, use "__far pointer" as shown below.

      Example
      #define SEG_ADDRESS_BASE 0x10000 //Define the base address of Segment 1

      int main( void )
      {

      unsigned char buffer[8];
      unsigned char i;

      for(i = 0; i < 8; i++){ //Read 8-byte from address 0000H in Segment 1
      buffer[i] = *((unsigned char __far*)SEG_ADDRESS_BASE + i);
      }

      }

      For __far pointer, refer to "1.4 NEAR/FAR" in "CCU8 Programming Guide".

      Related Products: ML610(Q)40x, ML610(Q)42x, ML610(Q)47x, ML610(Q)48x, ML610Q10x, ML610Q11x, ML610Q17x, ML610Q30x, ML610Q35x, ML610Q36x, ML610Q38x, ML610Q41x, ML610Q43x, ML610Q46x, ML620Q13x, ML620Q15x, ML620Q416/ML620Q418, ML620Q503H/ML620Q504H/ML620Q506H, ML62Q12xx, ML62Q13xx, ML62Q14xx, ML62Q15xx/ML62Q18xx, ML62Q16xx, ML62Q17xx

    • Products: General-purpose MCUs (16bit) , Speech Playback MCUs (8bit)