Simple ASM question
DarrenY
Posts: 61
This is gonna be easy for someone with ASM knowledge (not me!)
I want to modify FullDuplexSerialExt so that at the end of its receive loop I call a spin method to do some processing.
Is it as simple as:
jmp #spinmethod 'call spin based data processing method << INSERT THIS
jmp #receive 'byte done, receive next byte
???
I want to modify FullDuplexSerialExt so that at the end of its receive loop I call a spin method to do some processing.
Is it as simple as:
jmp #spinmethod 'call spin based data processing method << INSERT THIS
jmp #receive 'byte done, receive next byte
???
Comments
I'm a bit confused by what you are trying to do, can't the spin program just tell the serial object to get a byte, then process it and then request another?
Graham
Basically I'm trying to save a cog.
I'm currently doing it the way you describe, but doing it that way uses 2 cogs no? i.e. 1 for the FullDuplexSerialExt object and one for the processing.
If I can integrate the processing into the FullDuplexSerialExt object itself I can use 1 cog to do the same thing.
I'm reading NMEA data from a GPS. Ideally I just want to start a modified FullDuplexSerialExt and then it then goes off and reads AND decodes the incoming strings all by itself.
The method I suggest will not help you save a cog, you cannot have spin and assembly in the same cog (same method yes same cog no). You could code your processing in assembly perhaps but that will depend on how complex it is.
Graham
Ah nuts, I didn't realise that.
OK, i'll stick with the 'standard' way of doing it then. I was just thinking it would be great to have a 'fire-and-forget' GPS object that I could just query data from.
Thanks Graham.