about summary refs log tree commit diff stats
path: root/examples/plugin_new_macro.py
Commit message (Expand)AuthorAgeFilesLines
* linting: pylint: Remove most `disabled=protected-access`nfnty2017-01-301-2/+2
* Python 3 division: Import `division` from `__future__`nfnty2017-01-211-1/+1
* linting: Python 2 compat: Import from `__future__`nfnty2017-01-171-0/+2
* linting: pylint and flake8nfnty2017-01-171-6/+8
* Add two blank lines where is expectedstepshal2016-06-161-0/+2
* examples/plugin_new_macro.py: fix spaceshut2016-06-021-3/+3
* Should I dual ranger/cleric or wait for the THAC0 bonus? v1.7.0hut2015-04-141-1/+1
* moved "doc/examples" to "examples" for more visibilityhut2015-04-131-0/+19
* move examples to doc/exampleshut2013-03-091-19/+0
* Added version info to exampleshut2013-03-011-0/+2
* removed options.py, improved plugins. *UPDATE YOUR COMMANDS.PY*hut2012-12-041-0/+17
<vc@akkartik.com> 2019-08-26 11:55:26 -0700 committer Kartik Agaram <vc@akkartik.com> 2019-08-26 11:59:21 -0700 5592 - switch register names to lowercase' href='/akkartik/mu/commit/063error.subx?h=hlt&id=333525360b22f3d3ea31db46a4d2f1b4edbfebdb'>33352536 ^
0eb0f696 ^


33352536 ^
a9d473e2 ^
0eb0f696 ^

33352536 ^
0eb0f696 ^


33352536 ^
0eb0f696 ^


33352536 ^
0eb0f696 ^


cf02c20b ^
7a583220 ^
33352536 ^

0eb0f696 ^
7cb326df ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50







                                                                                                                                                 
                                                                                           
                

                                                                                                                                                                       


                            
                                                                                                                                                                      


                         
                                                                                                                                                                  

                     

                                                                                                                                                                      


                         
                                                                                                                                                                  
                      

                          
                                                                                                                                                                      


                         
                                                                                                                                                                  


                    
                                                                                                                                                                     


                                      
                
                

                                                                                                                                                                       
             

                            
# Print an error message and exit.

== code
#   instruction                     effective address                                                   register    displacement    immediate
# . 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

# write(out, "Error: "+msg+"\n") then stop(ed, 1)
error:  # ed: (addr exit-descriptor), out: fd or (addr stream byte), msg: (addr array byte)
    # . prologue
    55/push-ebp
    89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
    # write(out, "Error: ")
    # . . push args
    68/push  "Error: "/imm32
    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           0xc/disp8       .                 # push *(ebp+12)
    # . . call
    e8/call  write/disp32
    # . . discard args
    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
    # write(out, msg)
    # . . push args
    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           0x10/disp8      .                 # push *(ebp+16)
    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           0xc/disp8       .                 # push *(ebp+12)
    # . . call
    e8/call  write/disp32
    # . . discard args
    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
    # write(out, "\n")
    # . . push args
    68/push  Newline/imm32
    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           0xc/disp8       .                 # push *(ebp+12)
    # . . call
    e8/call  write/disp32
    # . . discard args
    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
    # stop(ed, 1)
    # . . push args
    68/push  1/imm32
    ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           8/disp8         .                 # push *(ebp+8)
    # . . call
    e8/call  stop/disp32
    # should never get past this point
$error:dead-end:
    # . epilogue
    89/copy                         3/mod/direct    4/rm32/esp    .           .             .           5/r32/ebp   .               .                 # copy ebp to esp
    5d/pop-to-ebp
    c3/return

# . . vim:nowrap:textwidth=0