Jim Potteabaum

Assembly problem  with indirect X instructions

Discussion created by Jim Potteabaum on Jun 29, 2011
Latest reply on Jul 6, 2011 by Jim Potteabaum

 I am having to do a bit of Assembly coding - - for some 64 bit math - - simple add and subtract.

as I have started coding this I checked what I was doing and getting a series of error messages.


windows 7 64 bit CW10.1 HS08JM project


this is inside of a function

union DLong Add64( union DLong A, union DLong B )
    static union DLong a, b, C;
    static byte D,E,F;
    byte I;
    I = 7;
    a = A;
    b = B;

        LDA D;
        ADD E;
        STA F;
        LDX #7
        LDA  D,x;
        ADD E, x;
        STA F, X;
        ............. more to be added

    return ( C );


error message occurs on the lines that I am trying to index using the X register.

i.e. LDA opcode16,X


I get the error message on the indexed opcodes of

C18123 End of Line expected

for each of the index X assembly codes


I have used inline assembly before without problems - - first time using indexed addressing


thanks Jim P