Jump to content

Compiler hangs with in-line assembly

Recommended Posts

Bug description:

Compiler hangs indefinitely with the following source -

Steps to reproduce:

This file is "TClass.hpp" -

unsigned char ReadFlash(unsigned int FlashAddr)
        _tblptru = 0
        _tblptrh = _FlashAddr
        _tblptrl = _FlashAddr+1
    return tablat;


Expected behaviour:

This should compile with no errors


Is the problem 100% reproduceable:

100% every time


IDE version:   MPLAB-X V4.20

Compiler:               BoostC++

Compiler version:     V7.43

Target device: PIC18F8527

OS:                     Win 7



Compiles if the three lines relating to _tblptrx are commented out.

Link to post
Share on other sites

Compiler hanging is not good and we will look into this but your code does not look correct either. Everything inside the asm{} block should be assembly language. Anything else including C statements like _tblptru = 0 will not work.




Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...