I've found that (at least the first) reason for the segfault is this line:
The %esi register contains the parameters for the whole program, and this line is identical to functioning procedures for getting both chars and strings, so I gather there must be some other method of handling ints?