Green’s Dictionary of Slang

so! excl.

used to add emphasis to a statement contradicting a negative assertion made by the previous speaker, e.g. ‘No you didn’t.’ ‘I did so!’.

[US](con. 1940s) I. Freeman Out of the Burning (1961) 21: ‘You can’t read,’ Millie would say. ‘Can so!’.
[UK]N. Armfelt Catching Up 159: I do so!