which W register is save to use


+ Reply to Thread
Results 1 to 3 of 3

Thread: which W register is save to use12 days old

  1. #1
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,124
    Thumbs Up
    Received: 104
    Given: 26
    Total Downloaded
    2.48 GB

    0 Not allowed!

    Default which W register is save to use

    Hi All,

    I need a very short variable delay. DelayUs won't work.
    So I looked at DelayCS. The problem however is that it only takes literals, not variables.
    Looking at the .lst I see that DelayCS uses the Repeat instruction like this
    Code:
     1778                    	; rd_i000056_f001_000140_p000016,0 mkr$ in [sound.bas] delaycs 511
     1779 0006a6  FD 01 09       	    repeat #509
     1780 0006a8  00 00 00       	    nop
    According to the MC instruction documentation repeat can also use a W-register.
    But which W-register is save to use?

    regards,
    harm

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,229
    Thumbs Up
    Received: 372
    Given: 131
    Total Downloaded
    1.58 GB

    0 Not allowed!

    Default Re: which W register is save to use

    The general "volatile" WREG is WREG0. This gets used as the main fetch all and load all for library calls and expressions etc....

    Most of the WREG SFRs can be used, except W14 and W15 which are used by the microcontroller for its stack.

    I used the microcontroller's hardware Repeat mnemonic as much as possible in the code generated by the compiler because it is extremely powerful.

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,124
    Thumbs Up
    Received: 104
    Given: 26
    Total Downloaded
    2.48 GB

    0 Not allowed!

    Default Re: which W register is save to use

    Thanks,

    exactly what I was looking for

    regards,
    Harm

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Save memory
    By Leonard in forum Absolute Beginners Section
    Replies: 2
    Last Post: 4th February 2013, 22:02
  2. Save as (One for the VB express supremo's)
    By RGV250 in forum The Lounge
    Replies: 16
    Last Post: 22nd October 2009, 23:47
  3. Help to save Page 2 - 24c32
    By nic72 in forum Proton Plus Compiler v3
    Replies: 1
    Last Post: 14th July 2009, 19:42
  4. Save the enviroment for 39 pence
    By pic-ignorant in forum The Lounge
    Replies: 17
    Last Post: 29th December 2008, 05:23
  5. Save lib
    By Roshan in forum Labcenter Proteus VSM
    Replies: 2
    Last Post: 31st August 2005, 16:25

Posting Permissions

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