constant pool?

Technical questions regarding the XTC tools and programming with XMOS.
MFlamer
Member++
Posts: 19
Joined: Wed Jan 14, 2015 2:17 am

constant pool?

Post by MFlamer »

How can a list of constants be added to an assembly file? I can add one or multiple constants on a single line like this,

Code: Select all

.word 	0xFFFF5555,	0xFFFF5555
but if I try,

Code: Select all

.word 	0xFFFF5555,	
         0xFFFF5555
I get a syntax error. I would like to define (or include a file containing) a list of 32b words seperated by a newline if possible. Thanks.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am

Post by mon2 »

Can you use the following format ?

Code: Select all

.word    0xFFFF5555
.word    0xFFFF5555
https://www.xmos.com/download/public/As ... 1.0%29.pdf
MFlamer
Member++
Posts: 19
Joined: Wed Jan 14, 2015 2:17 am

Post by MFlamer »

Sure, that will work if it has to. I'm looking to implement a VM in XMOS assembler for a simple compiler I wrote. The output from the compiler is a simple binary file of instructions. What I would really like to do is include a file containing a bunch of raw bytes into a data section of the assembler file. Do you know if anythng like this is possible?