Page 1 of 1

Turbo C and string problems

Posted: Sat Sep 30, 2006 12:23 am
by AlgorithmX2
Ok I am in 16bit real mode using Turbo C + Tasm to try and write some text to the screen but im not sending correct pointers to the data, I need some help in finding out how to fix it so that I send the address of the string correctly, right now it seems that im sending the number 0x6 as the location of the string, where the real location will be some where around 365C or so. Any ideas on how I can fix this?

I can write individual characters and the numbers to the screen already, I hope Im not being to vague... thanks in advance

Posted: Sat Sep 30, 2006 1:20 am
by Thomac
I'm not entirely sure about this, but as far as I can remember you need to use a FAR char* pointer in order for things to work.

DOH!!!

Posted: Sat Sep 30, 2006 3:03 am
by AlgorithmX2
Wow im on a roll I Spent a good couple of hours trying to think of why it would do this and steped away looked back and realized it was probobly the format of the output so I looked and it was COM, when I need a flat binary, so I grabbed JLoc setup it up, and poof problem solved!

I hope that My dumb mistakes help people out in the future, when others search the forum,

oh and Thomac, I did try you suggestion but It only gave me an error when I tried to use FAR, I dont think its supported or something... thanks for tryin to help tho

happy coding!