Simple Assembly Loop

Technical questions regarding the XTC tools and programming with XMOS.
diltsman
Member++
Posts: 21
Joined: Sun Mar 03, 2013 11:26 pm

Simple Assembly Loop

Post by diltsman »

When I attempt to compile the following code I get an error "./src/app_test.S:5: Error: A00004 Unknown opcode 'brbu'".

Code: Select all

  .text
  .align 2
  .globl _start
_start:
  brbu _start
I am not compiling against any of the C runtime, so _start should be the entry point. How is it that this will not compile? BRBU is an opcode on page 62 of The XMOS XS1 Architecture?


Guest

Post by Guest »

While BRBU is the CPU-level opcode, the assembler does some of the final opcode selection for you, such as choosing forward/backward jump, or long/short literal variants of the instruction. The asm instruction you're looking for is bu _start.

The assembly programming manual lists the instructions accepted by the assembler.
User avatar
JohnWilson
Active Member
Posts: 38
Joined: Fri Oct 28, 2011 10:53 pm

Post by JohnWilson »

Also, the raw (vs. massaged for direction etc.) mnemonics are in upper case. So it would have been BRBU not brbu. Yes the assembler is case-sensitive ...