You can cheat a little bit and use RET rather than INT 21h to save a few bytes.
The way this works is pretty clever - the COM loader places an INT 20h instruction (the old-style terminate function) at offset 0 in the PSP (the 100h-byte-long structure loaded right before the contents of the COM file). The loader also sets up the word above the initial stack pointer to 0 so that a RET will return to address 0 and execute the INT 20h.
And the RET saves you one byte over the INT 20h. Oh what a different world we live in now.
Wasn't there a Phrack Magazine article on typing in software from memory using debug.com? COM-files are funny. I seem to recall "echo d > restart.com" (or possibly "D") would give you a quick way to reboot a 3.11 machine (probably due to some crash or other, I never investigated why it worked - but a couple of other random characters would usually end up with a freeze...
As an exercise for the reader use the RET instruction instead of doing the return code stuff. If you want to really get into you you can look up how to read from the console and then display that string back to the user.