Add test for writing to $0

Code by @artart78, I just compiled and ran it.

-[Unknown]