Click here to Skip to main content
15,906,301 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr8-Sep-09 9:40
psychegr8-Sep-09 9:40 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
Randor 8-Sep-09 14:42
professional Randor 8-Sep-09 14:42 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr8-Sep-09 22:00
psychegr8-Sep-09 22:00 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr10-Sep-09 4:55
psychegr10-Sep-09 4:55 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
Randor 10-Sep-09 18:52
professional Randor 10-Sep-09 18:52 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr11-Sep-09 5:53
psychegr11-Sep-09 5:53 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
Randor 11-Sep-09 7:15
professional Randor 11-Sep-09 7:15 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr15-Sep-09 13:02
psychegr15-Sep-09 13:02 
Hi David,

Sorry for not posting for a few days. I was reading for my project! I have got an error free compiled program but i get some errors when i try to run some of the functions. I will post the code where the debugger breaks. I think that it is the va_arg

static long bdm_read (long addr, int pcount, unsigned ResponseSize, long *Where, short cmd, ...)
{
	va_list arg;
	int err,count;
	long response;
	long result;

	last_addr = addr;
	last_rw = 1;
	if (!Initted) bdm_error (BDM_FAULT_PORT);
	for (err = 3; err; err--)
	{
		result = 0;
		count = pcount;
		va_start (arg,cmd);
		response = bdm_clk (cmd, CommandBitCount);
		while (count--)
			if ((response = bdm_clk (va_arg(arg,short), CommandBitCount)) > BDM_NOTREADY)			{
				if (response == BDM_BERR) bdm_error (BDM_FAULT_BERR);
				continue;
			}
		for (count = ResponseSize; count; count--)
		{
			while ((response = bdm_clk (BDM_NOP, CommandBitCount)) == BDM_NOTREADY) ;
			if (response < BDM_NOTREADY)
			{
				result <<= 16;
				result |= response;
				if (Where) *Where++ = response;
			}
			else
			{
				if (response == BDM_BERR) bdm_error (BDM_FAULT_BERR);
				break;
			}
		}
		if (response > BDM_NOTREADY)
		{
			if (response == BDM_BERR) bdm_error (BDM_FAULT_BERR);
			bdm_clrerror ();
			continue;
		}
		va_end (arg);
		break;
	}
	if (!err) bdm_error (BDM_FAULT_UNKNOWN);
	response = bdm_clk (BDM_NOP, CommandBitCount);
	if (response == BDM_BERR) bdm_error (BDM_FAULT_BERR);
	return result;
}


I can't understand exactly what va_arg does. Thank you for the link of the VS2005 debugger. Really helpful!!

Thank you in advance!
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
Randor 16-Sep-09 3:45
professional Randor 16-Sep-09 3:45 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr17-Sep-09 9:28
psychegr17-Sep-09 9:28 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
Randor 17-Sep-09 17:00
professional Randor 17-Sep-09 17:00 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr20-Sep-09 4:28
psychegr20-Sep-09 4:28 
QuestionEOF Pin
cdpace2-Sep-09 10:25
cdpace2-Sep-09 10:25 
AnswerRe: EOF Pin
Luc Pattyn2-Sep-09 10:45
sitebuilderLuc Pattyn2-Sep-09 10:45 
GeneralRe: EOF Pin
«_Superman_»2-Sep-09 17:24
professional«_Superman_»2-Sep-09 17:24 
GeneralRe: EOF Pin
David Crow3-Sep-09 2:52
David Crow3-Sep-09 2:52 
GeneralRe: EOF Pin
«_Superman_»3-Sep-09 7:09
professional«_Superman_»3-Sep-09 7:09 
QuestionCapture non-client mouse click on sizable window Pin
Darryl Bryk2-Sep-09 10:22
Darryl Bryk2-Sep-09 10:22 
AnswerRe: Capture non-client mouse click on sizable window Pin
«_Superman_»2-Sep-09 17:29
professional«_Superman_»2-Sep-09 17:29 
GeneralRe: Capture non-client mouse click on sizable window Pin
Darryl Bryk3-Sep-09 9:29
Darryl Bryk3-Sep-09 9:29 
GeneralRe: Capture non-client mouse click on sizable window Pin
«_Superman_»3-Sep-09 17:08
professional«_Superman_»3-Sep-09 17:08 
GeneralRe: Capture non-client mouse click on sizable window Pin
Darryl Bryk4-Sep-09 5:26
Darryl Bryk4-Sep-09 5:26 
QuestionHow to disable control animation, combobox Pin
Moak2-Sep-09 9:58
Moak2-Sep-09 9:58 
AnswerRe: How to disable control animation, combobox Pin
Code-o-mat2-Sep-09 11:46
Code-o-mat2-Sep-09 11:46 
GeneralRe: How to disable control animation, combobox Pin
Moak2-Sep-09 14:11
Moak2-Sep-09 14:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.