Microcanonical entropy and density of states for a macroscopic system