Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6192305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:55:16+00:00 2026-05-24T02:55:16+00:00

I have simple ocaml file test.ml 1 + 2;; I compiled it. can i

  • 0

I have simple ocaml file test.ml

1 + 2;;

I compiled it. can i see assembly output of this code? Maybe ocaml packet has any tools for this?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:55:16+00:00Added an answer on May 24, 2026 at 2:55 am

    Yes you can: see below. Everything that remains from your code is movl $7, %eax (7 is OCaml’s representation for 3, which is the result of 1+2).

    $ cat > t.ml
    1 + 2 ;;
    $ ocamlopt -S t.ml
    $ cat t.s 
        .data
        .globl  _camlT__data_begin
    _camlT__data_begin:
        .text
        .globl  _camlT__code_begin
    _camlT__code_begin:
        nop
        .data
        .long   0
        .globl  _camlT
    _camlT:
        .text
        .align  4
        .globl  _camlT__entry
    _camlT__entry:
        subl    $12, %esp
    L100:
        movl    $7, %eax
        movl    $1, %eax
        addl    $12, %esp
        ret
        .data
        .text
        nop
        .globl  _camlT__code_end
    _camlT__code_end:
        .data
        .globl  _camlT__data_end
    _camlT__data_end:
        .long   0
        .globl  _camlT__frametable
    _camlT__frametable:
        .long   0
        .section __IMPORT,__pointers,non_lazy_symbol_pointers
        .section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have simple code: <?php error_reporting(E_ALL); ini_set('display_errors', true); ini_set('html_errors', false); $test = array(); $test
i have simple side menu with this html code : <div id=menu> <div> Menu
I have simple front controller plugin which contains this code: http://pastebin.com/m155c59b0 When session expire
I have simple WebView code like this: WebView wv = (WebView) findViewById(R.id.webview1); wv.loadUrl(http://en.wikipedia.org/wiki/Book); But
I have simple code that uses AudioUnit to render sine wave to the output.
I have simple SSIS package which reads data from flat file and insert into
I have simple HTML code with some JavaScript. It looks like: <html> <head> <script
I have simple SSIS package where I import data from flat file into SQL
I have simple CI (CodeIgniter) code. what I want to do is: when I
I have simple aspx page that has a form and a input field in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.