Where should I discuss SD/MMC FAT issues?


Closed Thread
Results 1 to 40 of 93

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Default

    Thanks guys. This is what I thought too - only one "@" item per line. Maybe I'll just move the I2C files into a "Include I2C.bas". I'll just have to keep track of file locations as I progress from one folder (part of the project) to another.

    If I include the full path name of the file, can I get PBP to find it, regardless of where the main program exists? Stupid question, I know it should be ok, just asking.
    No, I'm not Superman, but I did stay at a Holiday Inn Express last night!

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JD123 View Post
    Maybe I'll just move the I2C files into a "Include I2C.bas".
    You could turn all those multi-line @ NOP's into macros.
    Put this near the top of your code:
    Code:
    ASM
    nop5 macro
         NOP
         NOP
         NOP
         NOP
         NOP
        endm
    ENDASM
    To use it:
    Code:
    @ nop5

  3. #3
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    You could turn all those multi-line @ NOP's into macros.
    Put this near the top of your code:
    Code:
    ASM
    nop5 macro
         NOP
         NOP
         NOP
         NOP
         NOP
        endm
    ENDASM
    To use it:
    Code:
    @ nop5
    That would be 9 Tcy, right?
    No, I'm not Superman, but I did stay at a Holiday Inn Express last night!

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Shouldn't be more than the amount of NOP. When you call a macro it just paste the macro code, but use another name.

    While it's not the best code efficient, You could also use some self expanding macro by adding an argument, so if you need 2,3 or 10 NOP, it will do it for you automatically. Not sure if you need it here.

    something like
    Code:
    <font color="#000080">ASM
    NOP?C   macro Cin
        local a
    a=0
        while a&lt;Cin
            nop
    a++=1
            endw
        endm
    ENDASM
    </font>
    If you use @ NOP?C 1 it will paste 1 NOP and so on.
    Last edited by mister_e; - 1st April 2008 at 17:12.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    Shouldn't be more than the amount of NOP. When you call a macro it just paste the macro code, but use another name.

    While it's not the best code efficient, You could also use some self expanding macro by adding an argument, so if you need 2,3 or 10 NOP, it will do it for you automatically. Not sure if you need it here.

    something like
    Code:
    <font color="#000080">ASM
    NOP?C   macro Cin
        local a
    a=0
        while a&lt;Cin
            nop
    a++=1
            endw
        endm
    ENDASM
    </font>
    If you use @ NOP?C 1 it will paste 1 NOP and so on.
    Thanks! I've written ASM programs, but never explored the macro functions. When I said 9Tcy I was looking at the added overhead of jumping in and out of the ASM sub. I was thinking that just to jump-to and return-from takes 4Tcy.
    No, I'm not Superman, but I did stay at a Holiday Inn Express last night!

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Sometime knowing a bit of ASM and MPASM directive is handy. I learned it through Darrel's codeS and postS... it's all it's fault
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Talking

    Quote Originally Posted by mister_e View Post
    Sometime knowing a bit of ASM and MPASM directive is handy. I learned it through Darrel's codeS and postS... it's all it's fault
    If you have to be corrupted by someone, Darrel seems to be a good choice!
    No, I'm not Superman, but I did stay at a Holiday Inn Express last night!

Similar Threads

  1. Reading and Writing from SD/MMC cards as FAT filesystem?
    By charliez in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd June 2006, 22:26

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