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
.TH icvt 3  "December 27, 2024" "libmpu" "LibMPU Programmer's Manual"
.SH NAME
\fBicvt\fP \- integer value conversion
.SH SYNOPSIS
.nf
.B #include <libmpu.h>
.PP
.BI "void icvt( mpu_int *" c ", mpu_int *" a ", int " nb_c ", int " nb_a " );
.fi
.SH DESCRIPTION
The \fBicvt()\fP function performs the operation of converting the value of the \fBa\fP variable
into the value of a larger or smaller variable with preserving the value (and sign). The result
is placed at \fBc\fP. The contents of the memory at address \fBa\fP are not changed, the previous
memory contents at \fBc\fP are lost. The \fBnb_c\fP parameter determines the size of the operand
(in bytes) located at address \fBc\fP, and the \fBnb_a\fP parameter determines the size of the
operand (in bytes) located at the address \fBa\fP.
.PP
The function affects the flags \fBO\fP, \fBP\fP, \fBS\fP, \fBZ\fP.
.PP
The flags \fBA\fP, \fBC\fP do not change (the previous value is retained). The \fBP\fP
flag is set only when the size of the \fBc\fP operand is equal to one or two bytes
(\fBnb\fP == 1 || \fBnb\fP == 2).
.sp
.SH SEE ALSO
.BR iadd(3),
.BR isub(3),
.BR iadc(3),
.BR isbb(3),
.BR ishl(3),
.BR ishr(3),
.BR isal(3),
.BR isar(3),
.BR irol(3),
.BR iror(3),
.BR ircl(3),
.BR ircr(3),
.BR ishln(3),
.BR ishrn(3),
.BR isaln(3),
.BR isarn(3),
.BR iroln(3),
.BR irorn(3),
.BR ircln(3),
.BR ircrn(3),
.BR ineg(3),
.BR inot(3),
.BR iand(3),
.BR itest(3),
.BR icmp(3),
.BR ior(3),
.BR ixor(3),
.BR iinc(3),
.BR idec(3),
.BR ixchg(3),
.BR icpy(3),
.BR imul(3),
.BR ismul(3),
.BR idiv(3),
.BR isdiv(3),
.BR iatoi(3),
.BR iatoui(3),
.BR iitoa(3),
.BR iuitoa(3).