I tried mcs-51 project on Ubuntu through VMware, when compiled, it prompted lack of intrins.h, I added one, there was still some error, how to fix this?
my intrins.h:
#ifndef __INTRINS_H__#define __INTRINS_H__externvoid_nop_(void);//extern bit _testbit_ (bit);externunsignedchar_cror_(unsignedchar,unsignedchar);externunsignedint_iror_(unsignedint,unsignedchar);externunsignedlong_lror_(unsignedlong,unsignedchar);externunsignedchar_crol_(unsignedchar,unsignedchar);externunsignedint_irol_(unsignedint,unsignedchar);externunsignedlong_lrol_(unsignedlong,unsignedchar);externunsignedchar_chkfloat_(float);
I want a function like "cror" in keil, is there any function list in sdcc?
Last edit: Mian Qi 2023-11-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you provide any additional information? What is this "mcs-51 project" you are trying to compile? Code written for a different compiler,m such as Keil? Code written for an older SDCC?
What should that _cror_ function do? From the name and declaration, I guess it might rotate an unsigned char to the right?
Which version of SDCC are you using?
I guess you could just implement the function, e.g.
However, there are more efficient alternatives (inline function instead of extern), especially if at function calls, the second parameter often is a constant.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried mcs-51 project on Ubuntu through VMware, when compiled, it prompted lack of intrins.h, I added one, there was still some error, how to fix this?
my intrins.h:
I want a function like "cror" in keil, is there any function list in sdcc?
Last edit: Mian Qi 2023-11-21
Can you provide any additional information? What is this "mcs-51 project" you are trying to compile? Code written for a different compiler,m such as Keil? Code written for an older SDCC?
What should that
_cror_
function do? From the name and declaration, I guess it might rotate an unsigned char to the right?Which version of SDCC are you using?
I guess you could just implement the function, e.g.
However, there are more efficient alternatives (inline function instead of extern), especially if at function calls, the second parameter often is a constant.