port registering by macros