Here, I'll post a sample source.
This is my Item Cycle code for MKDS; it works perfectly with kenobi's assembler:
ldr r4, Counter ldrb r3, [r4] ldr r0, IOFetch ldrh r1, [r0] mov r2, #0x100 and r1, r1, r2 cmp r1, #0x0 beq There mov r0, #0x0 strb r0, [r4, #0x1] b NoIncrement There: ldrb r0, [r4, #0x1] cmp r0, #0x1 beq NoIncrement add r3, #0x1 mov r0, #0x1 strb r0, [r4, #0x1] NoIncrement: cmp r3, #0x12 moveq r3, #0x0 strb r3, [r4] ldr r6, IOFetch ldrh r6, [r6] mov r0, #0x4 and r6, r6, r0 mov r2, #0x1 ldr r5, Base ldr r5, [r5] mov r0, #0x9 lsl r0, r0, #0x8 add r0, #0x74 add r0, r0, r5 ldr r0, [r0] str r3, [r0, #0x10] str r3, [r0, #0x14] cmp r6, #0x0 streq r2, [r0] mov r0, #0xb lsl r0, r0, #0x8 add r0, #0x84 add r0, r0, r5 ldr r0, [r0] str r3, [r0, #0x10] str r3, [r0, #0x14] cmp r6, #0x0 streq r2, [r0] mov r0, #0xd lsl r0, r0, #0x8 add r0, #0x94 add r0, r0, r5 ldr r0, [r0] str r3, [r0, #0x10] str r3, [r0, #0x14] cmp r6, #0x0 streq r2, [r0] mov r0, #0xf lsl r0, r0, #0x8 add r0, #0xa4 add r0, r0, r5 ldr r0, [r0] str r3, [r0, #0x10] str r3, [r0, #0x14] cmp r6, #0x0 streq r2, [r0] bx lr IOFetch: .long 0x4000130 Counter: .long 0x23fffe8 Base: .long 0x217bc14
Always use # before immediates. Use .long/.short/.byte for 4, 2, and 1 byte literal designations, respectively. Labels should begin with a letter and not have too many matching ASCII characters with other labels. I don't think they're case sensitive.
Only use a colon after labels that are at the target location, as opposed to the "goto" position. Do not forget your colons! Don't forget to use 0x for hex designation either ;_;
kenobi's assembler will not read .thumb designations; it assembles all code as ARM (this means my aim bot source is not compatible with the assembler, but the standard assembler without his program works fine). .org ops (these are used to designate where the code should be stored) don't work either; the assembler sees them as unnecessary, and if you use them in the standard assembler without kenobi's program, it will actually make the hex dump size increase to match the address accordingly, which is a real pain. It's better to just assemble differently located pieces of code separately and insert them manually.
_________________
|