Am I reading this assembler correctly?


Results 1 to 10 of 10

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by crhomberg View Post
    Really Darrel, You always seem to spot the errors quick.
    It's a Curse, really.

    I can spot things in other peoples programs like it's got a blinking red light on it.
    But in my own programs, it can take weeks to find a simple bug.

    er - ok well I think it works that way for everyone. I just never ask for help.

    If you have any other nasties you can see in that code please tell me.
    Well, if it's turning smoothly then I think the "Nasties" are gone. But I might be able to make some new ones for you.

    Sorry, my other curse is the need to reduce redundant code (RRC).
    So here's my idea.
    Code:
    Qstep  VAR BYTE
    Coils  VAR BYTE
    
    StepForward:
        Qstep = Qstep + 1
        IF Qstep >= 16 THEN Qstep = 0
        GOTO DoStep
    
    StepReverse:
        IF Qstep = 0 then Qstep = 16
        Qstep = Qstep - 1
          
    DoStep:
        LOOKUP Qstep,[%001101,%001111,%001100,%001010,%101000,%111000,%100000,%010000 _
                     ,%000100,%000110,%000101,%000011,%100001,%110001,%101001,%011001], Coils
        PORTB = (PORTB & %11000000) | Coils
        PAUSEUS TIME
    RETURN
    Completely un-tested.
    Last edited by Darrel Taylor; - 13th November 2007 at 06:50. Reason: Reverse is a reserved word. DOH!
    DT

Similar Threads

  1. Reading temperature using multi DS18B20
    By KVLV in forum Code Examples
    Replies: 16
    Last Post: - 3rd November 2017, 20:48
  2. PIC assembler forum?
    By Lajko in forum Off Topic
    Replies: 1
    Last Post: - 29th September 2008, 06:34
  3. Assembler problem
    By om3bc in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 25th March 2008, 20:12
  4. Pot reading jumping like crazy!!!
    By champion in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 20th November 2006, 22:24
  5. Which assembler are you using?
    By picnaut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 1st November 2005, 21:34

Members who have read this thread : 0

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

Posting Permissions

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