-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVERIFYPO.4TH
1444 lines (1228 loc) · 59.5 KB
/
VERIFYPO.4TH
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Verify assembled codes
HEX
USE32
// A
CR .( VERIFY-A)
CODE: VERIFY-A
AAA
AAD
AAM
AAS
AL 34 # ADC
BH 34 # ADC
SI 34 # ADC
ESI 34 # ADC
CH 34 # ADD
SI 34 # ADD
ESI 34 # ADD
AX 1234 # ADC
BP 1234 # ADC
EAX 12345678 # ADC
ESP 12345678 # ADC
BYTE^ { EDX } 34 # ADC
WORD^ { EDX } 1234 # ADC
DWORD^ { EDX } 12341234 # ADC
{ EDX } 12341234 # ADC
WORD^ { ESI EBX *8 + 1234432 + } 1234 # ADC
{ ESI *4 EDX + 987655 - } 12344321 # ADC
SI SP ADC
EBP ESI ADC
EBP EDX ADC
{ BP SI + } EDX ADC
{ SI BP + } EDX ADC
{ ESP EBP + } EDX ADC
{ EBP EBP + } EDX ADC
{ EBP *2 } EDX ADC
EDX EBP ADC
EDX { BP SI + } ADC
EDX { SI BP + } ADC
EDX { ESP EBP + } ADC
EDX { EBP EBP + } ADC
EDX { EBP *2 } ADC
AL BYTE^ { ESI EDI + } ADC
BL BYTE^ { ESI EDI + } ADC
DH BYTE^ { ESI EDI + } ADC
BYTE^ { ESI EDI + } AL ADC
BYTE^ { ESI EDI + } BL ADC
BYTE^ { ESI EDI + } DH ADC
{ EDI EBX *4 + 12345678 + } 9ABCDEF0 # ADD
WORD^ { ESI EBX *8 + 1234432 + } 1234 # ADD
{ ESI *4 EDX + 987655 - } 12344321 # ADD
SI SP ADD
EBP ESI ADD
EBP EDX ADD
{ BP SI + } EDX ADD
{ SI BP + } EDX ADD
{ ESP EBP + } EDX ADD
{ EBP EBP + } EDX ADD
{ EBP *2 } EDX ADD
EDX EBP ADD
EDX { BP SI + } ADD
EDX { SI BP + } ADD
EDX { ESP EBP + } ADD
EDX { EBP EBP + } ADD
EDX { EBP *2 } ADD
AL BYTE^ { ESI EDI + } ADD
BL BYTE^ { ESI EDI + } ADD
DH BYTE^ { ESI EDI + } ADD
BYTE^ { ESI EDI + } AL ADD
BYTE^ { ESI EDI + } BL ADD
BYTE^ { ESI EDI + } DH ADD
CS: { EDI EBX *4 + 12345678 + } ESP ADD
DS: { EDI EBX *4 + 12345678 + } ESP ADD
ES: { EDI EBX *4 + 12345678 + } ESP ADD
SS: { EDI EBX *4 + 12345678 + } ESP ADD
FS: { EDI EBX *4 + 12345678 + } ESP ADD
GS: { EDI EBX *4 + 12345678 + } ESP ADD
{ EDI EBX *4 + 12345678 + } CS: ESP ADD
{ EDI EBX *4 + 12345678 + } DS: ESP ADD
{ EDI EBX *4 + 12345678 + } ES: ESP ADD
{ EDI EBX *4 + 12345678 + } SS: ESP ADD
{ EDI EBX *4 + 12345678 + } FS: ESP ADD
{ EDI EBX *4 + 12345678 + } GS: ESP ADD
{ EDI EBX *4 + 12345678 + } ESP CS: ADD
{ EDI EBX *4 + 12345678 + } ESP DS: ADD
{ EDI EBX *4 + 12345678 + } ESP ES: ADD
{ EDI EBX *4 + 12345678 + } ESP SS: ADD
{ EDI EBX *4 + 12345678 + } ESP FS: ADD
{ EDI EBX *4 + 12345678 + } ESP GS: ADD
CS: ESP { EDI EBX *4 + 12345678 + } ADD
DS: ESP { EDI EBX *4 + 12345678 + } ADD
ES: ESP { EDI EBX *4 + 12345678 + } ADD
SS: ESP { EDI EBX *4 + 12345678 + } ADD
FS: ESP { EDI EBX *4 + 12345678 + } ADD
GS: ESP { EDI EBX *4 + 12345678 + } ADD
ESP CS: { EDI EBX *4 + 12345678 + } ADD
ESP DS: { EDI EBX *4 + 12345678 + } ADD
ESP ES: { EDI EBX *4 + 12345678 + } ADD
ESP SS: { EDI EBX *4 + 12345678 + } ADD
ESP FS: { EDI EBX *4 + 12345678 + } ADD
ESP GS: { EDI EBX *4 + 12345678 + } ADD
ESP { EDI EBX *4 + 12345678 + } CS: ADD
ESP { EDI EBX *4 + 12345678 + } DS: ADD
ESP { EDI EBX *4 + 12345678 + } ES: ADD
ESP { EDI EBX *4 + 12345678 + } SS: ADD
ESP { EDI EBX *4 + 12345678 + } FS: ADD
ESP { EDI EBX *4 + 12345678 + } GS: ADD
WORD^ { ESI EBX *8 + 1234432 + } 1234 # AND
{ ESI *4 EDX + 987655 - } 12344321 # AND
SI SP AND
EBP ESI AND
EBP EDX AND
{ BP SI + } EDX AND
{ SI BP + } EDX AND
{ ESP EBP + } EDX AND
{ EBP EBP + } EDX AND
{ EBP *2 } EDX AND
EDX EBP AND
EDX { BP SI + } AND
EDX { SI BP + } AND
EDX { ESP EBP + } AND
EDX { EBP EBP + } AND
EDX { EBP *2 } AND
AL BYTE^ { ESI EDI + } AND
BL BYTE^ { ESI EDI + } AND
DH BYTE^ { ESI EDI + } AND
BYTE^ { ESI EDI + } AL AND
BYTE^ { ESI EDI + } BL AND
BYTE^ { ESI EDI + } DH AND
RET
;CODE
// B
CR .( VERIFY-B)
CODE: VERIFY-B
SI WORD^ { ESP EBP + } BOUND
DI WORD^ { SI BP + } BOUND
ECX { ESI EBP *4 + 34 + } BOUND
ECX { ESI *4 EBP + 12 + } BOUND
DX WORD^ { BX } BSF
ECX { 1234 } BSF
ECX { 12341234 } BSF
ESP { ESI EDI + } BSF
DX WORD^ { BX } BSR
ECX { 1234 } BSR
ECX { 12341234 } BSR
ESP { ESI EDI + } BSR
EAX BSWAP
EDX BSWAP
ESI BSWAP
ESP BSWAP
DI BSWAP
USE16
EAX BSWAP
EDX BSWAP
ESI BSWAP
ESP BSWAP
DI BSWAP
USE32
{ 1234 } ESI BT
DI BX BT
BP 12 # BT
EAX 34 # BT
RET
;CODE
// C
CR .( VERIFY-C)
CODE: VERIFY-C
// near call
' VERIFY-B # CALL
{ 1234 } CALL
{ ESI EDI + } CALL
{ ESI EDI + } CALL
EAX CALL
EBX CALL
ECX CALL
EDX CALL
{ EAX } CALL
{ EBX } CALL
{ ECX } CALL
{ EDX } CALL
// far call
{ ESI EDI + } CALLF
1234 # 12344321 # CALLF
USE16
OS: 1234 # 4312 # CALLF
USE32
CLTS
AX 1234 # CMP
BP 1234 # CMP
EAX 12345678 # CMP
ESP 12345678 # CMP
AX 12 # CMP
BP 12 # CMP
EAX 12 # CMP
ESP 12 # CMP
BYTE^ { EDX } 34 # CMP
WORD^ { EDX } 1234 # CMP
DWORD^ { EDX } 12341234 # CMP
{ EDX } 12341234 # CMP
WORD^ { ESI EBX *8 + 1234432 + } 1234 # CMP
{ ESI *4 EDX + 987655 - } 12344321 # CMP
SI SP CMP
EBP ESI CMP
{ BP SI + } EDX CMP
{ SI BP + } EDX CMP
{ ESP EBP + } EDX CMP
{ EBP EBP + } EDX CMP
{ EBP *2 } EDX CMP
EDX { BP SI + } CMP
EDX { SI BP + } CMP
EDX { ESP EBP + } CMP
EDX { EBP EBP + } CMP
EDX { EBP *2 } CMP
BYTE^ { ESI EDI + } AL CMPXCHG
BYTE^ { SI BX + } BL CMPXCHG
BYTE^ { BX DI + } DH CMPXCHG
WORD^ { ESI EDI + } AX CMPXCHG
WORD^ { SI BX + } BX CMPXCHG
WORD^ { BX DI + } DX CMPXCHG
DWORD^ { ESI EDI + } EAX CMPXCHG
DWORD^ { SI BX + } EBX CMPXCHG
DWORD^ { BX DI + } EDX CMPXCHG
CBW
CWDE
CWD
CDQ
CMPSB
CMPSW
CMPSD
USE16
CBW
CWDE
CWD
CDQ
CMPSB
CMPSW
CMPSD
USE32
RET
12 # RET
;CODE
CR .( VERIFY-D)
CODE: VERIFY-D
DAA
DAS
EAX DEC
AX DEC
EBP DEC
BP DEC
CH DEC
DL DEC
BYTE^ { EDX ESI *4 + 21 + } DEC
WORD^ { EDX ESI *4 + 21 + } DEC
DWORD^ { EDX ESI *4 + 21 + } DEC
CL DIV
CX DIV
ESI DIV
EBP DIV
ESP DIV
BYTE^ { ESP EBP *4 + 1234 + } DIV
WORD^ { ESP EBP + 1234 + } DIV
DWORD^ { SI BP + 1234 + } DIV
RET
;CODE
CR .( VERIFY-E)
CODE: VERIFY-E
1234 # 12 # ENTER
23 # 0 # ENTER
3412 # 1 # ENTER
RET
;CODE
CR .( VERIFY-F)
CODE: VERIFY-F
F2XM1
FABS
DWORD^ { ESI EDI *4 + } FADD
QWORD^ { ESI EDI *4 + } FADD
WORD^ { ESI EDI *4 + } FIADD
DWORD^ { ESI EDI *4 + } FIADD
DWORD^ { SI BP + 12 + } FADD
QWORD^ { SI BP + 12 + } FADD
WORD^ { SI BP + 12 + } FIADD
DWORD^ { SI BP + 12 + } FIADD
ST(2) ST FADD
ST(5) ST FADD
ST ST(2) FADD
ST ST(5) FADD
FADD
ST(7) ST FADDP
ST(3) ST FADDP
TBYTE^ { BP SI + } FBLD
TBYTE^ { EBP ESI *8 + 1234 + } FBLD
TBYTE^ { BX } FBLD
TBYTE^ { EBX } FBLD
TBYTE^ { BP SI + } FBSTP
TBYTE^ { EBP ESI *8 + 1234 + } FBSTP
TBYTE^ { BX } FBSTP
TBYTE^ { EBX } FBSTP
FCHS
FNCLEX
DWORD^ { ESI EDI *4 + 1234 + } FCOM
QWORD^ { ESI EDI *4 + 1234 + } FCOM
ST(4) FCOM
ST(0) FCOM
FCOM
DWORD^ { ESI EDI *4 + 1234 + } FCOMP
QWORD^ { ESI EDI *4 + 1234 + } FCOMP
ST(4) FCOMP
ST(0) FCOMP
FCOMP
FCOMPP
FCOS
FDECSTP
DWORD^ { ESI EDI *4 + } FDIV
QWORD^ { ESI EDI *4 + } FDIV
WORD^ { ESI EDI *4 + } FIDIV
DWORD^ { ESI EDI *4 + } FIDIV
DWORD^ { SI BP + 12 + } FDIV
QWORD^ { SI BP + 12 + } FDIV
WORD^ { SI BP + 12 + } FIDIV
DWORD^ { SI BP + 12 + } FIDIV
ST(2) ST FDIV
ST(5) ST FDIV
ST ST(2) FDIV
ST ST(5) FDIV
FDIV
ST(7) ST FDIVP
ST(3) ST FDIVP
DWORD^ { ESI EDI *4 + } FDIVR
QWORD^ { ESI EDI *4 + } FDIVR
WORD^ { ESI EDI *4 + } FIDIVR
DWORD^ { ESI EDI *4 + } FIDIVR
DWORD^ { SI BP + 12 + } FDIVR
QWORD^ { SI BP + 12 + } FDIVR
WORD^ { SI BP + 12 + } FIDIVR
DWORD^ { SI BP + 12 + } FIDIVR
ST(2) ST FDIVR
ST(5) ST FDIVR
ST ST(2) FDIVR
ST ST(5) FDIVR
FDIVR
ST(7) ST FDIVRP
ST(3) ST FDIVRP
ST FFREE
ST(1) FFREE
ST(7) FFREE
WORD^ { 2134 } FICOM
DWORD^ { 2134 } FICOM
WORD^ { 2134 } FICOMP
DWORD^ { 2134 } FICOMP
WORD^ { ESI EBP *2 + 1234 + } FILD
DWORD^ { ESI EBP *2 + 1234 + } FILD
QWORD^ { ESI EBP *2 + 1234 + } FILD
FINCSTP
FNINIT
WORD^ { ESI EBP *2 + 1234 + } FIST
DWORD^ { ESI EBP *2 + 1234 + } FIST
WORD^ { ESI EBP *2 + 1234 + } FISTP
DWORD^ { ESI EBP *2 + 1234 + } FISTP
QWORD^ { ESI EBP *2 + 1234 + } FISTP
DWORD^ { ESP EBP + } FLD
QWORD^ { ESP EBP + } FLD
TBYTE^ { ESP EBP + } FLD
ST(2) FLD
ST FLD
ST(5) FLD
FLD1
FLDL2T
FLDL2E
FLDPI
FLDLG2
FLDLN2
FLDZ
WORD^ { ESI EBP + } FLDCW
TBYTE^ { EDX EAX + } FLDENV
{ EDX EAX + } FLDENV
DWORD^ { ESI EDI *4 + } FMUL
QWORD^ { ESI EDI *4 + } FMUL
WORD^ { ESI EDI *4 + } FIMUL
DWORD^ { ESI EDI *4 + } FIMUL
DWORD^ { SI BP + 12 + } FMUL
QWORD^ { SI BP + 12 + } FMUL
WORD^ { SI BP + 12 + } FIMUL
DWORD^ { SI BP + 12 + } FIMUL
ST(2) ST FMUL
ST(5) ST FMUL
ST ST(2) FMUL
ST ST(5) FMUL
FMUL
ST(7) ST FMULP
ST(3) ST FMULP
FNOP
FPATAN
FPREM
FPREM1
FPTAN
FRNDINT
{ SI BP + } FRSTOR
{ ESI EBP + } FRSTOR
{ SI BP + } FNSAVE
{ ESI EBP + } FNSAVE
FSCALE
FSIN
FSINCOS
FSQRT
{ DWORD^ ESI } FST
{ QWORD^ EBP } FST
ST(3) FST
{ DWORD^ ESI } FSTP
{ QWORD^ EBP } FSTP
ST(3) FSTP
{ DWORD^ ESP } FSTP
{ TBYTE^ ESP } FSTP
WORD^ { ESI ESP + } FNSTCW
{ EBP EDI + } FNSTENV
AX FNSTSW
WORD^ { BX } FNSTSW
DWORD^ { ESI EDI *4 + } FSUB
QWORD^ { ESI EDI *4 + } FSUB
WORD^ { ESI EDI *4 + } FISUB
DWORD^ { ESI EDI *4 + } FISUB
DWORD^ { SI BP + 12 + } FSUB
QWORD^ { SI BP + 12 + } FSUB
WORD^ { SI BP + 12 + } FISUB
DWORD^ { SI BP + 12 + } FISUB
ST(2) ST FSUB
ST(5) ST FSUB
ST ST(2) FSUB
ST ST(5) FSUB
FSUB
ST(7) ST FSUBP
ST(3) ST FSUBP
DWORD^ { ESI EDI *4 + } FSUBR
QWORD^ { ESI EDI *4 + } FSUBR
WORD^ { ESI EDI *4 + } FISUBR
DWORD^ { ESI EDI *4 + } FISUBR
DWORD^ { SI BP + 12 + } FSUBR
QWORD^ { SI BP + 12 + } FSUBR
WORD^ { SI BP + 12 + } FISUBR
DWORD^ { SI BP + 12 + } FISUBR
ST(2) ST FSUBR
ST(5) ST FSUBR
ST ST(2) FSUBR
ST ST(5) FSUBR
FSUBR
ST(7) ST FSUBRP
ST(3) ST FSUBRP
FTST
ST(5) FUCOM
FUCOM
ST(3) FUCOMP
FUCOMP
FUCOMPP
FWAIT
FXAM
FXCH
ST(1) FXCH
ST(7) FXCH
FXTRACT
FYL2X
FYL2XP1
// Compound Instructions ( FWAIT + FNXXXX )
FCLEX
FINIT
{ ESI EBP + } FSAVE
WORD^ { ESI ESP + } FSTCW
{ EBP EDI + } FSTENV
AX FSTSW
WORD^ { BX } FSTSW
RET
;CODE
CR .( VERIFY-I)
CODE: VERIFY-I
HLT
CH IDIV
BYTE^ { ESI ESP + } IDIV
SI IDIV
WORD^ { BP SI + } IDIV
ESI IDIV
DWORD^ { EBP ESP + } IDIV
CH IMUL
BYTE^ { ESI ESP + } IMUL
SI IMUL
WORD^ { BP SI + } IMUL
ESI IMUL
DWORD^ { EBP ESP + } IMUL
SI DI ADD
SI DI IMUL
ESI EDI ADD
ESI EDI IMUL
SI WORD^ { ESP } IMUL
SP BP 21 # IMUL
ESP EBP 21 # IMUL
DI DI 12 # IMUL
ESI ESI 12 # IMUL
SP BP 1221 # IMUL
ESP EBP 1221 # IMUL
DI DI 1212 # IMUL
ESI ESI 1212 # IMUL
AL 12 # IN
AX 12 # IN
EAX 12 # IN
AL DX IN
AX DX IN
EAX DX IN
SI INC
ESP INC
BYTE^ { EDI } INC
WORD^ { ESP } INC
DWORD^ { ESP } INC
INSB
INSW
INSD
INT3
3 # INT
10 # INT
21 # INT
FF # INT
INTO
INVD
{ ESI } INVLPG
WORD^ { BX } INVLPG
DWORD^ { BX } INVLPG
TBYTE^ { EDI } INVLPG
TBYTE^ { BX } INVLPG
{ EDI *4 ESP + 1234 + } INVLPG
IRET
IRETD
RET
;CODE
CR .( VERIFY-J )
: TESTJMP
." FINISH JMP" CR ;
.( ' TESTJMP = ) ' TESTJMP .
CODE: VERIFY-J
// Near jump
' TESTJMP # JMP
' .S # JMP
{ 1234 } JMP
{ ESI EDI + } JMP
{ ESI EDI + } JMP
EAX JMP
EBX JMP
ECX JMP
EDX JMP
{ EAX } JMP
{ EBX } JMP
{ ECX } JMP
{ EDX } JMP
// Far jump
{ ESI EDI + } JMPF
1234 # 4321 # JMPF
1234 # 12344321 # JMPF
USE16
OS: 1234 # 4312 # JMPF
USE32
' TESTJMP # JECXZ
' TESTJMP # JCXZ
EAX EBX CMP
> IF
EAX EBX AND
ELSE
EAX ECX AND
ENDIF
NOP
NOP
NOP
BEGIN
EAX { ESI ESP + 1234 + } CMP
<= WHILE
EAX ESI ADD
REPEAT
NOP
NOP
NOP
BEGIN
EAX { ESI } ADD
{ ESI } EDX CMP
U> UNTIL
NOP
NOP
NOP
BEGIN
ESI EDI ADD
ESI EDI ADD
ESI EDI ADD
AGAIN
RET
;CODE
CR .( VERIFY-L)
: TESTLABEL ;
CODE: VERIFY-L
LAHF
SP WORD^ { BP SI + } LAR
ESP DWORD^ { EBP ESI + } LAR
' TESTLABEL # LOOP
' TESTLABEL # LOOPZ
' TESTLABEL # LOOPNZ
' TESTLABEL # AS: LOOP
' TESTLABEL # AS: LOOPZ
' TESTLABEL # AS: LOOPNZ
' TESTLABEL # OS: LOOP
' TESTLABEL # OS: LOOPZ
' TESTLABEL # OS: LOOPNZ
ESI BYTE^ { EBP ESP + 21 + } LEA
ESI DWORD^ { EBP ESP + 21 + } LEA
ESI WORD^ { SI 21 + } LEA
EBP { 1234 } LEA
SI WORD^ { EBP ESP + 21 + } LEA
SI DWORD^ { EBP ESI + } LEA
SI TBYTE^ { SI } LEA
BP { 1234 } LEA
LEAVE
QWORD^ { EBP ESP + } LGDT
QWORD^ { ESP ESI + } LIDT
QWORD^ { BP SI + } LGDT
QWORD^ { SI } LIDT
BX { SI BP + } LDS
SI { ESI EBP + } LDS
DI { 1234 } LDS
EDI { ESI EBP + } LDS
ESP { ESP 1234 + } LDS
ESP { 1234 } LDS
BX { SI BP + } LES
SI { ESI EBP + } LES
DI { 1234 } LES
EDI { ESI EBP + } LES
ESP { ESP 1234 + } LES
ESP { 1234 } LES
BX { SI BP + } LSS
SI { ESI EBP + } LSS
DI { 1234 } LSS
EDI { ESI EBP + } LSS
ESP { ESP 1234 + } LSS
ESP { 1234 } LSS
BX { SI BP + } LFS
SI { ESI EBP + } LFS
DI { 1234 } LFS
EDI { ESI EBP + } LFS
ESP { ESP 1234 + } LFS
ESP { 1234 } LFS
BX { SI BP + } LGS
SI { ESI EBP + } LGS
DI { 1234 } LGS
EDI { ESI EBP + } LGS
ESP { ESP 1234 + } LGS
ESP { 1234 } LGS
SI LLDT
WORD^ { ESI EBP + } LLDT
WORD^ { BP SI + } LLDT
SI LMSW
WORD^ { ESI EBP + } LMSW
WORD^ { BP SI + } LMSW
LOCK: ESI DWORD^ { EBP } ADD
LODSB
LODSW
LODSD
ESI ESP LSL
ESI DWORD^ { EBX } LSL
SI LTR
WORD^ { BX } LTR
RET
;CODE
CR .( VERIFY-M)
CODE: VERIFY-M
ESI 123 # MOV
LONG ESI 123 # MOV
DWORD^ { ESI } 1234 # MOV
BYTE^ { ESI } DH MOV
WORD^ { ESP } BX MOV
DWORD^ { EBP } EBP MOV
DH BYTE^ { ESI } MOV
BX WORD^ { ESP } MOV
EBP DWORD^ { EBP } MOV
BL BYTE^ { 1234 } MOV
BX WORD^ { 1234 } MOV
EBX DWORD^ { 1234 } MOV
AL BYTE^ { 1234 } MOV
AX WORD^ { 1234 } MOV
EAX DWORD^ { 1234 } MOV
BYTE^ { 1234 } BL MOV
WORD^ { 1234 } BX MOV
DWORD^ { 1234 } EBX MOV
BYTE^ { 1234 } AL MOV
WORD^ { 1234 } AX MOV
DWORD^ { 1234 } EAX MOV
BYTE^ { 1234123 } BL MOV
WORD^ { 1234123 } BX MOV
DWORD^ { 1234123 } EBX MOV
BYTE^ { 1234123 } AL MOV
WORD^ { 1234123 } AX MOV
DWORD^ { 1234123 } EAX MOV
DX ES MOV
DX DS MOV
SI CS MOV
BP SS MOV
DI FS MOV
SP GS MOV
ES DX MOV
DS DX MOV
CS SI MOV
SS BP MOV
FS DI MOV
GS SP MOV
AL 12 # MOV
AX 123 # MOV
EAX 1234 # MOV
CL 12 # MOV
CX 123 # MOV
ECX 1234 # MOV
BYTE^ { EBP ECX + } 12 # MOV
WORD^ { EBP ECX + } 123 # MOV
DWORD^ { EBP ECX + } 1234 # MOV
ESP CR0 MOV
ESP CR2 MOV
CR0 ESP MOV
CR2 ESP MOV
ESP TR6 MOV
ESP TR7 MOV
TR6 ESP MOV
TR7 ESP MOV
ESP DR3 MOV
ESP DR7 MOV
DR3 ESP MOV
DR7 ESP MOV
MOVSB
MOVSW
MOVSD
DX BYTE^ { ESP EBP + } MOVSX
EDX BYTE^ { EBP ESP + } MOVSX
EDX WORD^ { EBP ESP + } MOVSX
DX AL MOVSX
EDX AH MOVSX
EDX SP MOVSX
EDX DX MOVSX
DX BYTE^ { ESP EBP + } MOVZX
EDX BYTE^ { EBP ESP + } MOVZX
EDX WORD^ { EBP ESP + } MOVZX
DX AL MOVZX
EDX AH MOVZX
EDX SP MOVZX
EDX DX MOVZX
CL MUL
CX MUL
ESI MUL
EBP MUL
ESP MUL
BYTE^ { EBP *4 ESP + 1234 + } MUL
WORD^ { ESP EBP + 1234 + } MUL
DWORD^ { SI BP + 1234 + } MUL
RET
;CODE
CR .( VERIFY-N)
CODE: VERIFY-N
EAX NEG
ESP NEG
BYTE^ { EBX } NEG
CH NEG
WORD^ { EBX } NEG
DWORD^ { EBX } NEG
EAX NOT
ESP NOT
BYTE^ { EBX } NOT
CH NOT
WORD^ { EBX } NOT
DWORD^ { EBX } NOT
NOP
RET
;CODE
CR .( VERIFY-O)
CODE: VERIFY-O
AL 34 # OR
BH 34 # OR
SI 34 # OR
ESI 34 # OR
AX 1234 # OR
BP 1234 # OR
EAX 12345678 # OR
ESP 12345678 # OR
BYTE^ { EDX } 34 # OR
WORD^ { EDX } 1234 # OR
DWORD^ { EDX } 12341234 # OR
{ EDX } 12341234 # OR
WORD^ { ESI EBX *8 + 1234432 + } 1234 # OR
{ ESI *4 EDX + 987655 - } 12344321 # OR
SI SP OR
EBP ESI OR
EBP EDX OR
{ BP SI + } EDX OR
{ SI BP + } EDX OR
{ ESP EBP + } EDX OR
{ EBP EBP + } EDX OR
{ EBP *2 } EDX OR
EDX EBP OR
EDX { BP SI + } OR
EDX { SI BP + } OR
EDX { ESP EBP + } OR
EDX { EBP EBP + } OR
EDX { EBP *2 } OR
23 # AL OUT
23 # AX OUT
23 # EAX OUT
DX AL OUT
DX AX OUT
DX EAX OUT
OUTSB
OUTSW
OUTSD
RET
;CODE
CR .( VERIFY-P)
CODE: VERIFY-P
WORD^ { ESP ESI + } POP
DWORD^ { ESP ESI + } POP
BP POP
CX POP
EBP POP
ECX POP
DS POP
ES POP
SS POP
FS POP
GS POP
POPA
POPAD
POPF
POPFD
WORD^ { ESP ESI + } PUSH
DWORD^ { ESP ESI + } PUSH
12 # PUSH
1234 # PUSH
USE16
OS: 1234 # PUSH
USE32
12344312 # PUSH
// Note that in USE16 segment, if the immediate value is greater than
// $FFFF, only the lower 16bits will be pushed in. If you want to push
// a 32-bit immediate integer, write :
// USE32 OS: $12344321 # PUSH USE16
BP PUSH
CX PUSH
EBP PUSH
ECX PUSH
CS PUSH
DS PUSH
ES PUSH
SS PUSH
FS PUSH
GS PUSH
PUSHA
PUSHAD
PUSHF
PUSHFD
RET
;CODE
CR .( VERIFY-R)
CODE: VERIFY-R
CL RCL
BH RCL
BYTE^ { EBP } RCL
CL CL RCL
BH CL RCL
BYTE^ { ESP EBP + } CL RCL