English Amiga Board


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

 
 
Thread Tools
Old 30 January 2021, 17:42   #1
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,359
how to make this code 68000 compliant?

Code:
    tst.w    d1
    bne.b    .AAA
    swap    d2
    move.w    d2,d1
    clr.w    d2
    divu.l    d0,d1:d2   <====
    bvs.b    .AAA
    move.l    d2,d0

the "divu.l" instruction is not 68000 compatible (and AFAIR not 68060 compatible either)


can someone help to rewrite this code in a 68000 compatible way? I included the full code around for context.
jotd is offline  
Old 30 January 2021, 17:44   #2
Ernst Blofeld
<optimized out>
 
Ernst Blofeld's Avatar
 
Join Date: Sep 2020
Location: <optimized out>
Posts: 321
Quote:
Originally Posted by jotd View Post
Code:
    tst.w    d1
    bne.b    .AAA
    swap    d2
    move.w    d2,d1
    clr.w    d2
    divu.l    d0,d1:d2   <====
    bvs.b    .AAA
    move.l    d2,d0

the "divu.l" instruction is not 68000 compatible (and AFAIR not 68060 compatible either)


can someone help to rewrite this code in a 68000 compatible way? I included the full code around for context.
Algorithm D?

http://eab.abime.net/showthread.php?...ght=AlgorithmD

I'm using that code with the 2 020 specific lines removed.
Ernst Blofeld is offline  
Old 30 January 2021, 18:25   #3
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,359
ah I saw this thread a few weeks/days ago. thanks.

It may be worth testing against CPU before doing this. on a 68020 the divu.l is probably much faster.
jotd 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
68000 code optimisations pmc Coders. Asm / Hardware 248 17 September 2023 13:20
68000 Alien Vs Predator Jaguar Source code redblade Coders. Asm / Hardware 31 14 July 2022 20:18
I am trying to make my first GFX assembler code litwr Coders. Tutorials 111 14 December 2018 21:10
68020 to 68000 code convertion using Ira and PhxAss gulliver Coders. Asm / Hardware 18 12 April 2014 01:09
68000 boot code billt Coders. General 15 05 May 2012 20:13

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 21:48.

Top

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