English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 07 September 2018, 00:03   #441
demoniac
Registered User
 
Join Date: Jul 2005
Location: -
Posts: 1,687
Quote:
Originally Posted by plasmab View Post
I dont work in hardware though. I'm a professional software engineer/developer/sometimes manager. My LinkedIn profile is public and always has been.
OK. I didn't reverse lookup your real name to find out your profession.

Quote:
Originally Posted by plasmab View Post
EDIT: Its also a bit pass remarkable for those that do work in hardware. There are a bunch of linting and code cleaning tools out there like verilator, iStyle and HDL Companion. There's loads of IDEs for HDLs like Quartus, ISE, Vivado Studio. I couldn't possibly comment on the uptake because i don't do this professionally anymore but the tools exists.
IDEs are out there, but low adaption rate. It wasn't until SystemVerilog became the industry standard around 2008-2009 where object-oriented programming was introduced to the design verification side of things. Linting was used quite a bit, but that doesn't need an IDE.
demoniac is offline  
Old 07 September 2018, 09:12   #442
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by meynaf View Post
To show the example i will do something concrete.

My main position is that 68k has better ISA than x86. I'm not telling about the implementation.
So here's the 68k code i was reluctant to give :
Code:
draw_line
 movem.l d0/d4-d7/a0-a2,-(a7)
 movea.w #1,a0
 move.l a0,a1			; a0=a1=1 (dir)
 tst.l d4
 bpl.s .abs1
 neg.l d4
 subq.l #2,a0			; will be -1
.abs1
 tst.l d5
 bpl.s .abs2
 neg.l d5
 subq.l #2,a1
.abs2
 move.l d4,d6			; x counter
 cmp.l d4,d5
 blo.s .max
 move.l d5,d6			; y counter
.max
 move.l d6,d0			; loop cntr
 move.l d6,a2			; save for addy
 lsr.l #1,d6			; rounding to avoid last pixel effect
 move.l d6,d7			; d6=x cntr, d7=y cntr
 bra.s .yp
.loop
 sub.l d4,d6
 bgt.s .xp
 add.l a0,d1			; depl x
 add.l a2,d6
.xp
 sub.l d5,d7
 bgt.s .yp
 add.l a1,d2			; depl y
 add.l a2,d7
.yp
 bsr.s setpixel
 dbf d0,.loop
 movem.l (a7)+,d0/d4-d7/a0-a2
 rts
Now waiting for equivalent x86 (or whatever) version...
Just for fun I thought I would see what GCC could do with this. I grabbed the algorithm from here, quickly hacked it to conform to your original spec:

Code:
void drawline(register int x0 asm("d1"),
             register int y0 asm("d2"),
             register int c asm("d3"),
             register int dx asm("d4"),
             register int dy asm("d5"))
{
    int p, x, y, x1;

    x=x0;
    y=y0;
    x1=x0+dx;

    p=2*dy-dx;

    while(x<x1)
    {
        if(p>=0)
        {
            putpixel(x,y,c);
            y=y+1;
            p=p+2*dy-2*dx;
        }
        else
        {
            putpixel(x,y,c);
            p=p+2*dy;
        }
        x=x+1;
    }
}
compiled with (-Os = smallest code please):

Code:
m68k-amigaosvasm-gcc -fomit-frame-pointer -Os -S line.c
and it generated:

Code:
_drawline:
        movem.l a3/a2/d7/d6/d5/d4/d3/d2,-(sp)
        move.l d1,d7
        move.l d1,a3
        add.l d4,a3
        add.l d5,d5
        move.l d5,d6
        sub.l d4,d6
        add.l d4,d4
        lea _putpixel,a2
_.L2:
        cmp.l d7,a3
        jgt _.L5
        movem.l (sp)+,d2/d3/d4/d5/d6/d7/a2/a3
        rts
_.L5:
        tst.l d6
        jlt _.L3
        move.l d3,-(sp)
        move.l d2,-(sp)
        move.l d7,-(sp)
        jsr (a2)
        addq.l #1,d2
        add.l d5,d6
        sub.l d4,d6
_.L6:
        lea (12,sp),sp
        addq.l #1,d7
        jra _.L2
_.L3:
        move.l d3,-(sp)
        move.l d2,-(sp)
        move.l d7,-(sp)
        jsr (a2)
        add.l d5,d6
        jra _.L6
Which is similar in the number of lines of code as your hand optimised example.

I didn't have time to confirm that the C is correct (only spent 1 minute on this), but it's interesting either way.
alpine9000 is offline  
Old 07 September 2018, 09:17   #443
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Realised it was passing the params to putpixel via the stack so update:

Code:
extern void putpixel(register int x0 asm("d1"),
                     register int y0 asm("d2"),
                     register int c asm("d3"));

void drawline(register int x0 asm("d1"),
              register int y0 asm("d2"),
              register int c asm("d3"),
              register int dx asm("d4"),
              register int dy asm("d5"))
{
   int p, x, y, x1;

    x=x0;
    y=y0;
    x1=x0+dx;

    p=2*dy-dx;

    while(x<x1)
    {
        if(p>=0)
        {
            putpixel(x,y,c);
            y=y+1;
            p=p+2*dy-2*dx;
        }
        else
        {
            putpixel(x,y,c);
            p=p+2*dy;
        }
        x=x+1;
    }
}
Code:
_drawline:
        movem.l a5/a4/a3/a2/d7/d6/d5/d4/d3/d2,-(sp)
        move.l d1,d7
	move.l d2,a2
        move.l d3,a3
        move.l d1,a4
        add.l d4,a4
        add.l d5,d5
        move.l d5,d6
        sub.l d4,d6
        add.l d4,d4
	lea _putpixel,a5
_.L2:
        cmp.l d7,a4
        jgt _.L5
	movem.l (sp)+,d2/d3/d4/d5/d6/d7/a2/a3/a4/a5
        rts
_.L5:
        move.l a3,d3
        move.l a2,d2
        move.l d7,d1
        tst.l d6
        jlt _.L3
        jsr (a5)
        addq.l #1,a2
        add.l d5,d6
        sub.l d4,d6
_.L4:
        addq.l #1,d7
        jra _.L2
_.L3:
        jsr (a5)
        add.l d5,d6
        jra _.L4
alpine9000 is offline  
Old 07 September 2018, 09:35   #444
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by alpine9000 View Post
I didn't have time to confirm that the C is correct (only spent 1 minute on this), but it's interesting either way.
I can do this for you. It doesn't work

More precisely, if you examine the C code you will notice it can draw a line only if dx,dy are positive values (IOW x,y positions can only increase).
But my routine has to draw lines with just about any direction...
meynaf is offline  
Old 07 September 2018, 09:54   #445
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by meynaf View Post
I can do this for you. It doesn't work

More precisely, if you examine the C code you will notice it can draw a line only if dx,dy are positive values (IOW x,y positions can only increase).
But my routine has to draw lines with just about any direction...
OK, try this one (same level of checking as my previous effort

Code:
extern void
putpixel(register int x0 asm("d1"),
         register int y0 asm("d2"),
         register int c asm("d3"));

void drawline(register int x0 asm("d1"),
              register int y0 asm("d2"),
              register int c asm("d3"),
              register int dx asm("d4"),
     	      register int dy asm("d5"))
{
  int x1 = x0 + dx;
  int y1 = y0 + dy;
  int sx = x0 < x1 ? 1 : -1;
  int sy = y0 < y1 ? 1 : -1;
  int err = dx + dy, e2; /* error value e_xy */

  for (;;){  /* loop */
    putpixel(x0,y0,c);
    if (x0 == x1 && y0 == y1) break;
    e2 = 2 * err;
    if (e2 >= dy) { err += dy; x0 += sx; } /* e_xy+e_x > 0 */
    if (e2 <= dx) { err += dx; y0 += sy; } /* e_xy+e_y < 0 */
  }
}
Code:
_drawline:
        subq.l #4,sp
        movem.l a6/a5/a4/a3/a2/d7/d6/d5/d4/d3/d2,-(sp)
        move.l d1,a3
        move.l d2,a2
        move.l d3,44(sp)
        lea (a3,d4.l),a5
        lea (a2,d5.l),a6
        cmp.l d1,a5
        sle d7
        ext.w d7
        ext.l d7
        moveq #1,d0
        or.l d0,d7
        cmp.l d2,a6
        sle d6
        ext.w d6
	ext.l d6
        or.l d0,d6
        move.l d4,a4
        add.l d5,a4
_.L4:
        move.l 44(sp),d3
        move.l a2,d2
        move.l a3,d1
        jsr _putpixel
        cmp.l a3,a5
        jne _.L5
        cmp.l a2,a6
        jeq _.L1
_.L5:
        move.l a4,d0
        add.l a4,d0
        cmp.l d5,d0
        jlt _.L7
        add.l d5,a4
        add.l d7,a3
_.L7:
        cmp.l d4,d0
        jgt _.L4
        add.l d4,a4
        add.l d6,a2
        jra _.L4
_.L1:
        movem.l (sp)+,d2/d3/d4/d5/d6/d7/a2/a3/a4/a5/a6
        addq.l #4,sp
        rts
alpine9000 is offline  
Old 07 September 2018, 10:36   #446
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Not seeing anything obvious i tried it directly. Got endless loop filling a large pixel area.
Please check your code ; hit-and-miss has its limits
meynaf is offline  
Old 07 September 2018, 16:42   #447
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,918
Comparing the x86 and 68k ISAs is a pretty easy job. The 68k Instruction Set Architecture is like a nice house with four bedrooms, two bathrooms and a garage for two cars. The x86 Instruction Set Architecture is a shed that has lots of rooms added for the newborn kids, other parts wrecked, windows and doors broken into walls, others bricked up, new floors added on top with staircases added to be able to go there. It is clear which one is the better Architecture. However, it may be correct to say that the shed with the added rooms may have been economically more feasible for a young couple planning to have children that couldn't afford building a house with four bedrooms right from the start.

Intel could put much more money into R&D to work around the quirks of their architecture and into developing a semiconductor process that has been at least one node size ahead of all competition. They simply can afford to put a far more complex core onto a chip because they can produce the chips with smaller feature size. Just have a look at processors of a comparable generation and speed:

1993: Pentium 3.1 million transistors
1994: 68060 2.5 million transistors
1994: PPC603 1.6 million transistors

Intel could afford putting more transistors on a die earlier than the others and still make a ton of money.
grond is online now  
Old 08 September 2018, 01:01   #448
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by meynaf View Post
Not seeing anything obvious i tried it directly. Got endless loop filling a large pixel area.
Please check your code ; hit-and-miss has its limits
ok - I actually did a couple of simple tests on this version, not saying it's 100% for all cases however

It's still just a cut and paste from here, I am guessing even the C is not optimal the way I hacked it to your API spec (most of the line draw implementations that come up from a search go x0,y0,x1,y1 rather than x,y,dx,dy)

Code:
#define __REG(reg, arg)     register arg asm(reg)

extern void putpixel(__REG("d1", int x0),
         __REG("d2", int y0),
         __REG("d3", int c));

void drawline(__REG("d1", int x0),
              __REG("d2", int y0),
              __REG("d3", int c),
              __REG("d4", int _dx),
              __REG("d5", int _dy))
{
  int x1 = x0+_dx;
  int y1 = y0+_dy;
  int dx = _dx < 0 ? -_dx : _dx;
  int dy = _dy < 0 ? -_dy : _dy;
  int sx = x0 < x1 ? 1 : -1;
  int sy = y0 < y1 ? 1 : -1;
  int err = dx - dy, e2; /* error value e_xy */

  for (;;){  /* loop */
    putpixel (x0,y0,c);
    if (x0 == x1 && y0 == y1) break;
    e2 = 2 * err;
    if (e2 <= dy) { err -= dy; x0 += sx; } /* e_xy+e_x > 0 */
    if (e2 <= dx) { err += dx; y0 += sy; } /* e_xy+e_y < 0 */
  }
}
Code:
_drawline:
        subq.l #4,sp
        movem.l a6/a5/a4/a3/a2/d7/d6/d5/d4/d3/d2,-(sp)
        move.l d1,a4
        move.l d2,a3
        move.l d3,44(sp)
        lea (a4,d4.l),a5
        lea (a3,d5.l),a6
        tst.l d4
        jge _.L2
        neg.l d4
_.L2:
        tst.l d5
        jge _.L3
        neg.l d5
_.L3:
        cmp.l a4,a5
        sle d7
        ext.w d7
        ext.l d7
        moveq #1,d0
        or.l d0,d7
        cmp.l a3,a6
        sle d6
        ext.w d6
        ext.l d6
        or.l d0,d6
        move.l d4,a2
	sub.l d5,a2
_.L6:
        move.l 44(sp),d3
        move.l a3,d2
        move.l a4,d1
        jsr _putpixel
        cmp.l a4,a5
        jne _.L7
        cmp.l a3,a6
        jeq _.L1
_.L7:
        move.l a2,d0
        add.l a2,d0
        cmp.l d5,d0
        jgt _.L9
        sub.l d5,a2
        add.l d7,a4
_.L9:
        cmp.l d4,d0
        jgt _.L6
        add.l d4,a2
        add.l d6,a3
        jra _.L6
_.L1:
        movem.l (sp)+,d2/d3/d4/d5/d6/d7/a2/a3/a4/a5/a6
        addq.l #4,sp
        rts
alpine9000 is offline  
Old 08 September 2018, 08:57   #449
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by alpine9000 View Post
ok - I actually did a couple of simple tests on this version, not saying it's 100% for all cases however
It appears to be working.

EDIT: spoke too fast. Messed up with my if/endc and was using my routine instead
It actually freezes if doing draw 120,100,7,1...


Quote:
Originally Posted by alpine9000 View Post
It's still just a cut and paste from here, I am guessing even the C is not optimal the way I hacked it to your API spec (most of the line draw implementations that come up from a search go x0,y0,x1,y1 rather than x,y,dx,dy)
I prefer x,y,dx,dy over x0,y0,x1,y1 because it becomes easy to draw a series of lines without having to care about original position.
That's the reason why d1,d2 are updated in my code (something not straightforward in C).

Last edited by meynaf; 08 September 2018 at 10:10. Reason: oops - wrong routine used
meynaf is offline  
Old 08 September 2018, 10:46   #450
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by meynaf View Post
It appears to be working.

EDIT: spoke too fast. Messed up with my if/endc and was using my routine instead
It actually freezes if doing draw 120,100,7,1...
.
ok - this is my last try, as the code gets bigger every time it gets less interesting

Code:
#define __REG(reg, arg)     register arg asm(reg)
#define abs(x) ((x) < 0 ? -(x) : (x))

extern
void putpixel(__REG("d1", int x0),
         __REG("d2", int y0),
         __REG("d3", int c));

void drawline(__REG("d1", int x0),
              __REG("d2", int y0),
              __REG("d3", int c),
              __REG("d4", int _dx),
              __REG("d5", int _dy))
{
  int x1 = _dx + x0;
  int y1 = _dy + y0;
  int dx =  abs (x1 - x0), sx = x0 < x1 ? 1 : -1;
  int dy = -abs (y1 - y0), sy = y0 < y1 ? 1 : -1;
  int err = dx + dy, e2; /* error value e_xy */

  for (;;){  /* loop */
    putpixel(x0,y0,c);
    if (x0 == x1 && y0 == y1) break;
    e2 = 2 * err;
    if (e2 >= dy) { err += dy; x0 += sx; } /* e_xy+e_x > 0 */
    if (e2 <= dx) { err += dx; y0 += sy; } /* e_xy+e_y < 0 */
  }
}
Code:
_drawline:
        subq.l #8,sp
        movem.l a6/a5/a4/a3/a2/d7/d6/d5/d4/d3/d2,-(sp)
	move.l d1,a4
        move.l d2,a2
        move.l d3,48(sp)
        lea (a4,d4.l),a3
        lea (a2,d5.l),a6
        tst.l d4
        jge _.L2
        neg.l d4
_.L2:
        cmp.l a4,a3
        sle d7
        ext.w d7
	ext.l d7
        moveq #1,d0
        or.l d0,d7
        tst.l d5
        jge _.L4
        neg.l d5
_.L4:
        move.l d5,d0
        neg.l d0
	move.l d0,44(sp)
        cmp.l a2,a6
        sle d6
        ext.w d6
        ext.l d6
        moveq #1,d0
        or.l d0,d6
        move.l d4,a5
        sub.l d5,a5
_.L6:
        move.l 48(sp),d3
        move.l a2,d2
        move.l a4,d1
        jsr _putpixel
        cmp.l a4,a3
        jne _.L7
        cmp.l a2,a6
        jeq _.L1
_.L7:
        move.l a5,d0
        add.l a5,d0
        cmp.l 44(sp),d0
        jlt _.L9
        sub.l d5,a5
        add.l d7,a4
        cmp.l d4,d0
        jgt _.L6
_.L9:
        add.l d4,a5
        add.l d6,a2
        jra _.L6
_.L1:
        movem.l (sp)+,d2/d3/d4/d5/d6/d7/a2/a3/a4/a5/a6
        addq.l #8,sp
        rts
alpine9000 is offline  
Old 08 September 2018, 10:59   #451
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Now it works (yes, really).
But again, please, next time you submit code, debug it first. This would save us a lot of time.
meynaf is offline  
Old 08 September 2018, 11:08   #452
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by meynaf View Post
Now it works (yes, really).
But again, please, next time you submit code, debug it first. This would save us a lot of time.
How about we do a non trivial algorithm ? Got anything more complex that would likely have a C implementation?
alpine9000 is offline  
Old 08 September 2018, 12:40   #453
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by alpine9000 View Post
How about we do a non trivial algorithm ? Got anything more complex that would likely have a C implementation?
Considering the time it took for something trivial, maybe i'll skip
meynaf is offline  
Old 08 September 2018, 14:32   #454
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by meynaf View Post
Considering the time it took for something trivial, maybe i'll skip
Time it took? The problem was I spent no time on it, Less than 5 minutes total (not like I didn’t warn you that I wasn’t testing).

It’s fun to compare hand crafted asm with C generated equivalent, surely you have some stuff in your library you want to share.

We could also compare some other architectures with GCC.
alpine9000 is offline  
Old 08 September 2018, 14:56   #455
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by alpine9000 View Post
Time it took? The problem was I spent no time on it, Less than 5 minutes total (not like I didn’t warn you that I wasn’t testing).
The problem was more about my time
I had to do what you didn't do.


Quote:
Originally Posted by alpine9000 View Post
It’s fun to compare hand crafted asm with C generated equivalent, surely you have some stuff in your library you want to share.

We could also compare some other architectures with GCC.
For me comparing asm with generated code isn't exactly fun - i've rewritten too much compiled code in my life to find reading it fun anymore.

I do have, however, something that i'd like to have in c or cpp (must compile in VS at least). And it can't be too fast. But it's big, way beyond the scope of this thread, and if you don't have time to invest for testing a small routine then for that thing it's hopeless.
meynaf is offline  
Old 08 September 2018, 15:55   #456
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
Quote:
Originally Posted by litwr View Post
Intel's CPU didn't copy IBM or DEC. 8086 is a typical 16-processor. It is a fact. Indeed, you may call it even 4-bit.
8086 is quite untypical for a 16-bit processor made after 1970. Throughout the 70s, minicomputers (and later on, microprocessors) went towards more orthogonal designs, something which cannot be said of the 8086. The PDP-11 was the golden standard for this design, but far from unique. Motorola chose this path, so did Zilog when they went 16-bit, and so did National Semiconductor with the 32016. Even the TMS9900 is quite orthogonal, albeit very different.

Quote:
Originally Posted by litwr
A good CPU is designed not for assembly programmers and for compilers but for the users which need only speed and safety.
Let me restate myself:
You would have had a point of the x86 had had 24-bit addressing with 24-bit addressing registers. But it doesn't have that — it has a segment register which is a nightmare both for assembly programmers and for compilers. PC relative addressing solves the same problem without dividing the entire address space into separate little compartments.

A programmer-friendly (or compiler-friendly) ISA makes for faster and safer code. It is also fundamental when choosing an architecture – do note that almost all 16/32-bit designs before the rise of RISC used a Motorola 680x0 and that almost none used the x86.
idrougge is offline  
Old 08 September 2018, 17:09   #457
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
The story of why IBM used 8088 :
https://spectrum.ieee.org/tech-histo...microprocessor

In short, the only other competitor was TMS9900 because 68000 was not ready at the time and they wanted their computer to be put to market fast.
Compare 64Kb with 1MB... Job done...
meynaf is offline  
Old 08 September 2018, 22:12   #458
litwr
Registered User
 
Join Date: Mar 2016
Location: Ozherele
Posts: 229
Quote:
Originally Posted by meynaf View Post
The story of why IBM used 8088 :
https://spectrum.ieee.org/tech-histo...microprocessor

In short, the only other competitor was TMS9900 because 68000 was not ready at the time and they wanted their computer to be put to market fast.
Compare 64Kb with 1MB... Job done...
Thanks for the link. However I have bad news for you. It looks like your 68000 code for line drawing routine is buggy. I have been converting it to the next C-code and found out that it just doesn't work.
Code:
//x0 - d1, y0 - d2, c - d3, dx - d4, dy - d5
void drawline(register int x0, register int y0, register int c, register int dx, register int dy) {
  int sx = dx > 0 ? 1 : -1; //a0
  int sy = dy > 0 ? 1 : -1; //a1
  dx = abs(dx);
  dy = abs(dy);

  int xc = dx;
  if (dx < dy) xc = dy; //xc = max(dx, dy)
  int lc = xc, sa = xc; //d0, a2
  xc >>= 1; //d6
  int yc = xc; //d7
  goto l1;  
   
  do {
    if ((xc -= dx) <= 0) {
        x0 += sx;
        xc += sa;
    }
    if ((yc -= dy) <= 0) {
        y0 += sy;
        yc += sa;
    }
l1: putpixel(x0, y0, c);
  } while (--lc >= 0);
}
IMHO, movem.l d0/d4-d7/a0-a2,-(a7) should be replaced by movem.l d0/d6-d7/a0-a2,-(a7) and lsr.l #1,d6 with asr.l #1,d6.

EDIT. I'm sorry I have made a typo in my C code, it was an excessive minus sign. The mistake is corrected. I hope to make x86 code soon.

Last edited by litwr; 08 September 2018 at 22:31.
litwr is offline  
Old 09 September 2018, 07:57   #459
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by litwr View Post
Thanks for the link. However I have bad news for you. It looks like your 68000 code for line drawing routine is buggy. I have been converting it to the next C-code and found out that it just doesn't work.
My code has been tested and draws all lines i feed it.


Quote:
Originally Posted by litwr View Post
IMHO, movem.l d0/d4-d7/a0-a2,-(a7) should be replaced by movem.l d0/d6-d7/a0-a2,-(a7)
Why the heck would I allow D4-D5 to be trashed in my routine ?


Quote:
Originally Posted by litwr View Post
and lsr.l #1,d6 with asr.l #1,d6.
Data coming out of ABS is necessarily a positive value. So this does not matter.


Quote:
Originally Posted by litwr View Post
EDIT. I'm sorry I have made a typo in my C code, it was an excessive minus sign. The mistake is corrected. I hope to make x86 code soon.
At least you've checked if your C code works. Not eveyone does this here
meynaf is offline  
Old 09 September 2018, 08:16   #460
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by meynaf View Post
At least you've checked if your C code works. Not eveyone does this here
The same person that posted results then edited the post because he made a mistake and wasn't running the code he thought he was ?

Quote:
Originally Posted by meynaf View Post
It appears to be working.

EDIT: spoke too fast. Messed up with my if/endc and was using my routine instead
alpine9000 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any software to see technical OS details? necronom support.Other 3 02 April 2016 12:05
2-star rarity details? stet HOL suggestions and feedback 0 14 December 2015 05:24
EAB's FTP details... Basquemactee1 project.Amiga File Server 2 30 October 2013 22:54
req details for sdl turrican3 request.Other 0 20 April 2008 22:06
Forum Details BippyM request.Other 0 15 May 2006 00:56

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:29.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.13063 seconds with 16 queries