HI there,
Try to trim any loose flapping nail down as short as you can. Just like if we break our nail it is the flapping bit which hurts the most! Or if its loose enough and hanging by a tiny thread just pull it off ( yes he might yelp but will feel better as soon as its done). The nail will not resitck itself back together so the bit that is loose is effectively going to be dead and a new one will grown in. so the main thing for you to do is keep it clean ( cold water to clean it and it will help slow any bleeding), get the loose part trimmed and if it is bleeding you can use styptic pen or even corn starch in a pinch to help it clot.
You may need to use an elizabethan collar to stop him licking it if he wont let you cover it.
I am not a fan of asprin as I see too many patients with side effects from this. There are other safer and more effective pain meds your vet can give him. I usually suggest antibiotics too if the quick is very exposed and going to be a long time healing, so I would suggest that you get him checked by your vet tomorrow
Good luck