about summary refs log tree commit diff stats
path: root/examples/ex2.subx
blob: 8df4c62c217f6a55b7d4e3851cb23fc115b5be4b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Add 1 and 1, and return the result in the exit code.
#
# To run:
#   $ ./subx translate init.linux examples/ex2.subx -o examples/ex2
#   $ ./subx run examples/ex2
# Expected result:
#   $ echo $?
#   2

== code

Entry:
# ebx = 1
bb/copy-to-ebx  1/imm32
# increment ebx
43/increment-ebx
# exit(ebx)
e8/call  syscall_exit/disp32

# . . vim:nowrap:textwidth=0
iteral.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 */
[colors]
	background = "#4c4635"
	foreground = "#ccbc8e"

[global]
    ### Display ###

    monitor = 0
    follow = mouse

    geometry = "540x5-10+32"
    indicate_hidden = yes
    shrink = yes
    transparency = 0
    notification_height = 0
    separator_height = 3
    padding = 12
    horizontal_padding = 12
    frame_width = 3

    frame_color = "#8e991e"
    separator_color = auto
    sort = yes
    idle_threshold = 120

    ### Text ###
    font = Cozette Medium 8
    line_height = 0

    markup = full

    # The format of the message.  Possible variables are:
    #   %a  appname
    #   %s  summary
    #   %b  body
    #   %i  iconname (including its path)
    #   %I  iconname (without its path)
    #   %p  progress value if set ([  0%] to [100%]) or nothing
    #   %n  progress value if set without any extra characters
    #   %%  Literal %
    # Markup is allowed
    format = "<b>%s </b>\n%b"
    alignment = left
    show_age_threshold = 60
    word_wrap = yes
    ellipsize = middle
    ignore_newline = no
    stack_duplicates = true
    hide_duplicate_count = false
    show_indicators = yes

    ### Icons ###
    icon_position = off

    ### History ###
    sticky_history = yes
    history_length = 20

    ### Misc/Advanced ###
    dmenu = /usr/local/bin/dmenu -p dunst:
    browser = /usr/local/bin/firefox -new-tab
    always_run_script = true
    title = Dunst
    class = Dunst
    startup_notification = false
    force_xinerama = false

[experimental]
    per_monitor_dpi = false

[shortcuts]
    close = ctrl+space
    close_all = ctrl+shift+space
    context = ctrl+shift+period

[urgency_low]
    background = colors.background
    foreground = colors.foreground
    timeout = 10

[urgency_normal]
    background = colors.background
    foreground = colors.foreground
    timeout = 10

[urgency_critical]
    background = colors.background
    foreground = colors.foreground
    frame_color = "#cc3214"
    timeout = 0
# vim: ft=cfg