Bruce's C Compiler (bcc) is a C compiler which produces 8086 assembler, as well as having options for 80386 and 6809.
Questions tagged [bcc-compiler]
11 questions
4
votes
1 answer
Inline Assembly in BCC (Bruce's C Compiler) - How to use C variables?
I'm writing a C program under Real Mode. The program will be loaded to 0x2000:0x0000 address and run. DS register equals to CS, which is 0x2000. Also I'm debugging with bochs.
My goal is to print some text on the screen. So that I need inline…

B. Kaan
- 95
- 1
- 8
3
votes
1 answer
How to compile with Bruce's C Compiler to get asm file that runs on 8086 processors
I have this small c code
int main (){
int in [50];
int res [50];
int avg=0;
int i=0;
int j=0;
for(i=0;i<50;i++){
in[i]=i*5+28%25;
}
for(i=0;i<50;i++){
avg=0;
for(j=i-4;j<=i+5;j++){
…

Amr Khalil
- 135
- 1
- 11
2
votes
2 answers
Looking for preprocessor command to remove command in code
I am working on a C library which sometimes uses
static inline void myfunc(...)
when defining a function.
Now I try to port this to an old C compiler that does not support "static inline". This is bcc - Bruce's C compiler.
Can I use a command in a…

Georg
- 119
- 1
- 10
1
vote
1 answer
auto_start error in ld86 compiling
I'm trying to compile a fairly basic program under Linux and I'm having trouble with ld86. Anyone have an idea as to what auto_start is?
$ bcc -c tc.c
$ as86 -o ts.o ts.s
$ ld86 -d ts.o tc.o /usr/lib/bcc/libc.a
ld86: warning: _gets redefined in…

Eric Fossum
- 2,395
- 4
- 26
- 50
1
vote
1 answer
"Member function must be called or its address taken in function" C++ error
I am writing a program in C++ which works with threads. When I try to create a process I get the following error: Member function must be called or its address taken in function. Here is my code:
void PCB::createProcess(){
asm cli
…

ivaa14
- 138
- 10
0
votes
1 answer
Issue compiling ld86: Undefined symbol auto_start
Im attempting to compile some assembly and C code using ld86. When doing so, I run into a problem: "Undefined symbol: auto_start"
I have already searched this, and came across this stack overflow question, which is exactly like mine. But, their…

Oppa
- 154
- 8
0
votes
0 answers
BCC LD86 file has bad magic number
I wanted to write a simple hello world program in DOSBox, so I downloaded Bruce's C Compiler from here. And wrote this program:
#include
int main() {
printf("Hello, World!\n");
}
I ran bcc like this: bcc -o hello hello.c, but I get this…

MarinB
- 1
- 3
0
votes
5 answers
Linux C creating custom printf function without header libraries
I am working on creating my own prinf() for a boot loader I am working on for a class assignment, this means I have to use the BCC compiler and I cannot use system libraries since they do not exist. I do have the ability to use the putc() function…

user591162
- 559
- 2
- 6
- 12
0
votes
1 answer
Compiling issues with bcc compatibility
Yesterday my friend and I set up our dev environments to begin working on a school assignment. Our professor gave us some assembly code to compile and link with our own C code to replace a linux booter program. However, for some reason the code…

Matt Hintzke
- 7,744
- 16
- 55
- 113
-2
votes
4 answers
long int range in C programming
As per the link https://www.geeksforgeeks.org/data-types-in-c/2
If we assume long int takes 8 bytes (64 bits) then its range should be -2^63 to 2^63-1 , but that is not given in the link above. Why is it so?
And similarly unsigned long int should…
-3
votes
1 answer
For loop through array causing infinite loop
I have a piece of code that is supposed to flush an array of characters when the enter key is pressed, only the code is looping infinitely and I can't figure out why.
There is a character array that gets a new character every time a key is pressed.…

Learning
- 35
- 6