What kind of rubbish is this? 'realloc' is to change the size of a malloc'ed block! Or is it some sort of surrealist joke that I'm missing?

To the questioner. From the address, I suspect you actually want to do an IO read/write, which means you have to use special functions 'inp' and 'outp'. Check them out in your development system docs (I assume you're using a 16-bit DOS compiler, otherwise it's going to get difficult). It would go something like:

outp(0x300+i, mydata);

If you really want to do a memory read/write, you're on the right track. All you have to do is force the compiler to do what you want with a cast, like this:

p=(char *)0x300;

If this is you want, reject the above answer and ask me to enter a null answer to give me the points.

phillips, thank you for your answer. I do not believe it will work
though. Sorry.....miss.
prc I like your answer, but would like to try it. I will be happy to give you the points then. Your asumptions are right. Please enter your null answer.

prc is right in two ways: using reallic is idiotic and calling
function outp() is the way to go if you want to write
bytes to an I/O channel. Show us your BASIC program
(just the relevant parts please) and I'm sure one of us can
translate it to the equivalent C stuff ...

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

That's very nice, thank you. There should be a way of splitting the points between exports, I think.

Just so it doesn't seem I'm getting something for nothing, jos is right that that kind of delay in C is very dubious. Of course, 10000 loops in C are a hell of a lot faster than BASIC, anyway, but as written, a good optimising compiler can (and will) remove that loop entirely, on the basis that it doesn't do anything, and no-one is interested in the value of 'i' at the end of it.

To ensure that it doesn't throw the loop away, you have to make 'i' volatile, which says "I know something magic about this which means you can't optimise it".

So, the last bit should be

void gosub140()
{
volatile int i;

for (i= 0; i < 10000; i++)
;

}

Note that I start from zero - as written it only does 9999 loops (sorry to nitpick, jos!). You could also use <= to make it more like the BASIC, but counting from zero is the standard way in C.

If you want a delay longer than a tenth of a second, you can use 'clock()' to get an exact time which will work whatever the speed of your processor.

While on the subject of volatile, I forgot to say that if you use a 'char *' to write to memory, this ought to be volatile as well, otherwise the compiler might say, "I'm writing two values to the same place here - I'll just do the last one". Doesn't look like you need to do this, though.

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…