How to calculate the heat absorbed by a reversible process?
I assume you mean the first law as 

$$dU = \delta q + \delta w$$

where $dU$ is the (state) change in internal energy, $\delta q$ is the (path dependent) work, and $\delta w$ is the (path dependent) work.

Saying the walls are diathermal says something about temperature (as you should confirm). Then, you should find a relationship between temperature change and internal energy change for the substance in your system.