Turbo C and string problems

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
AlgorithmX2
Posts: 14
Joined: Sat Jun 24, 2006 8:09 pm

Turbo C and string problems

Post 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
I seek knowledge and to help others who seek it as well
Thomac
Posts: 11
Joined: Sat Sep 16, 2006 2:23 am

Post 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.
AlgorithmX2
Posts: 14
Joined: Sat Jun 24, 2006 8:09 pm

DOH!!!

Post 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!
Post Reply