This was a pretty productive day. I added a new building - barracks and new resource strength. It will be used to attack other players and defend from their attacks. Also did some minor improvements not worth mentioning. :)
Yesterday's update can be found here.
In a case of any questions or suggestions, don't hesitate to contact me here or on twitter. ;)
For more updates, you should follow my twitter account - @PeterLauris and the account of Crystal Kingdom - @CrystalKingdom_.
Keeping it short tonight since I've been terrible about sleeping a proper amount at night.
Shortly after posting last night, I remembered that I should be looking at the linker script for hints as to what it's expecting. Sure enough, up by the top there's something like:
__interrupt_vector_9 : { KEEP (*(__interrupt_vector_9 )) KEEP (*(__interrupt_vector_timer0_a1)) } > VECT9
So, of course I tested the human readable version
.macro SECTION_VECTOR vector .section __interrupt_vector_\vector,"ax",@progbits .endm .global test_int SECTION_VECTOR timer0_a1 .word test_int .text test_int: push r9 mov #9, r9 pop r9 reti
Compiled it and did an objdump -S:
Disassembly of section __interrupt_vector_9: 0000fff0 <__interrupt_vector_9>: fff0: 2e c1 interrupt service routine at 0xc12e 0000c12e <test_int>: c12e: 09 12 push r9 ; c130: 39 40 09 00 mov #9, r9 ; c134: 39 41 pop r9 ; c136: 00 13 reti
So there you have it. Mystery solved (or at least, was a mystery to me.) They were nice enough to allow a tolower version of the vector name appended to __interrupt_vector_ be used to lookup the expected name. This was much easier than the weird preprocessor macro expansion I was trying to get working last night.