LinkoVitch 0 Report post Posted February 13, 2011 Hi, Wondered if you guys could help my sanity a tad. I have working code (yay) nothing special it sticks a bitmap on the screen. Working on a few other bits and pieces I decided to tidy up my source files. I have a source file for each key job of my code, which are all assembled into objects and then linked together to form the ABS file. Now, my Vertical Interrupt rout had ended up in amongst my object list code, all working fine and dandy, but I thought really that shouldn't be there, I'll move it to somewhere else. So I did.. moved the code, copy and paste to a different source file, changed its name, updated my VB setup code to reflect the changes etc. Now it doesn't work! I have tried everything I can think of. The lines of source are identical, I have changed its name to be the same as the original (commenting out the original) still nothing I have included it with a different name to the same source file as the original, nothing I have set error messages on the CPU error registers just incase it was blowing up for some reason.. nothing Checked the memory address of the two routines.. working one is $2a710 none working is $2a730 both look fine to me. All the VBI routine is, is: movem.l d0-d6/a0-a6,-(sp) jsr copylist move.w #$101,INT1 move.w #$0,INT2 movem.l (sp)+,d0-d6/a0-a6 rte which is identical in both places. any ideas? some wacky bug in the Jag I have tickled? or ALN or madmac? thanks in advance Quote Share this post Link to post Share on other sites
LinkoVitch 0 Report post Posted February 13, 2011 OK if I actually copy the code into the same source file it works under a new name. But if I include a source file with the code in it doesn't work! WTF!? Quote Share this post Link to post Share on other sites
Matmook 1 Report post Posted February 14, 2011 OK if I actually copy the code into the same source file it works under a new name. But if I include a source file with the code in it doesn't work! WTF!? Just an idea... Have you, at the end of the included source file a carrier return ? ALN/MAC will not take the last line of included files if there is not a CR/LF. If it's the case then "rte" will not be included... Quote Share this post Link to post Share on other sites
LinkoVitch 0 Report post Posted February 14, 2011 Have you, at the end of the included source file a carrier return ? ALN/MAC will not take the last line of included files if there is not a CR/LF. If it's the case then "rte" will not be included... Thanks, alas yep. That bug has got me a few times already, I have started putting a comment at the end of my source files that just says END to make sure I don't get bitten by it Think I may try recreating the file incase there is something weird in there. thanks again Quote Share this post Link to post Share on other sites
Fadest 0 Report post Posted February 14, 2011 another idea... Are you sure the new file use CR+LF as line end characters ? Some code editors can detect format of existing files (in fact reuse same line character) but use their own setup by default ? So maybe your 2 files are not really the same (do they have the same size in bytes ?) Quote Share this post Link to post Share on other sites
LinkoVitch 0 Report post Posted February 14, 2011 ARGH! I am an idiot! Matmook you got it in one! I owe you a pint When I posted to the forum I was at work and not able to see my code, I just checked and sure enough there was no end comment.. GAH I am such a dumbass! it must have been another source file where I had that problem.. I blame being tired when I wrote it Thanks again guys. I'll learn one day Quote Share this post Link to post Share on other sites
Cyrano Jones 4 Report post Posted February 25, 2011 Also remember to keep the OLP pointing to a phrase aligned address. I've had it before where I move chunks of code around and unalign things and wonder WTF went wrong. Quote Share this post Link to post Share on other sites
LinkoVitch 0 Report post Posted February 25, 2011 To combat such things I have a .PHRASE or .QPHRASE before pretty much every memory block I really should clean that up at some point (and remember to stop writing to my data sections too :/ ) Quote Share this post Link to post Share on other sites
Tyrant 0 Report post Posted February 25, 2011 I've had it before where I move chunks of code around and unalign things and wonder WTF went wrong. CJ we've ALL had that lol. Quote Share this post Link to post Share on other sites