The answer is "it all depends". On precisely what circuitry is inside whatever you are trying to run. Some things, like light bulbs, are a purely resistive load and they don't care about sine-vs-square waves. Other devices with motors or inductors canget terribly upset about square wave.
And laptop batteries these days--including Compaq--are not batteries at all. The battery pack has a fairly complex charge control circuit board in it, with more electronics than the typical 'transistor' radio or other small appliance.
If you can't contact whoever makes your power adapter (brick, etc.) and you can't find out if square wave is safe for it, assume it isn't, unless you know exactly what is inside.