about summary refs log blame commit diff stats
path: root/.emacs.d/lisp/init-ui.el
blob: c92e3cb2439e0a5f465ea28e03db7df9ad31cae3 (plain) (tree)
4b475ca pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.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 */
// "a type" "needed idl_includes"
span class='oid'>f84fa09 ^
fc3ad64 ^


















































f84fa09 ^






fc3ad64 ^
f84fa09 ^

d0db566 ^
b6b75e7 ^
b6b75e7 ^






fc3ad64 ^


b6b75e7 ^
d0db566 ^
d0db566 ^











d0db566 ^
d32b136 ^
d0db566 ^

d32b136 ^


d0db566 ^









ee30096 ^
d0db566 ^


d0db566 ^
42bfea4 ^


d0db566 ^



65ad19d ^
d32b136 ^
65ad19d ^
674f848 ^

65ad19d ^






d0db566 ^
6f3370e ^
d32b136 ^
6f3370e ^
6f3370e ^
0cea2e2 ^
732d65b ^
0cea2e2 ^


732d65b ^





732d65b ^
bbcb583 ^
732d65b ^


6f3370e ^
d7af36c ^








4274f81 ^








d0db566 ^

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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224


                                                                   
                                                                                                            


                  










                                                                                     
 
         






                                                                   
                                 

                                   

                                       







                                                 

                               










                                                                        
         


















































                                                                                






                                                                                  
                              

                                                         
 
                    






                                        


                                                                                            
 
                       











                                                           
                                
           

           


                                                                   









                                          
          


                              
                               


                                                         



                         
                   
          
         

                            






                                                       
 
                   
          
         
                  
                        
                              


                                                





                                        
                        
                      


                                 
 








                                         








                                                                 

                        
;;; init-ui.el --- UI Configuration File -*- lexical-binding: t -*-
;;; Commentary:
;; Some parts copied from prelude-ui.el and prelude-editor.el
;; Frame customisations, and disabling of {menu,tool,scoll}-bar-mode done in early-init.el, rather than here
;;; Code:

(use-package emacs
  :hook (emacs-startup . (lambda ()
                           (cond
                            ((find-font (font-spec :name "iosevka comfy"))
                             (set-face-attribute 'default nil :font "iosevka comfy"))
                            ((find-font (font-spec :name "iosevka"))
                             (set-face-attribute 'default nil :font "iosevka")))

                           (global-display-line-numbers-mode)
                           (global-hl-line-mode +1)

                           (global-set-key (kbd "C-x C-S-k") 'kill-this-buffer)))

  :config
  ;; https://github.com/rougier/elegant-emacs/blob/master/sanity.el
  (setq inhibit-startup-screen t
        inhibit-startup-echo-area-message t
        inhibit-startup-message t
        initial-scratch-message nil)

  (blink-cursor-mode -1)
  (setq-default cursor-type 'bar)

  (setq whitespace-line-column 120)
  (setq show-trailing-whitespace t)
  (setq-default indicate-empty-lines t)
  (setq ring-bell-function 'ignore
        visible-bell t)

  ;; TODO do we want these? (copied from prelude)
  (setq scroll-margin 0
        scroll-conservatively 100000
        scroll-preserve-screen-position 1)

  (fset 'yes-or-no-p 'y-or-n-p)

  (setq frame-title-format
        '("Emacs: " (:eval (if (buffer-file-name)
                               (abbreviate-file-name (buffer-file-name))
                             "%b"))))

  (when (eq system-type 'darwin)
    (setq mac-option-modifier 'meta)
    (setq mac-right-option-modifier 'none)
    (setq mac-command-modifier 'super)))

(use-package modus-themes
  :config
  (defun my/load-theme ()
    "Load modus vivendi theme, with my customisations."
    (setq modus-themes-syntax '(green-strings yellow-comments)
          modus-themes-paren-match '(bold intense underline)
          modus-themes-bold-constructs t
          modus-themes-italic-constructs t
          modus-themes-lang-checkers '(text-also))
    (load-theme 'modus-vivendi t)

    (custom-set-faces
     `(font-lock-builtin-face ((t (:foreground "LawnGreen"))))
     `(font-lock-keyword-face ((t (:foreground "gold"))))
     `(font-lock-function-name-face ((t (:foreground "cyan"))))
     `(font-lock-variable-name-face ((t (:foreground "gold3"))))
     `(font-lock-constant-face ((t (:foreground "DeepSkyBlue2"))))
     `(font-lock-type-face ((t (:foreground "PaleGreen2"))))
     `(font-lock-string-face ((t (:foreground "SpringGreen3"))))
     `(font-lock-comment-face ((t (:foreground "burlywood"))))
     `(font-lock-doc-face ((t :foreground "LightCyan3")))
     `(region ((t (:background "firebrick"))))
     `(secondary-selection ((t (:background "firebrick4"))))
     `(idle-highlight ((t (:background "grey50" :foreground "white"))))
     `(isearch ((t (:background "coral2"))))
     `(lazy-highlight ((t (:background "LightSteelBlue2" :foreground "black"))))
     `(match ((t (:background "gray35" :foreground "grey85"))))
     `(lsp-face-highlight-textual ((t (:background "DimGrey"))))
     `(whitespace-empty ((t (:background "gray10"))))
     `(hl-line ((t :background "gray15" :underline "gray35" :inherit nil)))
     `(simple-modeline-status-modified ((t :foreground "DeepSkyBlue")))
     `(consult-async-split ((t :foreground "LightCoral")))
     `(orderless-match-face-0 ((t :foreground "tomato")))
     `(orderless-match-face-1 ((t :foreground "SpringGreen2")))
     `(orderless-match-face-2 ((t :foreground "gold")))
     `(orderless-match-face-3 ((t :foreground "cyan")))
     `(flycheck-fringe-warning ((t :foreground "white" :background "gold3")))
     `(flycheck-fringe-error ((t :foreground "white" :background "red2")))
     `(flycheck-fringe-info ((t :foreground "white" :background "RoyalBlue3")))
     `(alt-font-lock-keyword-face ((t :foreground "LightSkyBlue" :weight bold)))
     `(alt-hl-line-face ((t :underline "gray50" :weight bold))))

    (setq hl-todo-keyword-faces
          '(("TODO"   . "red3")
            ("FIXME"  . "red3")
            ("DEBUG"  . "#A020F0")
            ("GOTCHA" . "#FF4500")
            ("HACK" . "#FF4500")
            ("STUB"   . "#1E90FF")
            ("FAIL"   . "red3")
            ("NOTE"   . "DarkOrange2")
            ("DEPRECATED" . "yellow"))))

  (defun use-alt-font-lock-keyword-face ()
    "Remap font-lock-keyword-face to the alternate one, in the current buffer"
    (face-remap-add-relative 'font-lock-keyword-face 'alt-font-lock-keyword-face))
  (defun use-alt-hl-line-face ()
    "Remap hl-line face to the alternate one, in the current buffer"
    (face-remap-add-relative 'hl-line 'alt-hl-line-face))
  :hook
  (after-init . my/load-theme)
  (cider-inspector-mode . use-alt-font-lock-keyword-face)
  (magit-mode . use-alt-hl-line-face))

(use-package hl-todo
  :bind
  (:map hl-todo-mode-map
        ("C-c c t p" . hl-todo-previous)
        ("C-c c t n" . hl-todo-next)
        ("C-c c t o" . hl-todo-occur)
        ("C-c c t r" . hl-todo-rgrep)
        ("C-c c t i" . hl-todo-insert))
  ;; Use emacs-startup-hook so that it runs after my/load-theme is called in after-init-hook
  ;; hl-todo-keyword-faces is customised in my/load-theme
  :hook (emacs-startup . global-hl-todo-mode))

(use-package whitespace
  :diminish
  :custom
  (whitespace-line-column 120)
  (whitespace-style '(face tabs empty trailing lines-tail))
  :hook
  (text-mode . (lambda () (whitespace-mode +1)))
  (prog-mode . (lambda () (whitespace-mode +1)))
  (cider-repl-mode . (lambda () (whitespace-mode -1)))
  (ielm-mode . (lambda () (whitespace-mode -1)))
  (vterm-mode . (lambda () (whitespace-mode -1)))
  (eshell-mode . (lambda () (whitespace-mode -1))))

(use-package volatile-highlights
  :defer 10
  :diminish
  :config
  (vhl/define-extension 'undo-tree 'undo-tree-yank 'undo-tree-move)
  (vhl/install-extension 'undo-tree)
  :init
  (volatile-highlights-mode t))

(use-package idle-highlight-mode
  :hook (prog-mode . idle-highlight-mode))

(use-package paren
  :config
  (show-paren-mode +1))

(use-package which-key
  :defer 5
  :diminish
  :config (which-key-mode +1))

(use-package rainbow-delimiters
  :hook
  (text-mode . (lambda () (rainbow-delimiters-mode +1)))
  (prog-mode . (lambda () (rainbow-delimiters-mode +1))))

(use-package rainbow-mode
  :diminish)

(use-package repeat
  :defer 5
  :config
  (let ((inhibit-message t))
    (repeat-mode +1))
  (defvar buffer-repeat-map
    (let ((map (make-sparse-keymap)))
      (define-key map (kbd "<left>") #'previous-buffer)
      (define-key map (kbd "<right>") #'next-buffer)
      map))
  (dolist (cmd '(previous-buffer next-buffer))
    (put cmd 'repeat-map 'buffer-repeat-map)))

(use-package pulsar
  :defer 5
  :custom
  (pulsar-pulse t)
  (pulsar-iterations 80)
  (pulsar-face 'pulsar-yellow)
  :hook
  (isearch-update-post-hook . pulsar-pulse-line)
  (consult-after-jump-hook . pulsar-pulse-line)
  :bind ("C-c c p" . pulsar-pulse-line))

(use-package beacon
 :defer 5
 :diminish
 :custom
 (beacon-color "yellow")
 (beacon-push-mark 20)
 :bind ("C-c c b" . beacon-blink)
 :config
 (beacon-mode 1))

(use-package helpful
  :bind (("C-h f" . helpful-callable)
         ("C-h F" . helpful-function)
         ("C-h C-f" . helpful-command)
         ("C-h v" . helpful-variable)
         ("C-h k" . helpful-key)
         ("C-h o" . helpful-symbol)
         ("C-h C-." . helpful-at-point)))

;; From https://github.com/jwiegley/dot-emacs/blob/master/init.el
(use-package eval-expr
  :bind ("M-:" . eval-expr)
  :config
  (defun eval-expr-minibuffer-setup ()
    (local-set-key (kbd "<tab>") #'lisp-complete-symbol)
    (set-syntax-table emacs-lisp-mode-syntax-table)
    (paredit-mode)))

(provide 'init-ui)
;;; init-ui.el ends here
ubxComment"># copy *(ebp+12) to eax</span> <span id="L26" class="LineNr"> 26 </span> 89/copy 1/mod/*+disp8 4/rm32/sib 7/base/edi 1/index/ecx <span class="Normal"> . </span> 0/r32/eax 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy eax to *(edi+ecx+12)</span> <span id="L27" class="LineNr"> 27 </span> <span class="subxComment"># out-&gt;write += 4</span> <span id="L28" class="LineNr"> 28 </span> 81 0/subop/add 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to *edi</span> <span id="L29" class="LineNr"> 29 </span><span class="Constant">$write-int:end</span>: <span id="L30" class="LineNr"> 30 </span> <span class="subxS1Comment"># . restore registers</span> <span id="L31" class="LineNr"> 31 </span> 5f/pop-to-edi <span id="L32" class="LineNr"> 32 </span> 59/pop-to-ecx <span id="L33" class="LineNr"> 33 </span> 58/pop-to-eax <span id="L34" class="LineNr"> 34 </span> <span class="subxS1Comment"># . epilogue</span> <span id="L35" class="LineNr"> 35 </span> 89/copy 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 5/r32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ebp to esp</span> <span id="L36" class="LineNr"> 36 </span> 5d/pop-to-ebp <span id="L37" class="LineNr"> 37 </span> c3/return <span id="L38" class="LineNr"> 38 </span> <span id="L39" class="LineNr"> 39 </span><span class="Constant">$write-int:abort</span>: <span id="L40" class="LineNr"> 40 </span> <span class="subxS1Comment"># . _write(2/stderr, error)</span> <span id="L41" class="LineNr"> 41 </span> <span class="subxS2Comment"># . . push args</span> <span id="L42" class="LineNr"> 42 </span> 68/push <span class="Constant">&quot;write-int: out of space\n&quot;</span>/imm32 <span id="L43" class="LineNr"> 43 </span> 68/push 2/imm32/stderr <span id="L44" class="LineNr"> 44 </span> <span class="subxS2Comment"># . . call</span> <span id="L45" class="LineNr"> 45 </span> e8/call <a href='101_write.subx.html#L12'>_write</a>/disp32 <span id="L46" class="LineNr"> 46 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L47" class="LineNr"> 47 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span> <span id="L48" class="LineNr"> 48 </span> <span class="subxS1Comment"># . syscall(exit, 1)</span> <span id="L49" class="LineNr"> 49 </span> bb/copy-to-ebx 1/imm32 <span id="L50" class="LineNr"> 50 </span> e8/call <a href='000init.subx.html#L18'>syscall_exit</a>/disp32 <span id="L51" class="LineNr"> 51 </span> <span class="subxComment"># never gets here</span> <span id="L52" class="LineNr"> 52 </span> <span id="L53" class="LineNr"> 53 </span><span class="subxTest">test-write-int-single</span>: <span id="L54" class="LineNr"> 54 </span> <span class="subxH1Comment"># - check that write-int writes to first int of 'stream'</span> <span id="L55" class="LineNr"> 55 </span> <span class="subxComment"># setup</span> <span id="L56" class="LineNr"> 56 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span> <span id="L57" class="LineNr"> 57 </span> <span class="subxS2Comment"># . . push args</span> <span id="L58" class="LineNr"> 58 </span> 68/push <a href='108write.subx.html#L151'>_test-stream</a>/imm32 <span id="L59" class="LineNr"> 59 </span> <span class="subxS2Comment"># . . call</span> <span id="L60" class="LineNr"> 60 </span> e8/call <a href='106stream.subx.html#L17'>clear-stream</a>/disp32 <span id="L61" class="LineNr"> 61 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L62" class="LineNr"> 62 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to esp</span> <span id="L63" class="LineNr"> 63 </span> <span class="subxComment"># write-int(_test-stream, &quot;abcd&quot;)</span> <span id="L64" class="LineNr"> 64 </span> <span class="subxS2Comment"># . . push args</span> <span id="L65" class="LineNr"> 65 </span> 68/push 0x64636261/imm32 <span id="L66" class="LineNr"> 66 </span> 68/push <a href='108write.subx.html#L151'>_test-stream</a>/imm32 <span id="L67" class="LineNr"> 67 </span> <span class="subxS2Comment"># . . call</span> <span id="L68" class="LineNr"> 68 </span> e8/call <a href='202write-int.subx.html#L8'>write-int</a>/disp32 <span id="L69" class="LineNr"> 69 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L70" class="LineNr"> 70 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span> <span id="L71" class="LineNr"> 71 </span> <span class="subxComment"># check-stream-equal(_test-stream, &quot;abcd&quot;, msg)</span> <span id="L72" class="LineNr"> 72 </span> <span class="subxS2Comment"># . . push args</span> <span id="L73" class="LineNr"> 73 </span> 68/push <span class="Constant">&quot;F - test-write-int-single&quot;</span>/imm32 <span id="L74" class="LineNr"> 74 </span> 68/push <span class="Constant">&quot;abcd&quot;</span>/imm32 <span id="L75" class="LineNr"> 75 </span> 68/push <a href='108write.subx.html#L151'>_test-stream</a>/imm32 <span id="L76" class="LineNr"> 76 </span> <span class="subxS2Comment"># . . call</span> <span id="L77" class="LineNr"> 77 </span> e8/call <a href='109stream-equal.subx.html#L194'>check-stream-equal</a>/disp32 <span id="L78" class="LineNr"> 78 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L79" class="LineNr"> 79 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/imm32 <span class="subxComment"># add to esp</span> <span id="L80" class="LineNr"> 80 </span> <span class="subxS1Comment"># . end</span> <span id="L81" class="LineNr"> 81 </span> c3/return <span id="L82" class="LineNr"> 82 </span> <span id="L83" class="LineNr"> 83 </span><span class="subxTest">test-write-byte-buffered-multiple</span>: <span id="L84" class="LineNr"> 84 </span> <span class="subxH1Comment"># - check that write-int correctly appends multiple writes</span> <span id="L85" class="LineNr"> 85 </span> <span class="subxComment"># setup</span> <span id="L86" class="LineNr"> 86 </span> <span class="subxS1Comment"># . clear-stream(_test-stream)</span> <span id="L87" class="LineNr"> 87 </span> <span class="subxS2Comment"># . . push args</span> <span id="L88" class="LineNr"> 88 </span> 68/push <a href='108write.subx.html#L151'>_test-stream</a>/imm32 <span id="L89" class="LineNr"> 89 </span> <span class="subxS2Comment"># . . call</span> <span id="L90" class="LineNr"> 90 </span> e8/call <a href='106stream.subx.html#L17'>clear-stream</a>/disp32 <span id="L91" class="LineNr"> 91 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L92" class="LineNr"> 92 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to esp</span> <span id="L93" class="LineNr"> 93 </span> <span class="subxComment"># write-int(_test-stream, &quot;abcd&quot;)</span> <span id="L94" class="LineNr"> 94 </span> <span class="subxS2Comment"># . . push args</span> <span id="L95" class="LineNr"> 95 </span> 68/push 0x64636261/imm32 <span id="L96" class="LineNr"> 96 </span> 68/push <a href='108write.subx.html#L151'>_test-stream</a>/imm32 <span id="L97" class="LineNr"> 97 </span> <span class="subxS2Comment"># . . call</span> <span id="L98" class="LineNr"> 98 </span> e8/call <a href='202write-int.subx.html#L8'>write-int</a>/disp32 <span id="L99" class="LineNr"> 99 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L100" class="LineNr">100 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span> <span id="L101" class="LineNr">101 </span> <span class="subxComment"># write-int(_test-stream, &quot;efgh&quot;)</span> <span id="L102" class="LineNr">102 </span> <span class="subxS2Comment"># . . push args</span> <span id="L103" class="LineNr">103 </span> 68/push 0x68676665/imm32 <span id="L104" class="LineNr">104 </span> 68/push <a href='108write.subx.html#L151'>_test-stream</a>/imm32 <span id="L105" class="LineNr">105 </span> <span class="subxS2Comment"># . . call</span> <span id="L106" class="LineNr">106 </span> e8/call <a href='202write-int.subx.html#L8'>write-int</a>/disp32 <span id="L107" class="LineNr">107 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L108" class="LineNr">108 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span> <span id="L109" class="LineNr">109 </span> <span class="subxComment"># check-stream-equal(_test-stream, &quot;abcdefgh&quot;, msg)</span> <span id="L110" class="LineNr">110 </span> <span class="subxS2Comment"># . . push args</span> <span id="L111" class="LineNr">111 </span> 68/push <span class="Constant">&quot;F - test-write-byte-buffered-multiple&quot;</span>/imm32 <span id="L112" class="LineNr">112 </span> 68/push <span class="Constant">&quot;abcdefgh&quot;</span>/imm32 <span id="L113" class="LineNr">113 </span> 68/push <a href='108write.subx.html#L151'>_test-stream</a>/imm32 <span id="L114" class="LineNr">114 </span> <span class="subxS2Comment"># . . call</span> <span id="L115" class="LineNr">115 </span> e8/call <a href='109stream-equal.subx.html#L194'>check-stream-equal</a>/disp32 <span id="L116" class="LineNr">116 </span> <span class="subxS2Comment"># . . discard args</span> <span id="L117" class="LineNr">117 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/imm32 <span class="subxComment"># add to esp</span> <span id="L118" class="LineNr">118 </span> <span class="subxS1Comment"># . end</span> <span id="L119" class="LineNr">119 </span> c3/return <span id="L120" class="LineNr">120 </span> <span id="L121" class="LineNr">121 </span><span class="subxS2Comment"># . . vim&#0058;nowrap:textwidth=0</span> </pre> </body> </html> <!-- vim: set foldmethod=manual : -->