What did the voltmeter say when the car was running? Get a meter and read the voltage across the battery terminals.
If the car runs, there's at least 9 volts available to run the computer and ignition. It could be that the battery was discharged to the point that it couldn't start the car, but had enough charge to keep it running. And, if the alternator is bad, it didn't charge the battery; that's where you need to know what the car's voltmeter was reading. It should read between 13 and 14 volts when the car is running, a little over 12 volts with the engine not running and the ignition on.