Per andare a colpo sicuro potrei alla fine delle subroutines azzerare i registri che poi uso nel main?