This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C167 barebones assembler setup

I feel so stupid asking this question, but I am trying to assemble just a few lines of relocatable C167 code that I will manually patch into an existing engine control unit. I've done this before with other CPUs and GNU binutils, but am finding the setup of the IDE difficult despite reading instructions.

This is my simple test file. I added the first two and last two lines to try to get it to assemble, but get ..\loop.a66(3): error A45: KEYWORD NOT ALLOWED IN CURRENT CONTEXT for every single line of C167 code.

$MOD167
JOHN SECTION CODE
MOV [-R0], R9
mov [-r0], r8
mov [-r0], r7
mov [-r0], r6
mov r9, DPP0
mov DPP0, #0x1f
nop
mov r6, #0x1764 ; with DPP0=0x1f
mov r7, #0x9bea ; with DPP2=0x10 to give 41bea
mov r8, #0xC0
loop:
mov [r7]+, [r6]
add r6, #2
sub r8, #1
jmpr cc_NZ, loop
mov DPP0, r9
nop
mov r6, [r0+]
mov r7, [r0+]
mov r8, [r0+]
mov r9, [r0+]
rets
JOHN ENDS END