#ifdef M25 141$: movb UARTBCNTL,d1 | wait for SCC to be ready #else 141$: movsb UARTBCNTL, d1 #endif M25 btst #TXREADY, d1 | Wait for SCC to be ready dbne d0, 141$ | Loop until ready or timeout moveq #0xf, d0 142$: dbra d0, 142$This gives errors like this:
../diag/diag.s:2951: Error: syntax error -- statement `dbne d0,141$' ignored ../diag/diag.s:2954: Error: junk at end of line, first unrecognized character is `1'It needs to be hand edited into code like this for the gnu assembler:
#ifdef M25 141: movb UARTBCNTL,d1 | wait for SCC to be ready #else 141: movsb UARTBCNTL, d1 #endif M25 btst #TXREADY, d1 | Wait for SCC to be ready dbne d0, 141b | Loop until ready or timeout moveq #0xf, d0 142: dbra d0, 142b
You can type ":make" inside vim and it will run make for you. The best part is that it reads and parses any error messages and puts them into something it calls the "quick change list". Not only that, it moves the cursor to the line that gave the first error, and shows the error message in the status line at the bottom of the window.
It is always a win not to have to jump in and out of vim. It is also a win not to have to eyeball and remember line numbers from compiler messages.
Getting automatically to the first line with an error is nice, but what about the next line? You can type the command ":cnext" for that. Not only does this take you to the next line, but it redisplays the compiler error message for the ailing line again in the status line at the bottom of the vim window. Being able to see the error message in conjunction with the line in context is wonderful!
Remember to use ":write" to save changes before invoking ":make" again.
The only complaint with all of this might be that typing ":cnext" is a bit verbose. You can shorten this to ":cn" or you can set up mappings in your .vimrc (there are plugins that include mappings for the quick change list commands). For now ":cn" will make me happy.
Tom's Computer Info / tom@mmto.org