Register-saving conventions
Procedures and functions should preserve the BP, SP, SS, and DS registers. All other registers can be modified.
An asm statement must preserve the BP, SP, SS, and DS registers, but can freely modify the AX, BX, CX, DX, SI, DI, ES, and Flags registers.