Bug in Assembler DB?

Discussion and support of the compiler from ImageCraft for the M8C.

Moderator: richard@imagecraft.com

Bug in Assembler DB?

Postby AndyW » Wed Jun 30, 2010 5:05 am

I just spent an afternoon chasing this, and didnt find the problem until realizing the assembler had generated unexpected code.

.literal
dtable:

db 02,03,04,05,06,07,08,09,10,11,12


.endliteral
generates the following hex:

00 01 02 03 04 05 06 07 00

The hex incorrect and truncated, any further literals on the same line do not generate any hex at all.

If the leading zeros are omitted, the code is generated correctly ie:

db 1,2,3,4,5,6,7,8,9,10,11,12

generates: 01 02 03 04 05 06 07 08 09 0a 0b 0c
Last edited by AndyW on Wed Jun 30, 2010 10:39 am, edited 1 time in total.
AndyW
The Big Cheese
The Big Cheese
 
Posts: 180
Joined: Mon Jul 18, 2005 6:06 am
Location: London, UK

Re: Bug in Assembler DB

Postby Terrence » Wed Jun 30, 2010 7:33 am

You were specifying octal.

For decimal, drop the leading zero.
See page 99 of "Assembly Language User Guide.pdf", you can find it under help, in PD.
User avatar
Terrence
Cheese Wheel
Cheese Wheel
 
Posts: 76
Joined: Mon Jun 23, 2008 5:59 am
Website: http://www.tsoft.co.za
Location: Cape Town, South Africa

Re: Bug in Assembler DB?

Postby AndyW » Wed Jun 30, 2010 10:40 am

Ah OK thanks, not a bug at all...
AndyW
The Big Cheese
The Big Cheese
 
Posts: 180
Joined: Mon Jul 18, 2005 6:06 am
Location: London, UK


Return to “%s” ImageCraft ICCv7 for M8C Compiler

Who is online

Users browsing this forum: No registered users and 1 guest