Questions tagged [c51]

C51 is a C language compiler for the 8051 family of microcontrollers

33 questions
0
votes
1 answer

SDCC/C51: Redefine SDCC symbols

I want to compile a program under the SDCC that I used to compile under C51.. // Somewhere in a header file for C51: sfr TCON = 0xA8; // C51 syntax // somewhere in a .c-file #pragma asm mov TCON, #0 #pragma endasm This will be translated…
Stefan Falk
  • 23,898
  • 50
  • 191
  • 378
0
votes
2 answers

C51 C compiler inline assembly to SDCC inline assembly

I'm not very into assembly but for a project I have to modify a few lines of assembly code for the C51 C compiler to the SDCC. This is code for C51 setb T1Run setb T0Run setb IDLE jnb T0Full, $ Which, compiled with SDCC…
Stefan Falk
  • 23,898
  • 50
  • 191
  • 378
-1
votes
1 answer

Keil C51 8051 Port 0 I/O

Check this two cases in Keil C51 and observe P0 peripheral option in debugger for both cases. The result is different in two cases.Why P0=0xFF; instruction doesn't produce same result? case 1) main() {P0=0x00; P0=0xFF; while(1); } case…
Lelouch Yagami
  • 159
  • 2
  • 10
1 2
3