summary refs log tree commit diff stats
path: root/setup.py
Commit message (Expand)AuthorAgeFilesLines
* replaced tabs with 4 spaces in all python fileshut2013-02-101-23/+23
* added scripts directory. rifle is now installed to /usr/bin/hut2012-08-041-1/+1
* setup.py: s/defaults/config/hut2012-08-021-3/+3
* setup.py: added entry for rifle.confhut2012-03-191-1/+2
* shorten all copyright messages for better readabilityhut2012-03-141-13/+1
* moved scripts/ranger to ranger/data/rangerhut2011-10-111-1/+1
* Updated copyright headershut2011-10-101-1/+1
* added defaults/rc.conf in setup.pyhut2011-09-301-1/+1
* Fixed setup.py (by removing ranger/help entry)hut2011-09-291-2/+1
* a little restructurationhut2010-10-021-2/+2
* Makefile, setup.py: Fixed `make doc`hut2010-09-111-23/+24
* added setup.py drafthut2010-06-181-0/+42
*/ .highlight .ow { color: #008800 } /* 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 */
# Print out a (global variable) string to stdout.
#
# To run:
#   $ ./bootstrap translate init.linux apps/ex6.subx -o apps/ex6
#   $ ./bootstrap run apps/ex6
#   Hello, world!

== code

# . op          subop               mod             rm32          base        index         scale       r32
# . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes

Entry:
    # write(stdout, X, Size)
    # . fd = 1 (stdout)
    bb/copy-to-ebx  1/imm32
    # . initialize X (location to write result to)
    b9/copy-to-ecx  X/imm32
    # . initialize Size
    8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           2/r32/edx   Size/disp32     .                 # copy *Size to edx
    # . syscall
    e8/call  syscall_write/disp32

    # exit(ebx)
    e8/call  syscall_exit/disp32

== data

Size:  # size of string
    0x0e/imm32  # 14
X:  # string to print
    48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21 0a       00
#   H  e  l  l  o  ,  ␣  w  o  r  l  d  !  newline  null

# . . vim:nowrap:textwidth=0