Hi folks
I am trying to inline some asm.
The reason I am inling is this is the way to set up interrupt on a different compiler but I am using Keil to test (cos its better!)
The inlined snippet currently looks like:
#asm GLOBAL _ext1isr PSECT vectors,ovrld ORG 0x34 MOV A,#0 LJMP @A+DPTR PSECT text #endasm
I'll admit Im not entirely sure whats going on with this code, its from the other compilers manual, though I have changed the LJUMP which previously read LJUMP _ext1isr (ext1isr being the name of the interrupt ISR).
I'm trying to make the snippet fully dynamic so I can make a macro or callable C function of it. this means I need to be able to vary the value that the ORG instr uses (here its 0x34, this is the intr vector) and also the value that GLOBAL uses (as I said this is the ISR function name so I assume _ext1isr is a pointer to it).
Many thanks
has been installed here so that students can run a project
I do believe that Keil has very favorable "educational institution" offers, do ask them.
It is hardly fair to make half a course "how to use mangled processes"
Erik
Ha Ha, "how to use mangled processes" LOL
Yeah well their taught on Dev-C++ and Keil Then for their project subject they need to be able to perform rapid development and debug before spending cash on real parts etc, so this apparently looked like a good option at the time....
However getting C programs to run in it isnt so easy, assembly runs fine Im told. I guess the C runs fine if I was to do it "right", I just need to understand better what "right" is in this case so we can get the students up and running.
If I can make this dynamic and get a macro for it built in a header file then the students can just include it and ints will operate just as the compilers manual specifies they should...
The manual specifies that including the header intrpt.h will allow a call to a macro ROM_VECTOR(tt_vector, ttr_ISR), and it procedes to give the equivalent asm code pretty much as above.....But intrpt.h is apparently not included in the version we have... *sigh*
Thanks for your help anyhoo