The ABS system is separate form the engine system, so there will be no code to pull in the conventional way. You could try doing a search on ABS codes. I think there was a way to short a plug and get blink codes for it.
Anyway, since both lights are on, what level of brake fluid do you have in the master cylinder? Have you ever cleaned out the filter basket in the master cylinder?
The reason I ask on the level is because there is a float in the cap that senses if the fluid is too low. It is also a possibility that the float is getting saturated with brake fluid and is not floating properly.
The reason I ask about the basket is a few of us have had brake light issues in the past and just wiping out all the nasty sludge in the basket fixed the problem. It has always been just the red brake warning light, not the ABS light, so it might not be related but it can't hurt to check.