A common phrase which I hear all the time as an Atheist is "Where do you get your morals from if not from the bible?". I can't speak for all atheists on this point, but here is one alternative explanation for the origin of a moral code.
My morality comes from being able to to put myself in the position of other people. As a human being, we have evolved this awesome brain function that allows us to reason the workings of other peoples minds. In cognitive psychology, this is called "Theory of mind", and develops in children around the age of 4.
With this function, we can experience a state of mind known as 'empathy'. Empathy is being able to recognize and understand the feelings and emotions of others.
We also have a function which allows us to imagine future events, and the outcomes of these events.
With these two functions put together, we can figure out the emotional outcome for others, in a hypothetical situation.
Using this tool unconsciously allows me to determine acts that are "good" from "bad" for any given situation. This is the foundation of my morality. And from this, I can effectively function as a good person in the world.
To derive the distinction between good and bad, I use the premise that people should try to maximize happiness and reduce suffering in conscious creatures, and that something that maximizes happiness or reduces suffering is morally good. Why should you accept this premise? Assuming there is no god (as Atheists do), the responsibility for our actions lies with the individual. The individual and their experience is now the highest level of being that can determine good and bad. Thus, it makes sense that any action to optimize the net experience of conscious minds can be considered good.
The fundamental principal is to act to benefit the experience of conscious creatures. This can be manifested by treating others the way you would like to be treated.
I would argue that this fundamental principal is how all humans derive their morality, regardless of what they think the source of their morality is.