A89: How do I fix this relocation error


[Prev][Next][Index][Thread]

A89: How do I fix this relocation error




I have  been trying to learn how to do graphix, but every time I try to 
compile this program using DOORSOS II, it keeps giving me this message:

    16-bits relocation to external symbols not supported

What does this mean, and how do i fix it?

Here's he program:

;includes
    include "tios.h"
    include     "util.h"
    include     "graphlib.h"
    
;definitions
    xdef        _main
    xdef        _ti89


Put MACRO
    move.w  \1,d0
    move.w  \2,d1
    lea     \3,a0
    jsr     graphlib::put_sprite
    endm

_main
\Mainloop
    jsr     util::zap_screen
    Put     mx,my,sprite
    jsr         util::idle_loop
    cmp.w       #338,d0
    beq     \Left
    cmp.w       #337,d0
    beq     \Up
    cmp.w       #340,d0
    beq     \Down
    cmp.w       #344,d0
    beq     \Right
    cmp.w       #264,d0
    beq     \end
    bne     \Mainloop


\Left
    move.w  mx,d5
    cmp.w       #0,d5
    bgt     \mLe
    bra     \Mainloop
\mLe
    sub.w       #5,d5
    move.w  d5,mx
    bra     \Mainloop

\Up
    move.w  my,d1
    cmp.w       #0,d1
    bgt     \mUp
    bra     \Mainloop
\mUp
    sub.w       #5,d1
    move.w  d1,my
    bra     \Mainloop

\Down
    move.w  my,d1
    cmp.w       #85,d1
    blt     \mDo
    bra     \Mainloop
\mDo
    add.w       #5,d1
    move.w  d1,my
    bra     \Mainloop

\Right
    move.w  mx,d5
    cmp.w       #150,d5
    blt     \mRi
    bra     \Mainloop
\mRi
    add.w       #5,d5
    move.w  d5,mx
    bra     \Mainloop

    
\end
    rts

sprite: dc.w        8
        dc.w        1
        dc.b        %11111111
        dc.b        %10000001
        dc.b        %10011001
        dc.b        %10111101
        dc.b        %10111101
        dc.b        %10011001
        dc.b        %10000001
        dc.b        %11111111

smask:  dc.b        %11111111
        dc.b        %10000001
        dc.b        %10011001
        dc.b        %10111101
        dc.b        %10111101
        dc.b        %10011001
        dc.b        %10000001
        dc.b        %11111111

mx: dc.w        #0
my: dc.w        #0  
    end

Thanks
Pete


Follow-Ups: