What am I missing?
You're missing WBStartUp message.
You need to WaitPort your process' pr_MsgPort, and GetMsg the wbstartup message from it. Then you can continue with normal business...
When exiting you must Forbid() and ReplyMsg() the startup message you got. *NO* matching Permit() just rts.
You can see small example in my
hwstartup.asm