This is kind of a broad question that I doubt anyone will be able to answer in a single post. Windows 3.1x abandoned the concept TSR's in favor of VxD's (Virtual Device Drivers). So if you want information on creating them, I would suggest searching for VxD specifically. That said, I can only really think of two decent resources of information for getting you started in NASM VxD's. Luckily, however, they are REALLY good resources.
TomCat's Win32NASM PageThis site contains a VxD Howto with include files. This was designed specifically for the Netwide Assembler and should work for your purposes. One thing to note, when reading the tutorial, it expects you to already know VxD programming in MASM (it's a translation Howto). So before you read the howto, you might want to check out....
Iczelion's TutorialsThis site contains a ton of really nice tutorials, albeit for MASM, on Windows assembly programming. If you scroll down, you'll see that Iczelion has a 9-part tutorial on programming VxD's for MASM.