41c271da (kx 2025-01-05 15:42:39 +0300 1) .TH imul 3 "December 27, 2024" "libmpu" "LibMPU Programmer's Manual"
41c271da (kx 2025-01-05 15:42:39 +0300 2) .SH NAME
41c271da (kx 2025-01-05 15:42:39 +0300 3) \fBimul\fP \- unsigned integer multiplication
41c271da (kx 2025-01-05 15:42:39 +0300 4) .SH SYNOPSIS
41c271da (kx 2025-01-05 15:42:39 +0300 5) .nf
41c271da (kx 2025-01-05 15:42:39 +0300 6) .B #include <libmpu.h>
41c271da (kx 2025-01-05 15:42:39 +0300 7) .PP
41c271da (kx 2025-01-05 15:42:39 +0300 8) .BI "void imul( mpu_int *" prod ", mpu_int *" num ", mpu_int *" mul ", int " nb_prod ", int " nb_num " );
41c271da (kx 2025-01-05 15:42:39 +0300 9) .fi
41c271da (kx 2025-01-05 15:42:39 +0300 10) .SH DESCRIPTION
41c271da (kx 2025-01-05 15:42:39 +0300 11) The function \fBimul()\fP performs the unsigned multiplication operation of the variable located
41c271da (kx 2025-01-05 15:42:39 +0300 12) at the address \fBnum\fP by the variable located at the address \fBmul\fP. The result is placed
41c271da (kx 2025-01-05 15:42:39 +0300 13) at \fBprod\fP. The contents of the memory at addresses \fBnum\fP, \fBmul\fP are not changed, and
41c271da (kx 2025-01-05 15:42:39 +0300 14) the previous memory contents at address \fBprod\fP are lost. The \fBnb_prod\fP parameter determines
41c271da (kx 2025-01-05 15:42:39 +0300 15) the size of the operand (in bytes) located at address \fBprod\fP, and the \fBnb_num\fP parameter
41c271da (kx 2025-01-05 15:42:39 +0300 16) determines the size of operands (in bytes) located at addresses \fBnum\fP, \fBmul\fP.
41c271da (kx 2025-01-05 15:42:39 +0300 17) .PP
41c271da (kx 2025-01-05 15:42:39 +0300 18) The function affects the flags \fBA\fP, \fBC\fP, \fBO\fP, \fBP\fP, \fBS\fP, \fBZ\fP, \fBR\fP.
41c271da (kx 2025-01-05 15:42:39 +0300 19) .PP
41c271da (kx 2025-01-05 15:42:39 +0300 20) The \fBA\fP flag is reset to 0. The \fBP\fP flag is set only when the size of the \fBprod\fP
41c271da (kx 2025-01-05 15:42:39 +0300 21) operand is one or two bytes (\fBnb\fP == 1 || \fBnb\fP == 2). Flag \fBR\fP (major || remainder)
41c271da (kx 2025-01-05 15:42:39 +0300 22) is set in the case that the resulting product requires a larger size than defined by
41c271da (kx 2025-01-05 15:42:39 +0300 23) \fBnb_prod\fP parameter.
41c271da (kx 2025-01-05 15:42:39 +0300 24) .sp
41c271da (kx 2025-01-05 15:42:39 +0300 25) .SH SEE ALSO
41c271da (kx 2025-01-05 15:42:39 +0300 26) .BR iadd(3),
41c271da (kx 2025-01-05 15:42:39 +0300 27) .BR isub(3),
41c271da (kx 2025-01-05 15:42:39 +0300 28) .BR iadc(3),
41c271da (kx 2025-01-05 15:42:39 +0300 29) .BR isbb(3),
41c271da (kx 2025-01-05 15:42:39 +0300 30) .BR ishl(3),
41c271da (kx 2025-01-05 15:42:39 +0300 31) .BR ishr(3),
41c271da (kx 2025-01-05 15:42:39 +0300 32) .BR isal(3),
41c271da (kx 2025-01-05 15:42:39 +0300 33) .BR isar(3),
41c271da (kx 2025-01-05 15:42:39 +0300 34) .BR irol(3),
41c271da (kx 2025-01-05 15:42:39 +0300 35) .BR iror(3),
41c271da (kx 2025-01-05 15:42:39 +0300 36) .BR ircl(3),
41c271da (kx 2025-01-05 15:42:39 +0300 37) .BR ircr(3),
41c271da (kx 2025-01-05 15:42:39 +0300 38) .BR ishln(3),
41c271da (kx 2025-01-05 15:42:39 +0300 39) .BR ishrn(3),
41c271da (kx 2025-01-05 15:42:39 +0300 40) .BR isaln(3),
41c271da (kx 2025-01-05 15:42:39 +0300 41) .BR isarn(3),
41c271da (kx 2025-01-05 15:42:39 +0300 42) .BR iroln(3),
41c271da (kx 2025-01-05 15:42:39 +0300 43) .BR irorn(3),
41c271da (kx 2025-01-05 15:42:39 +0300 44) .BR ircln(3),
41c271da (kx 2025-01-05 15:42:39 +0300 45) .BR ircrn(3),
41c271da (kx 2025-01-05 15:42:39 +0300 46) .BR ineg(3),
41c271da (kx 2025-01-05 15:42:39 +0300 47) .BR inot(3),
41c271da (kx 2025-01-05 15:42:39 +0300 48) .BR iand(3),
41c271da (kx 2025-01-05 15:42:39 +0300 49) .BR itest(3),
41c271da (kx 2025-01-05 15:42:39 +0300 50) .BR icmp(3),
41c271da (kx 2025-01-05 15:42:39 +0300 51) .BR ior(3),
41c271da (kx 2025-01-05 15:42:39 +0300 52) .BR ixor(3),
41c271da (kx 2025-01-05 15:42:39 +0300 53) .BR iinc(3),
41c271da (kx 2025-01-05 15:42:39 +0300 54) .BR idec(3),
41c271da (kx 2025-01-05 15:42:39 +0300 55) .BR ixchg(3),
41c271da (kx 2025-01-05 15:42:39 +0300 56) .BR icpy(3),
41c271da (kx 2025-01-05 15:42:39 +0300 57) .BR icvt(3),
41c271da (kx 2025-01-05 15:42:39 +0300 58) .BR ismul(3),
41c271da (kx 2025-01-05 15:42:39 +0300 59) .BR idiv(3),
41c271da (kx 2025-01-05 15:42:39 +0300 60) .BR isdiv(3),
41c271da (kx 2025-01-05 15:42:39 +0300 61) .BR iatoi(3),
41c271da (kx 2025-01-05 15:42:39 +0300 62) .BR iatoui(3),
41c271da (kx 2025-01-05 15:42:39 +0300 63) .BR iitoa(3),
41c271da (kx 2025-01-05 15:42:39 +0300 64) .BR iuitoa(3).