Compile to HEX from Assembler plugin - HELP


+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Member xldaedalus's Avatar
    Join Date
    Jan 2005
    Posts
    158
    Thumbs Up
    Received: 2
    Given: 8
    Total Downloaded
    795.49 MB

    0 Not allowed!

    Default Compile to HEX from Assembler plugin - HELP

    I'm using 3.7.0.9 of the compiler. I compiled a working .BAS program. I generated the .ASM file using Assember(ver 2.0.0.0), made some modifications to the ASM that I'd like to test, and saved it under a new name.

    How do I convert(compile) the .ASM into a .HEX file? I tried F9 and got a window listing the link to MPASMWIN.EXE in the ProtonIDE folder, with just an OK button. No other explaination. I finally copied MPASMWIN.exe into that folder and I stopped getting that window.

    Thereafter, I'd click F9 (Assemble only) and on the bottom line, it'd as "assembling". Then - nothing.

    I finally figured that, well, of course, the default folder for the Assembler plugin is inside Program Files(x86) and windows was probably preventing the file from being "saved"

    So, I changed the default folder, and finally got some kind of action - a bunch of errors. ERROR 122's "illegal opcode", and ERROR 108 "illegal character (0)", a bunch of ERROR 176 "CONFIG DIRECTIVE Error" . etc

    I therefore assumed that the F10 function (compile and program) is NOT a method to modify the .ASM produced by a .BAS file, but a convenience for writing a stand alone ASM program, and programming that.

    Ok, I know its crazy to do this, but is there some way to modify the .ASM created by the Proton Compiler, or use the Compiler itself with command line settings to convert the ASM into .HEX, even as I understand, one slight error will cause the resulting .HEX file to be worthless.

    I just want to try it, so, if anyone is willing to help my shoot my foot off, please chime in. Cheers!
    Last edited by xldaedalus; 1st May 2019 at 23:09.

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.

  • #2
    Prolific Poster johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,165
    Thumbs Up
    Received: 96
    Given: 1
    Total Downloaded
    2.75 GB

    0 Not allowed!

    Default Re: Compile to HEX from Assembler plugin - HELP

    F9 is compile and assemble.
    F10 is in effect F9 followed by F11.

    I don't know why running MPASM with the modified ASM file didn't work but I am guessing the modifications threw out the relative addressing somewhere?

    You could place the ASM you want in the source code but you would have code the whole function and ensure that it exits with the the correct register values.
    JohnB

  • 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
    Senior Member Stephen Moss's Avatar
    Join Date
    Jan 2006
    Posts
    511
    Thumbs Up
    Received: 31
    Given: 7
    Total Downloaded
    3.72 GB

    1 Not allowed!

    Default Re: Compile to HEX from Assembler plugin - HELP

    I don't know about using the assembler plugin this way as I (and I suspect most) users have never tried it as we code in Basic and let the compiler do its thing. Consequently, there may only be one or two people who know the mechanics of how code is passed from one application to another to generate the resulting assembler to hex files that may be able to help.

    Perhaps you have already tried this but as a work around if you are unable to compile from within the Assembler Plugin you could just comment out the Basic code for the section relating to your altered ASM in your original BAS file and insert the altered assembler in its place between ASM and End ASM commands.
    Then compile from withing the IDE as usual, as I understand it the ASM code should be passed unaltered to whatever is responsible for creating the hex file and so theoretically it should work.

  • 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.

  • #4
    Senior Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    493
    Thumbs Up
    Received: 59
    Given: 0
    Total Downloaded
    408.14 MB

    0 Not allowed!

    Default Re: Compile to HEX from Assembler plugin - HELP

    On my system the assembler plugin is looking for the assembler in C:\Program Files (x86)\ProtonIDE\PDS\bin\mpasmwin.exe,
    but the assembler is actually located in \ProtonIDE\PDS\Includes\mpasmwin.exe

    There may be another way to do this, but to make the assembler plugin happy copy the files mpasmwin.exe, 8bit_device.dll, and 8bit_device.info from ProtonIDE\PDS\Includes to the ProtonIDE\PDS\bin folder.

    The plugin should now be able to find all the files it needs.

  • 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
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    2,239
    Thumbs Up
    Received: 75
    Given: 181
    Total Downloaded
    5.15 GB

    0 Not allowed!

    Default Re: Compile to HEX from Assembler plugin - HELP

    @xldaedalus Just to confirm that you do know that you can include ASM statments in your code?
    George.

  • 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.

  • #6
    Member xldaedalus's Avatar
    Join Date
    Jan 2005
    Posts
    158
    Thumbs Up
    Received: 2
    Given: 8
    Total Downloaded
    795.49 MB

    0 Not allowed!

    Default Re: Compile to HEX from Assembler plugin - HELP

    Quote Originally Posted by towlerg View Post
    @xldaedalus Just to confirm that you do know that you can include ASM statments in your code?
    Yes, of course. I wanted to try to modify an already compiled program, not add a few lines of assembly.

  • 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.

  • #7
    Member xldaedalus's Avatar
    Join Date
    Jan 2005
    Posts
    158
    Thumbs Up
    Received: 2
    Given: 8
    Total Downloaded
    795.49 MB

    0 Not allowed!

    Default Re: Compile to HEX from Assembler plugin - HELP

    Quote Originally Posted by tumbleweed View Post
    On my system the assembler plugin is looking for the assembler in C:\Program Files (x86)\ProtonIDE\PDS\bin\mpasmwin.exe,
    but the assembler is actually located in \ProtonIDE\PDS\Includes\mpasmwin.exe

    There may be another way to do this, but to make the assembler plugin happy copy the files mpasmwin.exe, 8bit_device.dll, and 8bit_device.info from ProtonIDE\PDS\Includes to the ProtonIDE\PDS\bin folder.

    The plugin should now be able to find all the files it needs.
    I see. Of course. Good idea. I'll try that and see what happens. Thanks!

  • 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.

  • #8
    Member xldaedalus's Avatar
    Join Date
    Jan 2005
    Posts
    158
    Thumbs Up
    Received: 2
    Given: 8
    Total Downloaded
    795.49 MB

    0 Not allowed!

    Default Re: Compile to HEX from Assembler plugin - HELP

    Quote Originally Posted by Stephen Moss View Post
    you could just comment out the Basic code for the section relating to your altered ASM in your original BAS file and insert the altered assembler in its place between ASM and End ASM commands.
    Yes. A clever idea. Sounds much easier way to do it and one better suited for a 10,000+ line program! Thank you.

  • 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.

  • #9
    Member xldaedalus's Avatar
    Join Date
    Jan 2005
    Posts
    158
    Thumbs Up
    Received: 2
    Given: 8
    Total Downloaded
    795.49 MB

    0 Not allowed!

    Default Re: Compile to HEX from Assembler plugin - HELP

    Quote Originally Posted by johngb View Post
    F9 is compile and assemble.
    F10 is in effect F9 followed by F11.
    Yes, I know, I tried both.

    Quote Originally Posted by johngb View Post
    I don't know why running MPASM with the modified ASM file didn't work but I am guessing the modifications threw out the relative addressing somewhere?
    I don't know why either. All the errors thrown out was as if the ASM did not include all the CONFIG data contained in the MCU file. As suggested, if I placed the MCU data for the ASM, in the same folder, it might work. But, as Steve Moss also suggested, it sounds much easier to replace code sections with ASM . ENDASM.

    Thanks for the suggestions.

  • 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.

  • #10
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,428
    Thumbs Up
    Received: 296
    Given: 142
    Total Downloaded
    1.75 GB

    0 Not allowed!

    Default Re: Compile to HEX from Assembler plugin - HELP

    The Asm file produced by the compiler is complete so it does not require any other inc files etc, so it can simply be passed to the Mpasm assembler.

    One way is to:

    Open the directory "C:\Program Files (x86)\ProtonIDE\PDS\Includes" and run the "MpasmWin.exe" file. This will open the assembler. Browse to your Asm file and assemble it. Make sure you untick the Case-Sensitive item in the assembler first.

    Another way is to Open the directory "C:\Program Files (x86)\ProtonIDE\PDS\Includes" and copy the files: "MpasmWin.exe", "8bit_device.dll", and "8bit_device.info", into the "Bin" folder already in the directory. This will allow the Asm window from the IDE to re-assemble the file. But it does not set any options, so it may not always work and may produce errors. The re-Assemble option was dropped from the compiler many years ago, but the toolbar was never changed unfortunately.

  • 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. Add compile data to hex file
      By rcurl in forum Wish List / Product Feedback
      Replies: 16
      Last Post: 23rd June 2017, 23:57
    2. Assembler
      By nullsoft in forum The Lounge
      Replies: 21
      Last Post: 11th February 2010, 10:02
    3. Need a little help in assembler, please...
      By pdgnr in forum Proton Plus Compiler v3
      Replies: 8
      Last Post: 1st June 2006, 08:42
    4. Help in assembler
      By pdgnr in forum Proton Plus Compiler v3
      Replies: 3
      Last Post: 28th March 2006, 10:02
    5. New Plugin - Bin Hex Dec
      By DaveS in forum Mecanique - IDE
      Replies: 4
      Last Post: 2nd January 2006, 20:37

    Members who have read this thread : 33

    Actions :  (Set Date)

    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