Math Processor Unit Library

libmpu – library of arithmetic functions for integer, real, and complex numbers of increased digit capacity

16 Commits   0 Branches   2 Tags
41c271da (kx 2025-01-05 15:42:39 +0300  1) .TH icvt 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) \fBicvt\fP \- integer value conversion
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 icvt( mpu_int *" c ", mpu_int *" a ", int " nb_c ", int " nb_a " );
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 \fBicvt()\fP function performs the operation of converting the value of the \fBa\fP variable
41c271da (kx 2025-01-05 15:42:39 +0300 12) into the value of a larger or smaller variable with preserving the value (and sign). The result
41c271da (kx 2025-01-05 15:42:39 +0300 13) is placed at \fBc\fP. The contents of the memory at address \fBa\fP are not changed, the previous
41c271da (kx 2025-01-05 15:42:39 +0300 14) memory contents at \fBc\fP are lost. The \fBnb_c\fP parameter determines the size of the operand
41c271da (kx 2025-01-05 15:42:39 +0300 15) (in bytes) located at address \fBc\fP, and the \fBnb_a\fP parameter determines the size of the
41c271da (kx 2025-01-05 15:42:39 +0300 16) operand (in bytes) located at the address \fBa\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 \fBO\fP, \fBP\fP, \fBS\fP, \fBZ\fP.
41c271da (kx 2025-01-05 15:42:39 +0300 19) .PP
41c271da (kx 2025-01-05 15:42:39 +0300 20) The flags \fBA\fP, \fBC\fP do not change (the previous value is retained). The \fBP\fP
41c271da (kx 2025-01-05 15:42:39 +0300 21) flag is set only when the size of the \fBc\fP operand is equal to one or two bytes
41c271da (kx 2025-01-05 15:42:39 +0300 22) (\fBnb\fP == 1 || \fBnb\fP == 2).
41c271da (kx 2025-01-05 15:42:39 +0300 23) .sp
41c271da (kx 2025-01-05 15:42:39 +0300 24) .SH SEE ALSO
41c271da (kx 2025-01-05 15:42:39 +0300 25) .BR iadd(3),
41c271da (kx 2025-01-05 15:42:39 +0300 26) .BR isub(3),
41c271da (kx 2025-01-05 15:42:39 +0300 27) .BR iadc(3),
41c271da (kx 2025-01-05 15:42:39 +0300 28) .BR isbb(3),
41c271da (kx 2025-01-05 15:42:39 +0300 29) .BR ishl(3),
41c271da (kx 2025-01-05 15:42:39 +0300 30) .BR ishr(3),
41c271da (kx 2025-01-05 15:42:39 +0300 31) .BR isal(3),
41c271da (kx 2025-01-05 15:42:39 +0300 32) .BR isar(3),
41c271da (kx 2025-01-05 15:42:39 +0300 33) .BR irol(3),
41c271da (kx 2025-01-05 15:42:39 +0300 34) .BR iror(3),
41c271da (kx 2025-01-05 15:42:39 +0300 35) .BR ircl(3),
41c271da (kx 2025-01-05 15:42:39 +0300 36) .BR ircr(3),
41c271da (kx 2025-01-05 15:42:39 +0300 37) .BR ishln(3),
41c271da (kx 2025-01-05 15:42:39 +0300 38) .BR ishrn(3),
41c271da (kx 2025-01-05 15:42:39 +0300 39) .BR isaln(3),
41c271da (kx 2025-01-05 15:42:39 +0300 40) .BR isarn(3),
41c271da (kx 2025-01-05 15:42:39 +0300 41) .BR iroln(3),
41c271da (kx 2025-01-05 15:42:39 +0300 42) .BR irorn(3),
41c271da (kx 2025-01-05 15:42:39 +0300 43) .BR ircln(3),
41c271da (kx 2025-01-05 15:42:39 +0300 44) .BR ircrn(3),
41c271da (kx 2025-01-05 15:42:39 +0300 45) .BR ineg(3),
41c271da (kx 2025-01-05 15:42:39 +0300 46) .BR inot(3),
41c271da (kx 2025-01-05 15:42:39 +0300 47) .BR iand(3),
41c271da (kx 2025-01-05 15:42:39 +0300 48) .BR itest(3),
41c271da (kx 2025-01-05 15:42:39 +0300 49) .BR icmp(3),
41c271da (kx 2025-01-05 15:42:39 +0300 50) .BR ior(3),
41c271da (kx 2025-01-05 15:42:39 +0300 51) .BR ixor(3),
41c271da (kx 2025-01-05 15:42:39 +0300 52) .BR iinc(3),
41c271da (kx 2025-01-05 15:42:39 +0300 53) .BR idec(3),
41c271da (kx 2025-01-05 15:42:39 +0300 54) .BR ixchg(3),
41c271da (kx 2025-01-05 15:42:39 +0300 55) .BR icpy(3),
41c271da (kx 2025-01-05 15:42:39 +0300 56) .BR imul(3),
41c271da (kx 2025-01-05 15:42:39 +0300 57) .BR ismul(3),
41c271da (kx 2025-01-05 15:42:39 +0300 58) .BR idiv(3),
41c271da (kx 2025-01-05 15:42:39 +0300 59) .BR isdiv(3),
41c271da (kx 2025-01-05 15:42:39 +0300 60) .BR iatoi(3),
41c271da (kx 2025-01-05 15:42:39 +0300 61) .BR iatoui(3),
41c271da (kx 2025-01-05 15:42:39 +0300 62) .BR iitoa(3),
41c271da (kx 2025-01-05 15:42:39 +0300 63) .BR iuitoa(3).