| Routines

79E4: 'G' pressed - get object

The address of this routine is found in the table of keypress handling routines at ED00. It is called from the main loop at F02B when 'G' is pressed.
Input
H | 0xE6 (Sam)
79E4 | LD A,$20 | Set bit 5 of Sam's status flags at 7FFC
79E6 | LD ($7FFC),A
79E9 | LD BC,$0003 | Copy bytes 0x00-0x02 of Sam's buffer (which hold his animatory state and coordinates) into bytes 0x05-0x07 for later retrieval
79EC | LD DE,$E605
79EF | LD L,B
79F0 | LDIR
79F2 | CALL $E9C8 | Update the SRB for Sam's current animatory state and location
79F5 | AND $80 | A=0x06 or 0x86: Sam bending his knees
79F7 | ADD A,$06
79F9 | CALL $E9D5 | Update Sam's animatory state and location and update the SRB
79FC | CALL $7603 | Check whether Sam has picked up the hook or the budgie and update the icon panel accordingly
79FF | LD H,$E6 | 0xE6=Sam
7A01 | JP $ECEE | Make a sound effect