unsigned int _divuint (unsigned int a, unsigned int b)
{
unsigned int reste = 0 ;
- unsigned short count = 16;
+ unsigned char count = 16;
bit c;
do{
{
unsigned long reste = 0L;
unsigned char count = 32;
- short c;
+ char c;
do{
// reste:a <- 0;
volatile unsigned long mask;
volatile long mant1, mant2;
volatile int exp ;
- short sign;
+ char sign;
fl1.f = a1;
fl2.f = a2;
volatile union float_long fl1, fl2;
volatile unsigned long result;
volatile int exp;
- short sign;
+ char sign;
fl1.f = a1;
fl2.f = a2;
unsigned int _moduint (unsigned int a ,unsigned int b)
{
- unsigned short count = 0;
+ unsigned char count = 0;
while (!MSB_SET(b)) {
unsigned long _modulong (unsigned long a ,unsigned long b)
{
- unsigned short count = 0;
+ unsigned char count = 0;
while (!MSB_SET(b)) {
// we have to do it the hard way
union uu {
- struct { unsigned short lo,hi ;} s;
+ struct { unsigned char lo,hi ;} s;
unsigned int t;
};
}
}
-short
+char
ser_charAvail(void)
{
- short ret = 0;
+ char ret = 0;
if (ser_rxIndexIn != ser_rxIndexOut) {
ret = 1;
format output type argument-type
%d decimal int
%ld decimal long
- %hd decimal short/char
+ %hd decimal char
%x hexadecimal int
%lx hexadecimal long
- %hx hexadecimal short/char
+ %hx hexadecimal char
%o octal int
%lo octal long
- %ho octal short/char
- %c character char/short
+ %ho octal char
+ %c character char
%s character _generic pointer
*/
static data char radix ;
static bit long_flag = 0;
static bit string_flag =0;
-static bit short_flag = 0;
+static bit char_flag = 0;
static bit sign;
static char * data str ;
static data long val;
if (!long_flag) {
lval &= 0x0000ffff;
}
- if (short_flag) {
+ if (char_flag) {
lval &= 0x000000ff;
}
{
#if 1
if(radix != 16) ch = (lval % radix) + '0';
- else ch = "0123456789ABCDEF"[(unsigned short)lval & 0x0f];
+ else ch = "0123456789ABCDEF"[(unsigned char)lval & 0x0f];
_asm push _ch _endasm;
lval /= radix;
#else
for (; *fmt ; fmt++ ) {
if (*fmt == '%') {
- long_flag = string_flag = short_flag = 0;
+ long_flag = string_flag = char_flag = 0;
fmt++ ;
switch (*fmt) {
case 'l':
fmt++;
break;
case 'h':
- short_flag = 1;
+ char_flag = 1;
fmt++;
}
if (long_flag)
val = va_arg(ap,long);
else
- if (short_flag)
- val = va_arg(ap,short);
+ if (char_flag)
+ val = va_arg(ap,char);
else
val = va_arg(ap,int);
/* this one NEEDS to be in data */
static data value_t value;
-static unsigned short radix;
+static unsigned char radix;
// jwk: TODO: this makes the whole dammed thing nonreentrent
static int charsOutputted;