Re: A89: Re: DoorsOS Libraries


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

Re: A89: Re: DoorsOS Libraries




This is the exact asm file, and then I have a header file that just
equ's the grayspr:: with the @000?

   xdef _library
   xdef _ti92plus
   xdef _ti89

   include "doorsos.h"
   include "graphlib.h"

   xdef grayspr@0000
   xdef grayspr@0001

;put_4graysprite(...)
;Input:
;  d0.w = X
;  d1.w = Y
;  a0.l = Gray Sprite Location
;  a3.l = Plane 0
;  a4.l = Plane 1
;Output: nothing
;NO REGISTERS DESTROYED

grayspr::put_4graysprite
grayspr@0000:
put_4graysprite:
   movem.l d3-d4/a2,-(a7)

   move.l a0,a2
   move.w (a2)+,d3   ;Height
   move.w (a2)+,d4   ;Width
   mulu.w d3,d4      ;Height * Width
   adda.w d3,a2
   adda.w d3,a2

   move.l a3,a1

   jsr graphlib::put_sprite2

   addq.w #4,a0
   adda.w d3,a0
   adda.w d3,a2

   move.l a4,a1

   jsr graphlib::put_sprite2

   movem.l (a7)+,d3-d4/a2
   rts

;put_4graysprite2(...)
;Input:
;  d0.w = X
;  d1.w = Y
;  a0.l = Gray Sprite Location
;  a2.l = Masks
;  a3.l = Plane 0
;  a4.l = Plane 1
;Output: nothing
;NO REGISTERS DESTROYED

grayspr::put_2greysprite
grayspr@0001:
put_4graysprite2:
   movem.l d3/a2,-(a7)

   move.l a0,a2
   move.w (a2),d3   ;Height
   mulu.w 2(a2),d3      ;Height * Width

   move.l a3,a1

   jsr graphlib::put_sprite2

   addq.w #4,a0
   adda.w d3,a0
   adda.w d3,a2

   move.l a4,a1

   jsr graphlib::put_sprite2

   movem.l (a7)+,d3/a2
   rts

   end

Niklas Brunlid wrote:
> 
> > I was trying to create my own library today but ran into a problem. The
> > library call is in the right vicinity of the correct call, but it calls
> > to some ori #??,d0 and the a line 1111 (dc.w $111?). Is this a problem
> > with the linker or what?
> 
> More information would help, like the source and/or the header file you have
> created for your library.
> But it sounds like you have the wrong library function ID for the call or
> something.
> 
> Is this assembly or C?
> 
>  / Niklas Brunlid
> Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
> Random PQF Quote follows:
> 
> On Earth, No-one Can Hear You Say "Um".
>         -- (Terry Pratchett, Only You Can Save Mankind)

-- 
Scott "_Wrath_" Dial
wrath@calc.org
ICQ#3608935
TimeCity AI Guy II - www.timecity.org
Member of TCPA - tcpa.calc.org
__________________________________________
NetZero - Defenders of the Free World
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html


Follow-Ups: References: