1. RE: RE: assembly

Without knowing what the end result is, this is difficult to optimize.  
My interpretation is that phl is a sequence of length 256 containing 
coordinates and a color.  You are stepping through your list and if a 
color is equal to variable i, then draw a 'circle' at that element's 
coordinates.

If you want this in assembly, I can only assume that this loop is being 
executed frequently.  Perhaps another technique to accomplish the same 
effect might be in order.  Typically palette manipulation is much faster 
than re-drawing stuff but this might not be helpful if your coordinates 
are also changing frequently.  Another technique that might prove useful 
is to do your drawing on a virtual screen and update your visible screen 
as appropriate.

If you are sure assembly is the way to go, then I won't be much help to 
you.  However, if you'd like to provide more info and discuss 
alternatives, feel free to send me an email.

-- Brian

Evan Marshall wrote:
> sequence phl phl = {{{x1,y1},a1},{{x2,y2},a2},...{{xn,yn},an}}
> 
> for b = 1 to 256 do
>      c = phl[b][1][1]
>      d = phl[b][1][2]
>      if phl[b][2] = i then
>           ellipse(phl[b][2],1,{c-2,d-2},{c+1,d+1})
>      end if
> end for
> 
> P.S. I had to create variables c and d because when I had the element
> directly in the ellipse function, the first y value never changed
> (!?).
> i.e.  {1,2},{4,2}..{10,2},{14,2}
> 
> 
> Brian Broker <bkb at cnw.com> wrote:
> >
> > Evan,
> >
> > Are you sure you need assembly?  Perhaps if you share your bit of
> code
> > you might be suprised at what optimizations could be made just using
> > Euphoria sequence operations...
> >
> > -- Brian
> >
> > > I have a bit of code that would be sped up immensely with a bit of
> > > assembly.  The problem is that I haven't done any assembly
> programming
> > > since the late-mid '80's.  Does any one know where I can find a
> simple
> > > tutorial on assembly and/or a list of opcodes in hex (or binary).
> > > Specifically, I need to load a sequence into memory, check each
> > > element, and return a result depending on the status of the
> element.
> > > The sequence is in the form of
> > > {{{x1,y1},a1}},{{x2,y2},a2},...{{xn,yn},an}}

new topic     » topic index » view message » categorize

2. Re: RE: RE: assembly


new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu