First cut at AE Subroutine.

Need to add test cases, and individual subroutines for each different
input type (byte, word, long).