about summary refs log tree commit diff stats
path: root/html/041jump_target.cc.html
Commit message (Expand)AuthorAgeFilesLines
* 3355Kartik K. Agaram2016-09-151-2/+2
* 2996Kartik K. Agaram2016-05-211-4/+4
* 2812Kartik K. Agaram2016-03-271-16/+25
* 2745Kartik K. Agaram2016-03-091-1/+1
* 2744Kartik K. Agaram2016-03-091-3/+3
* 2743Kartik K. Agaram2016-03-091-51/+65
* 2706 - update htmlKartik K. Agaram2016-02-251-3/+3
* 2611Kartik K. Agaram2015-11-291-1/+1
* 2447Kartik K. Agaram2015-11-151-1/+1
* 2423 - describe shape-shifting in html docsKartik K. Agaram2015-11-101-24/+24
* 2175Kartik K. Agaram2015-09-061-0/+196
8800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# Just a test stub for mu-init.subx
#
# Try it out like this:
#   $ ./translate_subx init.linux [0-9]*.subx mu-init.subx mu-init-test.subx
#   $ ./a.elf  # should run all tests

main:  # args: (addr array (addr array byte)) -> result/ebx: int
    # . prologue
    55/push-ebp
    89/<- %ebp 4/r32/esp
    # . save registers
    50/push-eax
    56/push-esi
    # esi = args
    8b/-> *(ebp+8) 6/r32/esi
    {
      # if (argc <= 1) break
      81 7/subop/compare *esi 4/imm32
      7e/jump-if-<= break/disp8
      # if (argv[1] != "test") break
      (string-equal? *(esi+8) "test")  # => eax
      3d/compare-eax-and 0/imm32
      74/jump-if-= break/disp8
      #
      (run-tests)
      # return *Num-test-failures
      8b/-> *Num-test-failures 3/r32/ebx
      eb/jump $main:end/disp8
    }
$main:end:
    # . restore registers
    5e/pop-to-esi
    58/pop-to-eax
    # . epilogue
    89/<- %esp 5/r32/ebp
    5d/pop-to-ebp
    c3/return