Insert Assembly Code into C++?

Hi, every one,
I am writing a segment of assembly code inserted into the C++ code. During the compiling using Solatis Sparc v8 C++ compiler, I felt a bit confused at the following error:
Linking
Undefined Symbol first referenced in file
lock ..../libatsup.so( this is my created lib)
My code looks like:
Error atomic_lock(volatile int *lock)
asm("retry:");
asm("ldstub [lock], %l0");
My question is how to declare the variable "lock" in the atomic_lock?
Any help will be appreciated.
-Yuzhong

Sorry for the confusion. I was assuming that your assembly routine is simple enough to be leaf routine. So, it need not have a save in the prologue. If you have a save, your input args. will be in %i0-%i6. Depending on the prototype of the atomic lock function you are writing, access the arguments in %i0 and so on. If you don't need new register window, (don't call other function and no stack space needed) the args. will be in %o0-%o6. The easiest way is to write a similar(skeleton) code and compile it into assembly and fill in atomic instructions.
You have to declare the function as
extern "C" {
void atomic_op(int *lock,......); // exact code depends on your design
in other files where you refer it.
-Ananth.

Similar Messages

  • Insert JAVA3D CODE into a HTML PAGE

    My java 3d code is working perfectly with javac and java command. I can see the result of my game in the appletviewer
    But when I want to insert the code into a html page,it dosen t work
    the java applet remain grey....
    Can someone tell me why and someone can tell me how to solve it
    Could you give me an example of HTML page using java 3D code with mulitple classes

    I don't know Java3D, but I know a little applets. :)
    Are you sure your browser understands the 3D API ?
    applets work with AWT and JDK1.1, (it's your browser than run your applet and not your jdk 1.3 or 1.4), so peraphs you should download a plug-in to run Java3D in your browser ?
    for example, if you want to use swing, you have to download a plug-in in your browser.
    and another problem is that different browsers work differently with a same applet : for example, IE 6.0 don't run than IE 4.0 or Netscape 3.0
    it's the internet's way of life... :)
    Good luck,
    David
    PS : sorry for my english, I'm from Paris ! :)

  • Outlook 2013 - Insert HTML code into email

    Hi there,
    A simple question, or so I thought. How can I insert HTML code into an Outlook email?
    Thanks
    Dave

    You can inject HTML code into the message body via the Insert as Text option;
    Insert-> (Attach) File-> select the created htm-file-> press the down arrow on the Insert button-> Insert as Text
    Cheers,
    Tony Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please contact
    [email protected]

  • Fluid grid for Wordpress: insert PHP code into DW or DW code into Wordpress?

    This may be a stupid question but it's a dilemma for me. Here's the problem. I want to create a mobile first, fluid grid Wordpress website in Dreamweaver CS6 based on an existing Wordpress theme. I can see two ways of doing that:
    1) Create a fluid grid layout in DW, then insert the Wordpress PHP code into the right places in DW
    Pro: the fluid grid layout is set up by DW and therefore can be easily edited with DW (I imagine)
    Con: It is beyond my coding skills to make a fully functional WP template
    2) Take an existing responsive Wordpress template with media queries and edit that in Dreamweaver
    Pro: I start with a fully functional WP template and only have to make changes (mostly in CSS) to customise it
    Con: When I start with an existing template (like Skeleton) I run into trouble using DW
    For example: I click a navigation button to get at the CSS but it's not clear to me from DW's interface in which media query I have to make changes. I did a tutorial on creating a fluid grid layout with DW so I can do that. But DW doesn't work the same way with an existing WP template like Skeleton. I searched the web but all I can find is help on creating a fluid layout with DW, not editing an existing one.
    By the way, I am experienced with HTML/CSS but not PHP and I have a local Wordpress server running on my Mac so I can work in Dreamweaver's Live View.
    The problem may be that I am only just starting with responsive web design and need some more experience with media queries, css rules and DW CS6. Could anyone comment on this problem or point me towards more information on the subject?
    TIA!

    You can certainly use DW to customize a 3rd party WP Theme.  However, you must be throughly familliar with how WordPress Themes work and have a good working knowledge of  HTML, CSS and PHP code.  Design View will not be much help to you. 
    WP Themes are a sum of their various parts:  header.php, footer,php, sidebar.php, page.php, index.php, archive.php, etc...  The web server parses code from the various parts and creates whole pages on the fly.  Once WP is deployed on your server, you cannot use DW to edit content.  You must use the WP Admin Panel (CMS) to manage content, Themes, plugins and backup data.
    For simple static sites, the FluidGrid Layout feature in DW is a nice starting point.  But these layouts have definite  limitations which, IMO would not be a good fit with WordPress.
    Nancy O.

  • Inserting QR Codes into InDesign document ??

    Anyone know about inserting QR codes (those bar codes that are all over magazines these days) into InDesign?
    Someone I know is going to get me a QR code for a magazine advertisement  I'm creating. What is the standard format for this image I should get  to place into InDesign?
    Also, can I scale the image in InDesign? Or will that mess up the functionality of the QR code?
    (I'm delivering the whole InDesign file as a PDF to the publication.)
    Thanks in advance for any info!

    The standard for QR codes comes from Denso Wave (Toyota), the creator of the QR standard.
    From the Denso standard on their site:
    The size of QR Code depends on a module size and a symbol version. The module refers to the black and white dots that make up the QR Code. The symbol version determines the data capacity.
    The area of a Version 1 QR Code is made up of 21 modules per side. Each higher version number is made up of 4 additional modules. The highest version number is Version 40.
    For example, a Version 2 QR Code would be composed of a 25 by 25 module matrix. If the module size is 0.5 mm (19.7 mils) square, the size of QR Code will be 12.5 mm (0.5") square. (QR Code requires a four module wide quiet zone around the symbol.)
    Other than that, your size should be tested after output with something other than the latest smartphone, because a greater portion of people are using older technology that cannot focus very close. I've found that a QR code of .875" x .875" to be ideal for a basic URL without URL shortening, using a chunk of plastic trash called a blackberry. If your URL is superlong, your results mar vary.
    The iPhone 4 however, can scan a QR code 1 molecule x 1 molecule wide, if your audience is demographically hip enough to own one, by all means go for that.
    /snarkyfanboicomplete
    p.s. there are plenty of sites that will export you a nice clean vector EPS, so requesting a tif and converting it to a bitmap, while super fun, can be avoided by eps goodness.

  • Inserting Script code into HTML - possibly using snippets?

    I am using Robohelp 7 and I need to insert some tracking script code into the HTML.
    The location needs to be right before the body close code.
    I have multiple pages and would love to use a snippet so that it would be easy to update as necessary.
    When I create the snippet code and drop it on the design page, it shows the code.
    I cannot get it to drop into the HTML.  Any suggestions?
    If it can't be done with snippets, is there a way to mass import code into the HTML of ALL pages?  I'm talking hundreds of pages.

    Hi there
    I doubt you will want to use snippets for this. Why? Well, if you use Snippets, you will need to edit all your pages so they include the snippet!
    So here's how I might approach it.
    Open the Project Set-up pod. Create a Topic Template. Inside the Template, add a Footer. Insert the script into the footer. Save the template and apply it to all your topics. You do this by selecting all topics in the Topic List pod, right-clicking them and choosing the Template. Whoosh! The template is associated and all topics now have a footer (with the script inside).
    Hopefully this helps... Rick
    Begin learning RoboHelp HTML 7 within the day - $24.95!
    Click here for Adobe Certified Captivate and RoboHelp HTML Training
    Click here for the SorcerStone Blog
    Click here for RoboHelp and Captivate eBooks

  • Simple question: inserting JSP code into HTML forms

    I have a form with which I am trying to insert a Java String into one of its text boxes. The problem is the string has serval words in it and when the form is viewed only the first word appears.
    The code is:
    String tEntity = request.getParameter("entity"); // the string is intended, and is serveral words
    <TD><INPUT TYPE="textarea" Name="entity" value=<%out.println(tEntity);%>></td>
    Form example the String may be "string of more than one words" but when the form is viewed only the first word "string" appears.
    Any feedback would be much appreciated!
    thanks
    Dan

    hai
    u need to use doubli codes like below
    <INPUT TYPE="textarea" Name="entity" value="<%out.println(tEntity);%>">or best u can give
    <textarea name="entry">
    <%out.println(tEntity);%>
    </textarea>archi

  • Inserting ABAP code into Query Designer

    I originally posted this thread in the Query Designer section.  It was suggested that I post this in the ABAP Development section instead.  Here's my issue:
    A customer has created a query and interface using transactions SQ01 and SQ02 that generates a report from tables EKKO - Purchase Document Header and EKPO - Purchase Document Item.
    Referencing the Net Order Amount (EKPO-NETWR) they wanted subtotals to appear by Purchasing Document Number. I was able to give them that by changing the Sort and Total check boxes in their original query. So now they currently have a report that lists the Purchase Order Document (EKPO-EBELN), each Item Number for the Purchase Order (EKPO-EBELP), the Net Order Value for each item (EKPO-NETWR), as well as query-generated subtotals for each Purchase Order and a grand total of all Purchase Orders.
    Now the customer would like to be able to select on the query-generated subtotals. For example, select all Purchase Order Documents whose query-generated subtotal is greater than $5,000, or select all Purcahse Order Documents whose query-generated subtotal is equal to $1,000.
    Before replying, it might be a good idea to check my original thread in the Query Designer section to see the replies I received there.  Query - Selection Option on Subtotal
    Any suggestions on how to accomplish that would be greatly appreciated. Thank you.

    You can add a new amount field for selection and filter the query results based on the new field.

  • Inserting externally purchased code into Muse.

    I purchased code that I would like to use in my site. How do I use it with Muse? I understand how to place HTML, but right now I have CSS and JQuery files. Is there any way to get it in there?

    It's hard to give a useful answer to that question. There's a wide variety of HTML widgets out there with lots of different requirements...
    Generally speaking, CSS files usually contain styling info, to control how some HTML elements look.
    JS files are scripts that usually attach behavior to certain HTML elements.
    Usually you'd also have some HTML to insert so the CSS has something to style and the JS has something to attach behavior to.
    Muse has a few features that may help you integrate this fabulous thing into your Muse layout.
    1) Insert HTML allows you to insert a bit of HTML which Muse will export along with the rest of your page.
    2) The page properties dialog metadata pane allows you to insert HTML code into the <head> of the exported HTML page.
    3) The 'Add files for upload' menu item allows you to tell Muse to upload additional files to your website. They'll be uploaded into a folder named 'assets'.
    Depending on what you have, you might be able to use some of these features to get your wonderous thing into Muse without editing any of Muse's output.
    If these features aren't sufficient for your use case, you may have to edit the exported HTML as suggested by iamDK. Note that if you do this, you'll have to re-edit the exported HTML every time you export/publish/ftp upload from Muse, as Muse does not preserve any edits made to the generated HTML.

  • Inserting code into pages?

    I have snippets of code, like for stat trackers and skype icons, and I can't figure out how to insert the code into pages without having to first export it into html, view source, import the source into NVU and then save it again. This is a big hassle to go through whenever I change the page, and I am wondering if there is a way to put the code directly into the pages document itself. Appreciate any answers.

    Copy and paste definitely does not work... Here is the code:
    <!-- Start of StatCounter Code -->
    <script type="text/javascript" language="javascript">
    var sc_project=1382179;
    var sc_invisible=0;
    var sc_partition=12;
    var sc_security="3cd1b24a";
    </script>
    <script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript> </noscript>
    <!-- End of StatCounter Code -->
    Is there any way to make this into an image without losing any of its properties (I have found ways to make this into an image, but it loses all the code behind it and becomes a "dumb" image).

  • How to insert abap code in LSMW generated program?

    hi,
    i m working on LSMW for loading data in SAP
    i would like to insert abap code into the generated program....
    it's because i have 1 BKPF segment (header data), 2 BSEG segments, but i cannot define rules by customizing for the second BSEG segment(LSMW doesn't permitt).
    i already tried to insert code directly into the program, but obviously it disapears at each time i generate the program.
    i saw that apparently a code insertion has already be made into this program and the subject of this insertion is to define rules for the second BSEG (exactly what i want to do....) and this modification doesn't disapear at new prog generation.....
    Any idea ?

    Hi
    Why dont you use the FORM provided by LSMW
    To use this please do the following
    1.Goto option <b>Maintain Field Mapping and Conversion Rules</b>
    2.Goto menu <b>EXTRAS->LAYOUT->Form Routines</b>
      Here you will now get many options like
       Global Data
       Begin of Transaction
    Begin of Processing
    Begin of Record
      like wise the End of these also.
    Please put a breakpoint and check where you want to insert your code.
    Note:
    This is only for the Conversion Program and does not affect the main program used to update the Standard Tables
    Hi , I was reading your earlier post .. It seems that you have worked on EMIGALL. Consider a similar situation, it is like writing the code in the events till CALL01...
    Thanks
    DOminic
    Message was edited by: Dominic  Pappaly

  • How to insert a code for a function module into a Customer Exit Variable?

    I have two Key Figures viz., Net Prchs Rtl, and Net Prchs Unt. Both these Key figures have This Week (TW) and Last Week (LW). There is a variable for This week but there is no variable defined for Last week.
    I need to get data in the column LW (Last Week) for both the key figures.
    In function module EXIT_SAPLRRS0_001 one of the functions I have is:
    Get the previous Fiscal Week
              CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
    I need to create a new variable to get values in the Last week column for different key figures and use function “'DATE_TO_PERIOD_CONVERT'” in that variable.
    Can anyone please explain me the steps as to how to use a function module in a variable so that when the variable is used in a key figure it shows the output.
    In other words what I want to know is after creating a Customer exit variable of type Characteristic value how do I refer the above mentioned function moduel and insert the code for the function module into the Customer exit variable that I created.
    Thank you.
    TR.

    Hi Wond,
    Thanks a lot for your reply. I understand what you mean but I have never done this before so can you please explain it in a detailed manner. I have the following code:
    Get the previous Fiscal Week
              CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
                EXPORTING
                  i_date         = ld_date
                  i_periv        = lc_periv
                IMPORTING
                  e_buper        = ln_poper
                  e_gjahr        = ln_bdatj
                EXCEPTIONS
                  input_false    = 1
                  t009_notfound  = 2
                  t009b_notfound = 3
                  OTHERS         = 4.
              IF sy-subrc <> 0.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ELSE.
                lc_poper = ln_poper.
                CONCATENATE ln_bdatj lc_poper+1(2) INTO wa_e_t_range-low.
                wa_e_t_range-sign = 'I'.
                wa_e_t_range-opt = 'EQ'.
                APPEND wa_e_t_range TO e_t_range.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
    I believe I should now use the above code in my customer exit variable. If that's right can you please explain me the steps as to how should I do this so that the variable gets populated.
    Thank you.
    Regards,
    TR.

  • Inserting code into head of document

    Hi all,
    It seems that devforums.macromedia.com no longer exists or at
    least I can't connect to it. I have built some easy commands that
    insert code blocks before and made them into extensions but this
    time I am going to need to write code into the head of the document
    much like doing the "jumpMenu" would. I cannot find the command
    that will do this and I have even tried to pick apart the
    javascript and find where it does this for the actual "jumpMenu" to
    see how it is done but cant.
    Can anyone point me to a good resource or tell me the
    functions that can do this? Thanks in advance.
    Buddy

    Hi,
    sorry to bother you guys after such a long time but i've been looking for the right way to do this for a long time! I'm developing an extension that writes a css style to the head of users page. How exactly would I do this (I write the style into a variable first right?!) and than where goes my variable in your example code? and why does that code have to be placed into the applyCommand() function?
    Thanks a lot, appreciate the help!
    Peet

  • How to insert landing site and impression code into swf files

    Hi guys!
    i got problems.
    Actually, i dont have  knowleage about tracking and clicks.
    I want to find out how to use it and use it in swf files.
    i want to insert landing site and impression code into swf files but i dont know how to do it.
    i want insert two link below into swf files.
    Impression:
         http://impgb.tradedoubler.com/imp?type(inv)g(xxxxxxx)a(xxxxxxx)
    Click:
         http://clk.tradedoubler.com/click?p=xxxxxx&a=xxxxxxx&g=xxxxxxx
    Can you show me how to do that?
    Thanks for your helps.

    You would need to creat a invisible button or movieclip on a new layer on top and have it fire a external javasctipt function you create in the HTML header that will then call those URLs .

  • Inserting task script or code into layered tiffs

    Hello to anyone that can help.
    You may or my not be able to help me with this one and ill understand if you dont want to invest any time, however perhaps you can point me in the right direction as it may be out of your domain.
    I work at NewsLtd in Sydney Australia and we use an automated enhancement software programme called Intellitune X by Agfa.
    Images are checked one by one before being approved and sent on to their destination on a server. Often we have to layer etch files and to do this we divert the tiff image from Intellitune to Photoshop. The etch is done and saved back to intellitune as a layered tiff (intellitune does not support Psd's). The file will not save back to intellitune if the "save transparency" box is ticked, so we have to find the file on the server and open and re-save with the  "save transparency" option. Is there any way to insert a code or script into all layered tiffs saved out of Photshop to activate the "save transparency" option as soon as the image  is saved on the server?
    Thanks
    Irvine.

    Yo are asking the impossible more or less. Files themselves should by no means contain executable code and even if they do, they would eitehr trigger your virus scanners and drive your system admin crazy or cause a million otehr issues when used in otehr apps. At best they are ignored. It would possibly be doable by writing a VBScript that keeps an eye on your folders (I think only BB scripts have that kind of low-level file access at all; JavaScript's security model would prevent such functionality in that kind of script), but scripts are modal and block the entire program. Also, the script basically needs to run in an infinite loop (if that's even possible). So even if it could be done, it needs to be done from an exclusively reserved machine that does nothing else nad it needs to be perfectly synced with teh file server to look for file modified timestamps and specific file types.
    Mylenium

Maybe you are looking for