For signed & unsigned int (16 bit) and long (32 bit) variables, division, multiplication and modulus operations are implemented by support routines. These support routines are all developed in ANSI-C to facilitate porting to other MCUs. The following files contain the described routine, all of them can be found in the directory SDCCDIR/sdcc51lib
All these routines are compiled as non-reentrant and small model. Since they are compiled as non-reentrant, interrupt service routines should not do any of the above operations, if this unavoidable then the above routines will need to ne compiled with the --stack-auto option, after which the source program will have to be compiled with --int-long-rent option.