We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello. I have an existing ASM progrom which I am going to convert, as needed, to C. I was succesful at overriding the UART interrupt function (in C). Now, in my main ASM loop I need to check for recieved chars which I will doing in C. When I call my C func from the MAIN func in ASM the 8051 appears to go into a reset loop and will not successfully boot. =============================== My C Func: code void CheckForRx (void) { if (RxCount!=0) //C global inc'd in INT DoSomething(); } ============================== My ASM Main: extern code (CheckForRx) Start: ;Do alotta other stuff lcall CheckForRx jmp Start ================================ I get no linker warnings (it finds my C func) however that call will not work. Remove the lcall CheckForRx and the system works again. Any ideas of what I have most likely looked over? Thanks, Chris
I cant seem to make this work And until you get round to describing in usable detail how it fails to work, it's basically impossible that anyone else can. If you cannot do the diagnosis yourself, you must at least tell us the symptoms. What options do I have to use library calls in this method? You're not supposed to need any special options. Just call it, after reading very carefully the relevant sections of the manual on C/asm interaction. If this was an all C project would I have similar problems? Frankly, that's impossible to say, as long as nobody but you knows what those problems are.