DIV32 Understanding


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: DIV32 Understanding

    DIV32 requires certain system variables to have a 32-bit value in them.
    They are initialized by a multiplication operation with at least 1 word (the second value can be a constant).
    Then a library routine can be executed to do the multiplication.

    Part of the optimization of PBP is called "Constant Folding"
    If both values in the multiplication are constants ... the compiler multiplies them at "Compile-Time" and uses a single value (a constant).
    No multiplication is performed at run-time, and the system variables are never loaded with the 32-bit value.

    I've talked about DIV32 and the System vars it uses a few years ago ... http://www.picbasic.co.uk/forum/showthread.php?t=1942
    Last edited by Darrel Taylor; - 19th January 2013 at 06:53.
    DT

  2. #2
    Join Date
    Jul 2005
    Location
    Palmdale, CA
    Posts
    37


    Did you find this post helpful? Yes | No

    Default Re: DIV32 Understanding

    Thanks for the explanation Darrel. Exactly what I was looking for.

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default Re: DIV32 Understanding

    Buuuuut ...

    The most charming girl this forum ever saw ( of course Melanie ! ) gave us long time ago the way to load those registers with a macro ... if my memory still works fine. AND ... I might still have a print of that ...

    Here's Darrel's edition : http://www.picbasic.co.uk/forum/showthread.php?t=1942 ...

    Alain
    Last edited by Acetronics2; - 19th January 2013 at 20:51.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Problem with Div32
    By lerameur in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 22nd April 2008, 02:54
  2. RPM - DIV32 Problem
    By davewanna in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 11th April 2008, 04:33
  3. DIV32 Questions ...
    By Acetronics2 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 10th November 2007, 00:49
  4. Div32
    By Archangel in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 2nd February 2007, 20:26
  5. DIV32 confusion
    By dmairspotter in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th October 2005, 21:24

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts