When I write inline assembly code in C with cc65 (__asm__("LDA %v", variable)), then the code will get optimized just like the rest of the C code and I can see the optimization in the generated .s file.
Is there a way to run the same optimizer over a hand-written .s file and to generate a second .s file out of it?
I know, I could simply turn the whole file into a C file with inline assembly. But is there also a simpler way? A way that allows me two write my assemy code in an actual *.s file, but where I can generate a copy of it that I then put into the compile process, so that the ROM always automatically has the optimized code.
Is there a way to run the same optimizer over a hand-written .s file and to generate a second .s file out of it?
I know, I could simply turn the whole file into a C file with inline assembly. But is there also a simpler way? A way that allows me two write my assemy code in an actual *.s file, but where I can generate a copy of it that I then put into the compile process, so that the ROM always automatically has the optimized code.