A89: Addressing


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

A89: Addressing




If d0 contains the x coordinate, d1 contains the y coordinate, and d2 
contains the picture number I want to load, why doesn't this work?

choose:
lea         Pic0(pc),a0
mulu.l  #24,d2
add.l   d2,a0
move.b  #%11111111,d3
move.l  graphlib::plane0,a1
jsr         graphlib::put_sprite_mask
add.l   #12,a0
move.l  graphlib::plane1,a1
jsr         graphlib::put_sprite_mask
rts

Pic0:
    dc.w 8
    dc.w 1
    dc.b %00000000
    dc.b %00000000
    dc.b %11111111
    dc.b %11111111
    dc.b %00000000
    dc.b %00000000
    dc.b %00000000
    dc.b %00000000

Pic0a:
    dc.w 8
    dc.w 1
    dc.b %11111111
    dc.b %00000000
    dc.b %00000000
    dc.b %11111111
    dc.b %11111111
    dc.b %11111111
    dc.b %11111111
    dc.b %11111111

Pic1:
    etc
    etc

Pic1a:
    etc
    etc

etc
etc
etc


Thanks.


Follow-Ups: