A89: ASM to C and vice versa


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

A89: ASM to C and vice versa




Anybody here know how to make C recognize an asm function? here's a quickie
example:

line.asm

\DrawLine:
        move.l         LCD_MEM,a0            ; Move LCD memory into a0
        move.w        #3,d0                          ;  Move #3 into d0
        ext.l               d0                                ; clear d0
        mulu.w        #30,d0                           ; multiply by 30 for
offsetting
        add.l            d0,a0                           ; Add Offset to
LCD_MEM
        move.w        #LCD_LINE_BYTES-1,d1    ; Loop Counter == Screen
Length -1
\loop:
        move.b        #$FF,(a0)+                ; set byte on screen,
advance to next row of bytes
        dbra.w        d1,\loop                        ; loop until counter
== -1
        rts                                                    ; return from
subroutine

in C how can I do the equivalent of:

int _main(void)
{
    DrawLine();
}

also, if anyone knows how to make asm recognize a user made c function(all
ive seen are tios functions), lemme know if you would ;D

----- Original Message -----
From: "Brian Taylor" <jodokaast@hotmail.com>
To: <assembly-89@lists.ticalc.org>
Sent: Tuesday, September 12, 2000 7:16 PM
Subject: Re: A89: 3d programming (I know how...)


>
> i have just started high school calculus (advanced placement), and i don't
> recall anything about abstract algebra... it sounds neat though.
>
> /brian
>
> ----- Original Message -----
> From: "Tyrel Haveman" <tyrel@haveman.net>
> To: <assembly-89@lists.ticalc.org>
> Sent: Tuesday, September 12, 2000 5:23 PM
> Subject: Re: A89: 3d programming (I know how...)
>
>
> >
> > 99% of the time, Abstract Algebra is the first part of a high school
> > Calculus course.. the books even say "Calculus and Abstract Algebra" on
> the
> > front...
> >
> >
> > At 01:09 PM 9/12/00, you wrote:
> >
> > >Sorry, I misunderstood. There is a field of mathematics called abstract
> > >algebra, and it's usually a grad level math course.
> > >
> > >
> > >>From: Jimmy Baker <ashbar83@yahoo.com>
> > >>Reply-To: assembly-89@lists.ticalc.org
> > >>To: assembly-89@lists.ticalc.org
> > >>Subject: Re: A89: 3d programming (I know how...)
> > >>Date: Tue, 12 Sep 2000 09:55:23 -0700 (PDT)
> > >>
> > >>
> > >>I just needed a lot of abstract algebra to figure it
> > >>out by myself, not to do the calculation itself.
> > >>Abstract meaning x=y+z, using variables instead of
> > >>numbers. It took me 3 days to figure it out.
> > >>
> > >>-root
> > >>
> > >>
> > >>--- Michael Cowart <freakonaleash881@hotmail.com>
> > >>wrote:
> > >> >
> > >> > Uhhhhhh...........
> > >> > You don't need abstract algebra to do 3d
> > >> > programing... just some vector
> > >> > algebra and calculus. I don't think you need
> > >> > advanced topography for
> > >> > something that a 89 could render =P. Really, I don't
> > >> > think many programmers
> > >> > know abstract algebra (including me, except for a
> > >> > miniscule amount).
> > >> >
> > >> > <USELESSGARBAGE>..Take the Klein bottle, for
> > >> > example. It can be shown that
> > >> > this construct has neither an inside or outside.
> > >> > While impossible to
> > >> > construct in R3, it is a simple matter (!!!!!!) to
> > >> > form in R4...
> > >> >
> > >> > In Z12, find all the solutions to the equation
> > >> > x^2+2x-15=5...
> > >> >
> > >> > Is this subgroup abelian...</USELESSGARBAGE>
> > >> >
> > >> > NOTE: I take no responsibility for the validity of
> > >> > anything in the above
> > >> > garbage section, if i'm right, great, if not, too
> > >> > bad.
> > >> >
> > >> > Mike
> > >> >
> > >> > >From: Jimmy Baker <ashbar83@yahoo.com>
> > >> > >Reply-To: assembly-89@lists.ticalc.org
> > >> > >To: assembly-89@lists.ticalc.org
> > >> > >Subject: Re: A89: 3d programming (I know how...)
> > >> > >Date: Mon, 11 Sep 2000 19:11:04 -0700 (PDT)
> > >> > >
> > >> > >
> > >> > >Hey, do a search for 3d vector programming and you
> > >> > >should find some good pages, you have to do a lot
> > >> > of
> > >> > >abstract algebra to figure it out, I can help if
> > >> > you
> > >> > >want.
> > >> > >
> > >> > >-root
> > >> > >
> > >> > >
> > >> > >
> > >> > >--- Glenn Murphy <littlbit@soundex.org> wrote:
> > >> > > >
> > >> > > > This isn't exactly 68k specific but, right now
> > >> > > > that's what I'm aiming for.
> > >> > > > What I want, is to know what kind of math is
> > >> > needed
> > >> > > > for 3d programming (not
> > >> > > > knowing is due to my school lacking in every
> > >> > > > academic (and athletic)
> > >> > > > department imaginable...and a little bit due to
> > >> > me
> > >> > > > :) ).  And, if you don't
> > >> > > > mind, I would like to know how that would be
> > >> > > > implemented in 68k asm.  My
> > >> > > > game will just be using lines, so the 89/92+
> > >> > should
> > >> > > > be fast enough to handle
> > >> > > > it (unless my programming skills are lacking
> > >> > more
> > >> > > > than I thought).  Thank
> > >> > > > you for your time, help and patience in bearing
> > >> > with
> > >> > > > my questions.
> > >> > > >
> > >> > > > Thanks,
> > >> > > > Glenn Murphy
> > >> > > >
> > >> > > >
> > >> > >
> > >> > >
> > >> > >__________________________________________________
> > >> > >Do You Yahoo!?
> > >> > >Yahoo! Mail - Free email you can access from
> > >> > anywhere!
> > >> > >http://mail.yahoo.com/
> > >> > >
> > >> >
> > >> >
> >
>
>>_________________________________________________________________________
> > >> > Get Your Private, Free E-mail from MSN Hotmail at
> > >> > http://www.hotmail.com.
> > >> >
> > >> > Share information about yourself, create your own
> > >> > public profile at
> > >> > http://profiles.msn.com.
> > >> >
> > >> >
> > >>
> > >>
> > >>__________________________________________________
> > >>Do You Yahoo!?
> > >>Yahoo! Mail - Free email you can access from anywhere!
> > >>http://mail.yahoo.com/
> > >
> >
>_________________________________________________________________________
> > >Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.
> > >
> > >Share information about yourself, create your own public profile at
> > >http://profiles.msn.com.
> >
> >
> >
>




Follow-Ups: References: