Unplugging the battery will usually reset the CEL and the stored data on "other" tests run by the module. Here in Texas the CEL must be unlit and you must have "2 or less" of the other tests showing "failed" or "not reported" to pass inspection. "Not reported" means the car hasn't been run enough to report "pass or fail" for these tests. These other tests are usually on the 02 sensors or cats, can't remember what else. I would clear the CEL (unhook battery), drive the car for several days (100 miles), and if the CEL is still out it will probably pass inspection if they use that criteria where you are. I've got a '98 Escort that pops a P0171 code about every 4-5 weeks. Been using that procedure the last two years
BTW, I've got a laptop and an OBD-II interface I look at mine with before I get them inspected, but you can go to Autozone and get them to read the codes. Don't know if they can read the "other test" results for you.


Doug '96 Contour ZETEC T-Red/ATX