1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Oshonsoft Bug

Discussion in 'Oshonsoft' started by Mosaic, Oct 24, 2010.

  1. Mosaic

    Mosaic Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    2,611
    Likes:
    129
    Location:
    Caribbean
    Hi all:

    I have been using this heavily for about 4 months for the PIC16F886.

    My source code has exceeded 250Kb so far. The Hex is abt 6kb

    The simulator has started to choke....and as the source gets larger it now crashes most of the time when I try to compile.

    I now compile the same code with mpasmwin successfully.

    I have sent in a bug report and source code to Oshonsoft but nothing is forthcoming.

    The error is:

    Run time error '70'
    Permission Denied

    I have tried on 3 different Win XP PC's, same results. Smaller prgs compile fine. My 1st experience with this bug seemed to start around 150K source code, but it was quite infrequent. Luckily the simulator saved the source b4 it crashes.

    Any ideas?
     
  2. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi,
    The 250K text to 6K hex ratio is very high, I usually run about 10 to 1.

    I would guess the problem is with the length and number of labels you are using in the source code..

    You could attach the 'asm' to a post and will give it it a run thru my Oshonsoft assembler.
     
  3. ot1

    ot1 New Member

    Joined:
    Oct 24, 2010
    Messages:
    9
    Likes:
    1
    How far along in the compile is it choking? Are you compiling in basic? Is the source Basic? I have a 45KB hex file produced from a 150Kb .ASM file, and don't have a problem thus far. I suspect what is happening is that when it goes to write the final output they are still locked from previous use for some reason. XP maybe taking too long to release a file for writing to. How much memory do the PCs have? Have you monitored the memory during a compile? Monitor the stack too just in case.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Mosaic

    Mosaic Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    2,611
    Likes:
    129
    Location:
    Caribbean

    Eric:
    I have the code heavily commented.
    I am attaching the code for you guys to compile. Sometimes i observe that when i crashes the MPasmwin remains active in the XP processes. If i kill it 'sometimes' I get a successful compile.
     

    Attached Files:

  6. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi Mosiac.
    Assembled your source asm in Oshonsoft.

    Reports this error, so no hex file created.
    Error[113] C:\00000000.ASM 4701 : Symbol not previously defined (Menumode3)
    Error[128] C:\00000000.ASM 4701 : Missing argument(s)

    If line 4701 is remmed out, the program assembles OK and creates a 36K hex file.

    In all my time I have never seen such a over commented bloated program...:)

    My advise would be to prune out all the unnecessary comments and graphics, the program will assemble faster..
     

    Attached Files:

  7. Mosaic

    Mosaic Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    2,611
    Likes:
    129
    Location:
    Caribbean
    Are u on XP Eric? Which SP if u r?

    Yes, 35K hex on PC abt 6K goes into the PIC.

    Can u assemble a few time sequentially and see if u get no error pls.
     
    Last edited: Oct 26, 2010
  8. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi,
    I'm using XP Pro, 3GHz clock

    I have assembled a few times OK, will try some more.

    Do you know that the 16F886 has only 2000hex [8192] of program word memory,???

    EDIT:
    Added disassembly image, shows the end section of the program hex, you have only a few bytes left
     

    Attached Files:

    Last edited: Oct 26, 2010
  9. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi Mosaic,
    I have retried 3 times in sequence, all OK, takes about 5 seconds per pass
     
  10. Mosaic

    Mosaic Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    2,611
    Likes:
    129
    Location:
    Caribbean
    Eric:

    I got it to assemble 2 times...3rd time ...same error. It may have something to do with file access it seems.

    Perhaps caching. Problem far more significant on slower machines.

    3.6 Ghz Quadcore, 4gb Ram, Xp pro.

    The code is about done. The 886 is a good fit for the app in terms of RAM, GPIO etc.

    I really need to sort out this Oshon prob, it's a far better assembler in terms of error reporting etc.
     
  11. ot1

    ot1 New Member

    Joined:
    Oct 24, 2010
    Messages:
    9
    Likes:
    1
    Hey Mosaic,

    I downloaded problemcode.asm from your link, to the working directory of the IDE.
    Ctrl A to open the assmbler, and then opened the file from the IDE working directory. Assembly took about 6-7 seconds on an XP, SP2, 2.8G clock, 1G ram, IDE v6.85
    compile resulted in 283 errors, I d/loaded the .asm 3 times, always result in 283 errors when compiled.

    duplicate labels line 0355, etc
    unrecognized instructions all throughout like:
    skpnz, skpz, skpc, skpnc

    But I didn't get the permission 70 error and have the IDE crash, which is a locked file access error.
    What is your version? Are you using the trial version, or an unsactioned copy? Are you monitoring your memory and drive available sizes?
     
    Last edited: Oct 27, 2010
  12. Mosaic

    Mosaic Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    2,611
    Likes:
    129
    Location:
    Caribbean
    Version 6.86 Licensed. I use the MPASM assembler not the native Oshonsoft. I use 4Gig, 3.0Mhz P4 at home mainly, 3 HDD structured to optimise data movement for video editing. 4 GB available on system drive.
     
  13. Mosaic

    Mosaic Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    2,611
    Likes:
    129
    Location:
    Caribbean
    I'd like to report that version 6.91 of the simulator has FIXED the problem.
     

Share This Page