Carbon dioxide assimilation in oxygenic and anoxygenic photosynthesis