-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathgalangtms320c28x.cpp
More file actions
1985 lines (1895 loc) · 71.7 KB
/
galangtms320c28x.cpp
File metadata and controls
1985 lines (1895 loc) · 71.7 KB
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
#include "galangtms320c28x.h"
#include "gamnemonic.h"
#include "gaparameter.h"
#include <iostream>
// Just to keep things shorter.
#define mnem new GAMnemonic
// TMS320C28x 32-bit data access (Direct/Stack/Indirect/Register).
#define loc32(x) insert(new GAParameterTMS320C28xReg32((x)))
// TMS320C28x 16-bit data access (Direct/Stack/Indirect/Register).
#define loc16(x) insert(new GAParameterTMS320C28xReg16((x)))
// TMS320C28x 22-bit immediate.
#define imm22(x) insert(new GAParameterTMS320C28xImm22((x)))
// TMS320C28x 16-bit SP-relative address.
#define rel16(x) insert(new GAParameterTMS320C28xRel16((x)))
// TMS320C28x constant.
#define const(x) insert(new GAParameterTMS320C28xConst((x)))
// TMS320C28x Product Mode shift bits.
#define pm(x) insert(new GAParameterTMS320C28xPM((x)))
// TMS320C28x Status mode bits.
#define status(x) insert(new GAParameterTMS320C28xStatus((x)))
// TMS320C28x Condition code bits.
#define cond(x) insert(new GAParameterTMS320C28xCondition((x), false))
#define condr(x) insert(new GAParameterTMS320C28xCondition((x), true))
/* This class represents the TI TMS320C28x DSP.
*
* Opcodes taken from here:
* https://www.ti.com/lit/ug/spru430f/spru430f.pdf
*/
GALangTMS320C28x::GALangTMS320C28x()
{
endian = BIG;
name = "tms320c28x";
wordsize = 2;
align = 2;
epsilon = 2; // TODO: wrong results with --base <offset>
minbytes = 2;
maxbytes = 4;
swapwordonload = true; // File is little endian, but we work in big endian.
// Register names.
regnames.clear();
regnames
<< "acc" << "xar1" << "xar2" << "xar3" << "xar4" << "xar5" << "xar6" << "xar7" << "p" << "xt" // 32-bit
<< "ah" << "al" << "xar0" << "ar0" << "ar1" << "ar2" << "ar3" << "ar4" << "ar5" << "ar6" << "ar7" // 16-bit
<< "dp" << "ifr" << "ier" << "dbgier" << "ph" << "pl" << "sp" << "st0" << "st1" << "t" << "tl" // 16-bit
<< "al.msb" << "ah.msb" << "al.lsb" << "ah.lsb" // 8-bit
<< "acc:p" << "ar1:ar0" << "ar3:ar2" << "ar5:ar4" << "ar1h:ar0h" << "t:st0" << "dp:st1" // Combined
<< "ovc" << "objmode" << "m0m1map" << "xf" << "amode" // Status
<< "pc" << "rpc"; // Special
GAMnemonic *m = 0;
GAParameterGroup *pg = 0;
// Instructions begin on page 124 with ABORTI.
insert(mnem("aborti", 2, "\x00\x01", "\xff\xff"))
->help("Abort Interrupt")
->example("aborti");
insert(mnem("abs", 2, "\xff\x56", "\xff\xff"))
->help("Absolute Value of Accumulator")
->example("abs acc")
->regname("acc");
insert(mnem("abstc", 2, "\x56\x5f", "\xff\xff"))
->help("Absolute Value of Accumulator and Load TC")
->example("abstc acc")
->regname("acc");
// TODO: ADD ACC,#16bit<<#0..15 — Add Value to Accumulator
// TODO: ADD ACC,loc16 <<T — Add Value to Accumulator
// TODO: ADD ACC,loc16 << #0..16 — Add Value to Accumulator
insert(mnem("add", 2, "\x94\x00", "\xff\x00"))
->help("Add Value to AL")
->example("mov al, @var")
->regname("al")
->loc16("\x00\xff");
insert(mnem("add", 2, "\x95\x00", "\xff\x00"))
->help("Add Value to AH")
->example("andb ah, @var")
->regname("ah")
->loc16("\x00\xff");
insert(mnem("add", 2, "\x72\x00", "\xff\x00"))
->help("Add AL to Specified Location")
->example("mov al, @var")
->loc16("\x00\xff")
->regname("al");
insert(mnem("add", 2, "\x73\x00", "\xff\x00"))
->help("Add AH to Specified Location")
->example("add ah, @var")
->loc16("\x00\xff")
->regname("ah");
insert(mnem("add", 4, "\x08\x00\x00\x00", "\xff\x00\x00\x00"))
->help("Add Constant to Specified Location")
->example("add @var, #10")
->loc16("\x00\xff\x00\x00")
->simm("\x00\x00\xff\xff");
insert(mnem("addb", 2, "\x09\x00", "\xff\x00"))
->help("Add 8-bit Constant to Accumulator")
->example("addb acc, #1")
->regname("acc")
->imm("\x00\xff");
insert(mnem("addb", 2, "\x9c\x00", "\xff\x00"))
->help("Add 8-bit Constant to AL")
->example("addb al, #-3")
->regname("al")
->simm("\x00\xff");
insert(mnem("addb", 2, "\x9d\x00", "\xff\x00"))
->help("Add 8-bit Constant to AH")
->example("addb ah, #2")
->regname("ah")
->simm("\x00\xff");
insert(mnem("addb", 2, "\xfe\x00", "\xff\x80"))
->help("Add 7-bit Constant to Stack Pointer")
->example("addb sp, #6")
->regname("sp")
->imm("\x00\x7f");
// TODO: ADDB XARn, #7bit — Add 7-bit Constant to Auxiliary Register
insert(mnem("addcl", 4, "\x56\x40\x00\x00", "\xff\xff\x00\x00"))
->help("Add 32-bit Value Plus Carry to Accumulator")
->example("addcl acc, @var")
->regname("acc")
->loc32("\x00\x00\x00\xff");
insert(mnem("addcu", 2, "\x0c\x00", "\xff\x00"))
->help("Add Unsigned Value Plus Carry to Accumulator")
->example("addcu acc, @varlow")
->regname("acc")
->loc16("\x00\xff");
insert(mnem("addl", 2, "\x07\x00", "\xff\x00"))
->help("Add 32-bit Value to Accumulator")
->example("addl acc, @var")
->regname("acc")
->loc32("\x00\xff");
// TODO: ADDL ACC,P << PM — Add Shifted P to Accumulator
insert(mnem("addl", 4, "\x56\x01\x00\x00", "\xff\xff\xff\x00"))
->help("Add Accumulator to Specified Location")
->example("addl @var, acc")
->loc32("\x00\x00\x00\xff")
->regname("acc");
insert(mnem("addu", 2, "\x0d\x00", "\xff\x00"))
->help("Add Unsigned Value to Accumulator")
->example("addu acc, @varlow")
->regname("acc")
->loc16("\x00\xff");
insert(mnem("addul", 4, "\x56\x57\x00\x00", "\xff\xff\xff\x00"))
->help("Add 32-bit Unsigned Value to P")
->example("addul p, @var")
->regname("p")
->loc32("\x00\x00\x00\xff");
insert(mnem("addul", 4, "\x56\x53\x00\x00", "\xff\xff\x00\x00"))
->help("Add 32-bit Unsigned Value to Accumulator")
->example("addul acc, @var")
->regname("acc")
->loc32("\x00\x00\x00\xff");
insert(mnem("adrk", 2, "\xfc\x00", "\xff\x00"))
->help("Add to Current Auxiliary Register")
->example("adrk #2")
->imm("\x00\xff");
// TODO: AND ACC,#16bit << #0..16 — Description
insert(mnem("and", 2, "\x89\x00", "\xff\x00"))
->help("Bitwise AND")
->example("and acc, @var")
->regname("acc")
->loc16("\x00\xff");
insert(mnem("and", 4, "\xcc\x00\x00\x00", "\xff\x00\x00\x00"))
->help("Bitwise AND")
->example("and al, @var, 0x0084")
->regname("al")
->loc16("\x00\xff\x00\x00")
->imm("\x00\x00\xff\xff");
insert(mnem("and", 4, "\xcd\x00\x00\x00", "\xff\x00\x00\x00"))
->help("Bitwise AND")
->example("and ah, @var, 0x0084")
->regname("ah")
->loc16("\x00\xff\x00\x00")
->imm("\x00\x00\xff\xff");
insert(mnem("and", 4, "\x76\x26\x00\x00", "\xff\xff\x00\x00"))
->help("Bitwise AND to Disable Specified CPU Interrupts")
->example("and ier, #0xffde")
->regname("ier")
->imm("\x00\x00\xff\xff");
insert(mnem("and", 4, "\x76\x2f\x00\x00", "\xff\xff\x00\x00"))
->help("Bitwise AND to Clear Pending CPU Interrupts")
->example("and ifr, #0x0000")
->regname("ifr")
->imm("\x00\x00\xff\xff");
insert(mnem("and", 2, "\xc0\x00", "\xff\x00"))
->help("Bitwise AND")
->example("and @var, al")
->loc16("\x00\xff")
->regname("al");
insert(mnem("and", 2, "\xc1\x00", "\xff\x00"))
->help("Bitwise AND")
->example("and @var, ah")
->loc16("\x00\xff")
->regname("ah");
insert(mnem("and", 2, "\xce\x00", "\xff\x00"))
->help("Bitwise AND")
->example("and al, @var")
->loc16("\x00\xff")
->regname("al");
insert(mnem("and", 2, "\xcf\x00", "\xff\x00"))
->help("Bitwise AND")
->example("and ah, @var")
->loc16("\x00\xff")
->regname("ah");
insert(mnem("and", 4, "\x18\x00\x00\x00", "\xff\x00\x00\x00"))
->help("Bitwise AND")
->example("and @var, #~(1 << 3 | 1)")
->loc16("\x00\xff\x00\x00")
->simm("\x00\x00\xff\xff");
insert(mnem("andb", 2, "\x90\x00", "\xff\x00"))
->help("Bitwise AND 8-bit Value")
->example("andb al, 0xff")
->regname("al")
->imm("\x00\xff");
insert(mnem("andb", 2, "\x91\x00", "\xff\x00"))
->help("Bitwise AND 8-bit Value")
->example("andb ah, 0xff")
->regname("ah")
->imm("\x00\xff");
insert(mnem("asp", 2, "\x76\x1b", "\xff\xff"))
->help("Align Stack Pointer")
->example("asp");
insert(mnem("asr", 2, "\xff\xa0", "\xff\xf0"))
->help("Arithmetic Shift Right")
->example("asr al, #2")
->regname("al")
->imm("\x00\x0f");
insert(mnem("asr", 2, "\xff\xb0", "\xff\xf0"))
->help("Arithmetic Shift Right")
->example("asr ah, #2")
->regname("ah")
->imm("\x00\x0f");
insert(mnem("asr", 2, "\xff\x64", "\xff\xff"))
->help("Arithmetic Shift Right")
->example("asr al, t")
->regname("al")
->regname("t");
insert(mnem("asr", 2, "\xff\x65", "\xff\xff"))
->help("Arithmetic Shift Right")
->example("asr ah, t")
->regname("ah")
->regname("t");
insert(mnem("asr64", 2, "\x56\x80", "\xff\xf0"))
->help("Arithmetic Shift Right of 64-bit Value")
->example("asr64 acc:p, #10")
->regname("acc:p")
->imm("\x00\x0f");
insert(mnem("asr64", 2, "\x56\x23", "\xff\xff"))
->help("Arithmetic Shift Right of 64-bit Value")
->example("asr64 acc:p, t")
->regname("acc:p")
->regname("t");
insert(mnem("asrl", 2, "\x56\x10", "\xff\xff"))
->help("Arithmetic Shift Right of Accumulator")
->example("asrl acc, t")
->regname("acc")
->regname("t");
insert(mnem("b", 4, "\xff\x70\x00\x00", "\xff\xf0\x00\x00"))
->help("Branch")
->example("b #0x0002, eq")
->rel16("\x00\x00\xff\xff") // TODO: 16-bit SP-relative broken?
->cond("\x00\x0f\x00\x00");
// TODO: BANZ 16bitOffset,ARn− − — Branch if Auxiliary Register Not Equal to Zero
// TODO: BAR 16bitOffset,ARn,ARm,EQ/NEQ — Branch on Auxiliary Register Comparison
insert(mnem("bf", 4, "\x56\xc0\x00\x00", "\xff\xf0\x00\x00"))
->help("Branch Fast")
->example("bf 2, unc")
->rel16("\x00\x00\xff\xff") // TODO: 16-bit SP-relative broken?
->cond("\x00\x0f\x00\x00");
insert(mnem("c27map", 2, "\x56\x3f", "\xff\xff"))
->help("Clear the M0M1MAP Bit")
->example("c27map")
->prioritize(); // Remove conflict: clrc m0m1map
insert(mnem("c27obj", 2, "\x56\x36", "\xff\xff"))
->help("Clear the Objmode Bit")
->example("c27obj")
->prioritize(); // Remove conflict: clrc objmode
insert(mnem("c28addr", 2, "\x56\x16", "\xff\xff"))
->help("Clear the AMODE Status Bit")
->example("c28addr")
->prioritize(); // Remove conflict: clrc amode
insert(mnem("c28map", 2, "\x56\x1a", "\xff\xff"))
->help("Set the M0M1MAP Bit")
->example("c28map")
->prioritize(); // Remove conflict: setc m0m1map
insert(mnem("c28obj", 2, "\x56\x1f", "\xff\xff"))
->help("Set the Objmode Bit")
->example("c28obj")
->prioritize(); // Remove conlict: setc objmode
insert(mnem("clrc amode", 2, "\x56\x16", "\xff\xff"))
->help("Clear the AMODE Bit")
->example("clrc amode")
->regname("amode");
insert(mnem("clrc m0m1map", 2, "\x56\x3f", "\xff\xff"))
->help("Clear the M0M1MAP Bit")
->example("clrc m0m1map")
->regname("m0m1map");
insert(mnem("clrc objmode", 2, "\x56\x36", "\xff\xff"))
->help("Clear the Objmode Bit")
->example("clrc objmode")
->regname("objmode");
insert(mnem("clrc", 2, "\x56\x5c", "\xff\xff"))
->help("Clear Overflow Counter")
->example("clrc ovc")
->regname("ovc");
insert(mnem("clrc", 2, "\x56\x1b", "\xff\xff"))
->help("Clear XF Status Bit")
->example("clrc xf")
->regname("xf");
insert(mnem("clrc", 2, "\x29\x00", "\xff\x00"))
->help("Clear Status Bits")
->example("clrc tc, c, sxm, ovm")
->status("\x00\xff");
insert(mnem("cmp", 2, "\x54\x00", "\xff\x00"))
->help("Compare")
->example("cmp al, @var")
->regname("al")
->loc16("\x00\xff");
insert(mnem("cmp", 2, "\x55\x00", "\xff\x00"))
->help("Compare")
->example("cmp ah, @var")
->regname("ah")
->loc16("\x00\xff");
insert(mnem("cmp", 4, "\x1b\x00\x00\x00", "\xff\x00\x00\x00"))
->help("Compare")
->example("cmp @var, #20")
->loc16("\x00\xff\x00\x00")
->simm("\x00\x00\xff\xff");
insert(mnem("cmp64", 2, "\x56\x5e", "\xff\xff"))
->help("Compare 64-bit Value")
->example("cmp64 acc:p")
->regname("acc:p");
insert(mnem("cmpb", 2, "\x52\x00", "\xff\x00"))
->help("Compare 8-bit Value")
->example("cmpb al, @var")
->regname("al")
->imm("\x00\xff");
insert(mnem("cmpb", 2, "\x53\x00", "\xff\x00"))
->help("Compare 8-bit Value")
->example("cmpb ah, @var")
->regname("ah")
->imm("\x00\xff");
insert(mnem("cmpl", 2, "\x0f\x00", "\xff\x00"))
->help("Compare 32-bit Value")
->example("cmpl acc, @p")
->regname("acc")
->loc32("\x00\xff");
// TODO: CMPL ACC,P << PM — Compare 32-bit Value
insert(mnem("cmpr", 2, "\x56\x1d", "\xff\xff"))
->help("Compare Auxiliary Registers")
->example("cmpr 0")
->const(0);
insert(mnem("cmpr", 2, "\x56\x19", "\xff\xff"))
->help("Compare Auxiliary Registers")
->example("cmpr 1")
->const(1);
insert(mnem("cmpr", 2, "\x56\x18", "\xff\xff"))
->help("Compare Auxiliary Registers")
->example("cmpr 2")
->const(2);
insert(mnem("cmpr", 2, "\x56\x1c", "\xff\xff"))
->help("Compare Auxiliary Registers")
->example("cmpr 3")
->const(3);
insert(mnem("csb", 2, "\x56\x35", "\xff\xff"))
->help("Count Sign Bits")
->example("csb acc")
->regname("acc");
insert(mnem("dec", 2, "\x0b\x00", "\xff\x00"))
->help("Decrement by 1")
->example("dec @acc")
->loc16("\x00\xff");
insert(mnem("dint", 2, "\x3b\x10", "\xff\xff"))
->help("Disable Maskable Interrupts (Set INTM Bit)")
->example("dint")
->prioritize(); // Remove alias conflict: setc intm
// TODO: DMAC ACC:P,loc32,*XAR7/++ — 16-Bit Dual Multiply and Accumulate
insert(mnem("dmov", 2, "\xa5\x00", "\xff\x00"))
->help("Data Move Contents of 16-bit Location")
->example("dmov @x+1")
->loc16("\x00\xff");
insert(mnem("eallow", 2, "\x76\x22", "\xff\xff"))
->help("Enable Write Access to Protected Space")
->example("eallow");
insert(mnem("edis", 2, "\x76\x1a", "\xff\xff"))
->help("Disable Write Access to Protected Registers")
->example("edis");
insert(mnem("eint", 2, "\x29\x10", "\xff\xff"))
->help("Enable Maskable Interrupts (Clear INTM Bit)")
->example("eint")
->prioritize(); // Remove alias conflict: clrc intm
insert(mnem("estop0", 2, "\x76\x25", "\xff\xff"))
->help("Emulation Stop 0")
->example("estop0");
insert(mnem("estop1", 2, "\x76\x24", "\xff\xff"))
->help("Emulation Stop 1")
->example("estop1");
insert(mnem("ffc", 4, "\x00\xc0\x00\x00", "\xff\xc0\x00\x00"))
->help("Fast Function Call")
->example("ffc xar7, func")
->regname("xar7")
->imm22("\x00\x3f\xff\xff");
insert(mnem("flip", 2, "\x56\x70", "\xff\xff"))
->help("Flip Order of Bits in AL Register")
->example("flip al")
->regname("al");
insert(mnem("flip", 2, "\x56\x71", "\xff\xff"))
->help("Flip Order of Bits in AH Register")
->example("flip ah")
->regname("ah");
insert(mnem("iack", 4, "\x76\x3f\x00\x00", "\xff\xff\x00\x00"))
->help("Interrupt Acknowledge")
->example("iack #0xffff")
->imm("\x00\x00\xff\xff");
insert(mnem("idle", 2, "\x76\x21", "\xff\xff"))
->help("Put Processor in Idle Mode")
->example("idle");
// TODO: IMACL P,loc32,*XAR7/++ — Signed 32 X 32-Bit Multiply and Accumulate (Lower Half)
// TODO: IMPYAL P,XT,loc32 — Signed 32-Bit Multiply (Lower Half) and Add Previous P
// TODO: IMPYL ACC,XT,loc32 — Signed 32 X 32-Bit Multiply (Lower Half)
// TODO: IMPYL P,XT,loc32 — Signed 32 X 32-Bit Multiply (Lower Half)
// TODO: IMPYSL P,XT,loc32 — Signed 32-Bit Multiply (Low Half) and Subtract P
// TODO: IMPYXUL P,XT,loc32 — Signed 32 X Unsigned 32-Bit Multiply (Lower Half)
// TODO: IN loc16,*(PA) — Input Data From Port
insert(mnem("inc", 2, "\x0a\x00", "\xff\x00"))
->help("Increment by 1")
->example("inc @acc")
->loc16("\x00\xff");
// TODO: INTR — Emulate Hardware Interrupt
insert(mnem("iret", 2, "\x76\x02", "\xff\xff"))
->help("Interrupt Return")
->example("iret");
// TODO: LB *XAR7 — Long Indirect Branch
// TODO: LB 22bit — Long Branch
// TODO: LC *XAR7 — Long Indirect Call
// TODO: LC 22bit — Long Call
insert(mnem("lcr", 4, "\x76\x40\x00\x00", "\xff\xc0\x00\x00"))
->help("Long Call Using RPC")
->example("lcr func")
->imm22("\x00\x3f\xff\xff");
insert(mnem("lcr", 2, "\x3e\x60", "\xff\xf8"))
->help("Long Indirect Call Using RPC")
->example("lcr *xar0")
->regnameind("xar0");
insert(mnem("lcr", 2, "\x3e\x61", "\xff\xf8"))
->help("Long Indirect Call Using RPC")
->example("lcr *xar1")
->regnameind("xar1");
insert(mnem("lcr", 2, "\x3e\x62", "\xff\xf8"))
->help("Long Indirect Call Using RPC")
->example("lcr *xar2")
->regnameind("xar2");
insert(mnem("lcr", 2, "\x3e\x63", "\xff\xf8"))
->help("Long Indirect Call Using RPC")
->example("lcr *xar3")
->regnameind("xar3");
insert(mnem("lcr", 2, "\x3e\x64", "\xff\xf8"))
->help("Long Indirect Call Using RPC")
->example("lcr *xar4")
->regnameind("xar4");
insert(mnem("lcr", 2, "\x3e\x65", "\xff\xf8"))
->help("Long Indirect Call Using RPC")
->example("lcr *xar5")
->regnameind("xar5");
insert(mnem("lcr", 2, "\x3e\x66", "\xff\xf8"))
->help("Long Indirect Call Using RPC")
->example("lcr *xar6")
->regnameind("xar6");
insert(mnem("lcr", 2, "\x3e\x67", "\xff\xf8"))
->help("Long Indirect Call Using RPC")
->example("lcr *xar7")
->regnameind("xar7");
insert(mnem("loopnz", 4, "\x2e\x00\x00\x00", "\xff\x00\x00\x00"))
->help("Loop While Not Zero")
->example("loopnz @t, #0x0004")
->loc16("\x00\xff\x00\x00")
->imm("\x00\x00\xff\xff");
insert(mnem("loopz", 4, "\x2c\x00\x00\x00", "\xff\x00\x00\x00"))
->help("Loop While Zero")
->example("loopz @t, 0x0004")
->loc16("\x00\xff\x00\x00")
->imm("\x00\x00\xff\xff");
insert(mnem("lpaddr", 2, "\x56\x1e", "\xff\xff"))
->help("Set the AMODE Bit")
->example("lpaddr");
insert(mnem("lret", 2, "\x76\x14", "\xff\xff"))
->help("Long Return")
->example("lret");
insert(mnem("lrete", 2, "\x76\x10", "\xff\xff"))
->help("Long Return and Enable Interrupts")
->example("lrete");
insert(mnem("lretr", 2, "\x00\x06", "\xff\xff"))
->help("Long Return Using RPC")
->example("lretr");
// TODO: LSL ACC,#1..16 — Logical Shift Left
// TODO: LSL ACC,T — Logical Shift Left by T(3:0)
// TODO: LSL AX,#1...16 — Logical Shift Left
// TODO: LSL AX,T — Logical Shift Left by T(3:0)
// TODO: LSL64 ACC:P,#1..16 — Logical Shift Left
// TODO: LSL64 ACC:P,T — 64-Bit Logical Shift Left by T(5:0)
// TODO: LSLL ACC,T — Logical Shift Left by T (4:0)
insert(mnem("lsr", 2, "\xff\xc0", "\xff\xf0"))
->help("Logical Shift Right")
->example("lsr al, #1")
->regname("al")
->imm("\x00\x0f");
insert(mnem("lsr", 2, "\xff\xd0", "\xff\xf0"))
->help("Logical Shift Right")
->example("lsr ah, #1")
->regname("ah")
->imm("\x00\x0f");
// TODO: LSR AX,T — Logical Shift Right by T(3:0)
// TODO: LSR64 ACC:P,#1..16 — 64-Bit Logical Shift Right
// TODO: LSR64 ACC:P,T — 64-Bit Logical Shift Right by T(5:0)
// TODO: LSRL ACC,T — Logical Shift Right by T (4:0)
// TODO: MAC P,loc16,0:pma — Multiply and Accumulate
// TODO: MAC P ,loc16,*XAR7/++ — Multiply and Accumulate
// TODO: MAX AX, loc16 — Find the Maximum
// TODO: MAXCUL P,loc32 — Conditionally Find the Unsigned Maximum
// TODO: MAXL ACC,loc32 — Find the 32-bit Maximum
// TODO: MIN AX, loc16 — Find the Minimum
// TODO: MINCUL P,loc32 — Conditionally Find the Unsigned Minimum
// TODO: MINL ACC,loc32 — Find the 32-bit Minimum
// TODO: MOV *(0:16bit), loc16 — Move Value
// TODO: MOV ACC,#16bit<<#0..15 — Load Accumulator With Shift
// TODO: MOV ACC,loc16<<T — Load Accumulator With Shift
insert(mnem("mov", 2, "\x85\x00", "\xff\x00"))
->help("Load Accumulator With Shift")
->example("mov acc, @var << #0")
->regname("acc")
->loc16("\x00\xff"); // TODO: shift, objmode differences
insert(mnem("mov", 4, "\x56\x03\x00\x00", "\xff\xff\xf0\x00"))
->help("Load Accumulator With Shift")
->example("mov acc, @var << #10")
->regname("acc")
->loc16("\x00\x00\x00\xff")
->imm("\x00\x00\x0f\x00"); // TODO: shift, objmode differences
insert(mnem("mov", 2, "\x25\x00", "\xff\x00"))
->help("Load Accumulator With Shift")
->example("mov acc, @var << #16")
->regname("acc")
->loc16("\x00\xff"); // TODO: shift, objmode differences
// TODO: MOV AR6/7, loc16 — Load Auxiliary Register
insert(mnem("mov", 2, "\x92\x00", "\xff\x00"))
->help("Load AL")
->example("mov al, *+xar0[0]")
->regname("al")
->loc16("\x00\xff");
insert(mnem("mov", 2, "\x93\x00", "\xff\x00"))
->help("Load AH")
->example("mov ah, *+xar0[0]")
->regname("ah")
->loc16("\x00\xff");
// TODO: MOV DP, #10bit — Load Data-Page Pointer
// TODO: MOV IER,loc16 — Load the Interrupt-Enable Register
insert(mnem("mov", 4, "\x28\x00\x00\x00", "\xff\x00\x00\x00"))
->help("Save 16-bit Constant")
->example("mov @xar2++ #0xffff")
->loc16("\x00\xff\x00\x00")
->imm("\x00\x00\xff\xff");
// TODO: MOV loc16, *(0:16bit) — Move Value
insert(mnem("mov", 2, "\x2b\x00", "\xff\x00"))
->help("Clear 16-bit Location")
->example("mov *xar2++, #0")
->loc16("\x00\xff")
->const(0);
// TODO: MOV loc16,ACC << 1..8 — Save Low Word of Shifted Accumulator
// TODO: MOV loc16, ARn — Store 16-bit Auxiliary Register
insert(mnem("mov", 2, "\x96\x00", "\xff\x00"))
->help("Store AL")
->example("mov *xar2++, al")
->loc16("\x00\xff")
->regname("al");
insert(mnem("mov", 2, "\x97\x00", "\xff\x00"))
->help("Store AH")
->example("mov *xar2++, ah")
->loc16("\x00\xff")
->regname("ah");
// TODO: MOV loc16, AX, COND — Store AX Register Conditionally
insert(mnem("mov", 2, "\x20\x00", "\xff\x00"))
->help("Store Interrupt-Enable Register")
->example("mov *sp++, ier")
->loc16("\x00\xff")
->regname("ier");
insert(mnem("mov", 4, "\x56\x29\x00\x00", "\xff\xff\x00\xff"))
->help("Store the Overflow Counter")
->example("mov *sp++, ovc")
->loc16("\x00\x00\x00\xff")
->regname("ovc");
insert(mnem("mov", 2, "\x3f\x00", "\xff\x00"))
->help("Store Lower Half of Shifted P Register")
->example("mov @y32+0, p")
->loc16("\x00\xff")
->regname("p");
insert(mnem("mov", 2, "\x21\x00", "\xff\x00"))
->help("Store the T Register")
->example("mov @y32+0, p")
->loc16("\x00\xff")
->regname("t");
// TODO: MOV OVC, loc16 — Load the Overflow Counter
// TODO: MOV PH, loc16 — Load the High Half of the P Register
// TODO: MOV PL, loc16 — Load the Low Half of the P Register
// TODO: MOV PM, AX — Load Product Shift Mode
// TODO: MOV T, loc16 — Load the Upper Half of the XT Register
// TODO: MOV TL, #0 — Clear the Lower Half of the XT Register
// TODO: MOV XARn, PC — Save the Current Program Counter
// TODO: MOVA T,loc16 — Load T Register and Add Previous Product
// TODO: MOVAD T, loc16 — Load T Register
insert(mnem("movb", 2, "\x02\x00", "\xff\x00"))
->help("Load Accumulator With 8-bit Value")
->example("movb acc, #1")
->regname("acc")
->imm("\x00\xff");
// TODO: MOVB AR6/7, #8bit — Load Auxiliary Register With an 8-bit Constant
insert(mnem("movb", 2, "\x9a\x00", "\xff\x00"))
->help("Load AL With 8-bit Constant")
->example("movb al, #0xf0")
->regname("al")
->imm("\x00\xff");
insert(mnem("movb", 2, "\x9b\x00", "\xff\x00"))
->help("Load AH With 8-bit Constant")
->example("movb ah, #0xf0")
->regname("ah")
->imm("\x00\xff");
insert(mnem("movb", 2, "\xc6\x00", "\xff\x00"))
->help("Load Byte Value")
->example("movb al.lsb, *+xar2[3]")
->regname("al.lsb")
->loc16("\x00\xff");
insert(mnem("movb", 2, "\xc7\x00", "\xff\x00"))
->help("Load Byte Value")
->example("movb ah.lsb, *+xar2[3]")
->regname("ah.lsb")
->loc16("\x00\xff");
insert(mnem("movb", 2, "\x38\x00", "\xff\x00"))
->help("Load Byte Value")
->example("movb al.msb, *+xar2[1]")
->regname("al.msb")
->loc16("\x00\xff");
insert(mnem("movb", 2, "\x39\x00", "\xff\x00"))
->help("Load Byte Value")
->example("movb ah.msb, *+xar2[1]")
->regname("ah.msb")
->loc16("\x00\xff");
// TODO: MOVB loc16,#8bit,COND — Conditionally Save 8-bit Constant
// TODO: MOVB loc16, AX.LSB — Store LSB of AX Register
// TODO: MOVB loc16, AX.MSB — Store MSB of AX Register
// TODO: MOVB XARn, #8bit — Load Auxiliary Register With 8-bit Value
// TODO: MOVDL XT,loc32 — Store XT and Load New XT
// TODO: MOVH loc16,ACC << 1..8 — Description
// TODO: MOVH loc16, P — Save High Word of the P Register
insert(mnem("movl", 2, "\x06\x00", "\xff\x00"))
->help("Load Accumulator With 32 Bits")
->example("movl acc, @var")
->regname("acc")
->loc32("\x00\xff");
// TODO: MOVL ACC,P << PM — Load the Accumulator With Shifted P
insert(mnem("movl", 2, "\x1e\x00", "\xff\x00"))
->help("Store 32-bit Accumulator")
->example("movl @var, acc")
->loc32("\x00\xff")
->regname("acc");
// TODO: MOVL loc32,ACC,COND — Conditionally Store the Accumulator
// TODO: MOVL loc32,P — Store the P Register
// TODO: MOVL loc32, XARn — Store 32-bit Auxiliary Register
// TODO: MOVL loc32,XT — Store the XT Register
// TODO: MOVL P,ACC — Load P From the Accumulator
// TODO: MOVL P,loc32 — Load the P Register
// TODO: MOVL XARn, loc32 — Load 32-bit Auxiliary Register
insert(mnem("movl", 2, "\x8e\x00", "\xff\x00"))
->help("Load 32-bit Auxiliary Register")
->example("movl xar0, @acc")
->regname("xar0")
->loc32("\x00\xff");
insert(mnem("movl", 2, "\x8b\x00", "\xff\x00"))
->help("Load 32-bit Auxiliary Register")
->example("movl xar1, @acc")
->regname("xar1")
->loc32("\x00\xff");
insert(mnem("movl", 2, "\x86\x00", "\xff\x00"))
->help("Load 32-bit Auxiliary Register")
->example("movl xar2, @acc")
->regname("xar2")
->loc32("\x00\xff");
insert(mnem("movl", 2, "\x82\x00", "\xff\x00"))
->help("Load 32-bit Auxiliary Register")
->example("movl xar3, @acc")
->regname("xar3")
->loc32("\x00\xff");
insert(mnem("movl", 2, "\x8a\x00", "\xff\x00"))
->help("Load 32-bit Auxiliary Register")
->example("movl xar4, @acc")
->regname("xar4")
->loc32("\x00\xff");
insert(mnem("movl", 2, "\x83\x00", "\xff\x00"))
->help("Load 32-bit Auxiliary Register")
->example("movl xar5, @acc")
->regname("xar5")
->loc32("\x00\xff");
insert(mnem("movl", 2, "\xc4\x00", "\xff\x00"))
->help("Load 32-bit Auxiliary Register")
->example("movl xar6, @acc")
->regname("xar6")
->loc32("\x00\xff");
insert(mnem("movl", 2, "\xc5\x00", "\xff\x00"))
->help("Load 32-bit Auxiliary Register")
->example("movl xar7, @acc")
->regname("xar7")
->loc32("\x00\xff");
insert(mnem("movl", 4, "\x8d\x00\x00\x00", "\xff\xc0\x00\x00"))
->help("Load 32-bit Auxiliary Register With Constant Value")
->example("movl xar0, #0")
->regname("xar0")
->imm22("\x00\x3f\xff\xff");
insert(mnem("movl", 4, "\x8d\x40\x00\x00", "\xff\xc0\x00\x00"))
->help("Load 32-bit Auxiliary Register With Constant Value")
->example("movl xar1, #0")
->regname("xar1")
->imm22("\x00\x3f\xff\xff");
insert(mnem("movl", 4, "\x8d\x80\x00\x00", "\xff\xc0\x00\x00"))
->help("Load 32-bit Auxiliary Register With Constant Value")
->example("movl xar2, #0")
->regname("xar2")
->imm22("\x00\x3f\xff\xff");
insert(mnem("movl", 4, "\x8d\xc0\x00\x00", "\xff\xc0\x00\x00"))
->help("Load 32-bit Auxiliary Register With Constant Value")
->example("movl xar3, #0")
->regname("xar3")
->imm22("\x00\x3f\xff\xff");
insert(mnem("movl", 4, "\x8f\x00\x00\x00", "\xff\xc0\x00\x00"))
->help("Load 32-bit Auxiliary Register With Constant Value")
->example("movl xar4, #0")
->regname("xar4")
->imm22("\x00\x3f\xff\xff");
insert(mnem("movl", 4, "\x8f\x40\x00\x00", "\xff\xc0\x00\x00"))
->help("Load 32-bit Auxiliary Register With Constant Value")
->example("movl xar5, #0")
->regname("xar5")
->imm22("\x00\x3f\xff\xff");
insert(mnem("movl", 4, "\x76\x80\x00\x00", "\xff\xc0\x00\x00"))
->help("Load 32-bit Auxiliary Register With Constant Value")
->example("movl xar6, #0")
->regname("xar6")
->imm22("\x00\x3f\xff\xff");
insert(mnem("movl", 4, "\x76\xc0\x00\x00", "\xff\xc0\x00\x00"))
->help("Load 32-bit Auxiliary Register With Constant Value")
->example("movl xar7, #0")
->regname("xar7")
->imm22("\x00\x3f\xff\xff");
insert(mnem("movl", 2, "\x87\x00", "\xff\x00"))
->help("Load the XT Register")
->example("movl xt, @x2")
->regname("xt")
->loc32("\x00\xff");
// TODO: MOVP T,loc16 — Load the T Register and Store P in the Accumulator
// TODO: MOVS T,loc16 — Load T and Subtract P From the Accumulator
insert(mnem("movu", 2, "\x0e\x00", "\xff\x00"))
->help("Load Accumulator With Unsigned Word")
->example("movu acc, @al, @x2")
->regname("acc")
->loc16("\x00\xff");
// TODO: MOVU loc16,OVC — Store the Unsigned Overflow Counter
// TODO: MOVU OVC,loc16 — Load Overflow Counter With Unsigned Value
insert(mnem("movw", 4, "\x76\x1f\x00\x00", "\xff\xff\x00\x00"))
->help("Load the Entire Data Page")
->example("movw dp, #0xf012")
->regname("dp")
->imm("\x00\x00\xff\xff");
// TODO: MOVX TL,loc16 — Load Lower Half of XT With Sign Extension
insert(mnem("movz", 2, "\x58\x00", "\xff\x00"))
->help("Load Lower Half of XAR0 and Clear Upper Half")
->example("movz ar0, *+xar2[0]")
->regname("ar0")
->loc16("\x00\xff");
insert(mnem("movz", 2, "\x59\x00", "\xff\x00"))
->help("Load Lower Half of XAR1 and Clear Upper Half")
->example("movz ar1, *+xar2[0]")
->regname("ar1")
->loc16("\x00\xff");
insert(mnem("movz", 2, "\x5a\x00", "\xff\x00"))
->help("Load Lower Half of XAR2 and Clear Upper Half")
->example("movz ar2, *+xar2[0]")
->regname("ar2")
->loc16("\x00\xff");
insert(mnem("movz", 2, "\x5b\x00", "\xff\x00"))
->help("Load Lower Half of XAR3 and Clear Upper Half")
->example("movz ar3, *+xar2[0]")
->regname("ar3")
->loc16("\x00\xff");
insert(mnem("movz", 2, "\x5c\x00", "\xff\x00"))
->help("Load Lower Half of XAR4 and Clear Upper Half")
->example("movz ar4, *+xar2[0]")
->regname("ar4")
->loc16("\x00\xff");
insert(mnem("movz", 2, "\x5d\x00", "\xff\x00"))
->help("Load Lower Half of XAR5 and Clear Upper Half")
->example("movz ar5, *+xar2[0]")
->regname("ar5")
->loc16("\x00\xff");
insert(mnem("movz", 2, "\x88\x00", "\xff\x00"))
->help("Load Lower Half of XAR6 and Clear Upper Half")
->example("movz ar6, *+xar2[0]")
->regname("ar6")
->loc16("\x00\xff");
insert(mnem("movz", 2, "\x80\x00", "\xff\x00"))
->help("Load Lower Half of XAR7 and Clear Upper Half")
->example("movz ar7, *+xar2[0]")
->regname("ar7")
->loc16("\x00\xff");
// TODO: MOVZ DP, #10bit — Load Data Page and Clear High Bits
// TODO: MPY ACC,loc16, #16bit — 16 X 16-bit Multiply
// TODO: MPY ACC, T, loc16 — 16 X 16-bit Multiply
// TODO: MPY P,loc16,#16bit — 16 X 16-Bit Multiply
// TODO: MPY P,T,loc16 — 16 X 16 Multiply
// TODO: MPYA P,loc16,#16bit — 16 X 16-Bit Multiply and Add Previous Product
// TODO: MPYA P,T,loc16 — 16 X 16-bit Multiply and Add Previous Product
// TODO: MPYB ACC,T,#8bit — Multiply by 8-bit Constant
// TODO: MPYB P,T,#8bit — Multiply Signed Value by Unsigned 8-bit Constant
// TODO: MPYS P,T,loc16 — 16 X 16-bit Multiply and Subtract
// TODO: MPYU P,T,loc16 — Unsigned 16 X 16 Multiply
// TODO: MPYU ACC,T,loc16 — 16 X 16-bit Unsigned Multiply
// TODO: MPYXU ACC, T, loc16 — Multiply Signed Value by Unsigned Value
// TODO: MPYXU P,T,loc16 — Multiply Signed Value by Unsigned Value
// TODO: NASP — Unalign Stack Pointer
// TODO: NEG ACC — Negate Accumulator
// TODO: NEG AX — Negate AX Register
// TODO: NEG64 ACC:P — Negate Accumulator Register and Product Register
// TODO: NEGTC ACC — If TC is Equivalent to 1, Negate ACC
insert(mnem("nop", 2, "\x77\x00", "\xff\x00"))
->help("No Operation With Optional Indirect Address Modification")
->example("nop *,arp2")
->loc16("\x00\xff"); // TODO: This needs help
// TODO: NORM ACC, *ind — Normalize ACC and Modify Selected Auxiliary Register
// TODO: NORM ACC,XARn++/− − — Normalize ACC and Modify Selected Auxiliary Register
// TODO: NOT ACC — Complement Accumulator
// TODO: NOT AX — Complement AX Register
// TODO: OR ACC, loc16 — Bitwise OR
// TODO: OR ACC,#16bit << #0..16 — Bitwise OR
// TODO: OR AX, loc16 — Bitwise OR
// TODO: OR IER,#16bit — Bitwise OR
// TODO: OR IFR,#16bit — Bitwise OR
insert(mnem("or", 4, "\x1a\x00\x00\x00", "\xff\x00\x00\x00"))
->help("Bitwise OR")
->example("or @var, #(1 << 4 | 1 << 7)")
->loc16("\x00\xff\x00\x00")
->imm("\x00\x00\xff\xff");
insert(mnem("or", 2, "\x98\x00", "\xff\x00"))
->help("Bitwise OR")
->example("or @var, al")
->loc16("\x00\xff")
->regname("al");
insert(mnem("or", 2, "\x99\x00", "\xff\x00"))
->help("Bitwise OR")
->example("or @var, ah")
->loc16("\x00\xff")
->regname("ah");
// TODO: ORB AX,#8bit — Bitwise OR 8-bit Value
// TODO: OUT *(PA),loc16 — Output Data to Port
insert(mnem("pop", 2, "\x06\xbe", "\xff\xff"))
->help("Pop Top of Stack to Accumulator")
->example("pop acc")
->prioritize() // Remove conflict: movl acc, @sp
->regname("acc");
insert(mnem("pop", 2, "\x07\x76", "\xff\xff"))
->help("Pop Top of Stack to 16-bit Auxiliary Registers")
->example("pop ar1:ar0")
->prioritize() // Remove conflict: movl acc, @var
->regname("ar1:ar0");
insert(mnem("pop", 2, "\x05\x76", "\xff\xff"))
->help("Pop Top of Stack to 16-bit Auxiliary Registers")
->example("pop ar3:ar2")
->prioritize() // Remove conflict: movl acc, @var
->regname("ar3:ar2");
insert(mnem("pop", 2, "\x06\x76", "\xff\xff"))
->help("Pop Top of Stack to 16-bit Auxiliary Registers")
->example("pop ar5:ar4")
->prioritize() // Remove conflict: movl acc, @var
->regname("ar5:ar4");
insert(mnem("pop", 2, "\x03\x00", "\xff\xff"))
->help("Pop Top of Stack to Upper Half of Auxiliary Registers")
->example("pop ar1h:ar0h")
->prioritize() // Remove conflict: movl acc, @var
->regname("ar1h:ar0h");
insert(mnem("pop", 2, "\x76\x12", "\xff\xff"))
->help("Pop Top of Stack to DBGIER Register")
->example("pop dbgier")
->regname("dbgier");
insert(mnem("pop", 2, "\x76\x03", "\xff\xff"))
->help("Pop Top of Stack to DP Register")
->example("pop dp")
->regname("dp");
insert(mnem("pop", 2, "\x76\x01", "\xff\xff"))
->help("Pop Top of Stack to DP and ST1 Registers")
->example("pop dp:st1")
->regname("dp:st1");
insert(mnem("pop", 2, "\x00\x02", "\xff\xff"))
->help("Pop Top of Stack to IFR Register")
->example("pop ifr")
->regname("ifr");
insert(mnem("pop", 2, "\x2a\x00", "\xff\x00"))
->help("Pop Top of Stack to 16-bit Value")
->example("pop @t")
->loc16("\x00\xff");
insert(mnem("pop", 2, "\x76\x11", "\xff\xff"))
->help("Pop top of Stack to P Register")
->example("pop p")
->regname("p");
insert(mnem("pop", 2, "\x00\x07", "\xff\xff"))
->help("Pop top of Stack to RPC Register")
->example("pop rpc")
->regname("rpc");
insert(mnem("pop", 2, "\x76\x13", "\xff\xff"))
->help("Pop Top of Stack to ST0 Register")
->example("pop st0")
->regname("st0");
insert(mnem("pop", 2, "\x76\x00", "\xff\xff"))
->help("Pop Top of Stack to ST1 Register")
->example("pop st1")
->regname("st1");
insert(mnem("pop", 2, "\x76\x15", "\xff\xff"))
->help("Pop Top of Stack to T and ST0 Registers")
->example("pop t:st0")
->regname("t:st0");
insert(mnem("pop", 2, "\x8e\xbe", "\xff\xff"))
->help("Pop Top of Stack to 32-bit Auxiliary Register")
->example("pop xar0")
->prioritize() // Remove conflict: movl xar0, @acc
->regname("xar0");
insert(mnem("pop", 2, "\x8b\xbe", "\xff\xff"))
->help("Pop Top of Stack to 32-bit Auxiliary Register")
->example("pop xar1")
->prioritize() // Remove conflict: movl xar1, @acc
->regname("xar1");
insert(mnem("pop", 2, "\x86\xbe", "\xff\xff"))
->help("Pop Top of Stack to 32-bit Auxiliary Register")
->example("pop xar2")
->prioritize() // Remove conflict: movl xar2, @acc
->regname("xar2");
insert(mnem("pop", 2, "\x82\xbe", "\xff\xff"))
->help("Pop Top of Stack to 32-bit Auxiliary Register")
->example("pop xar3")
->prioritize() // Remove conflict: movl xar3, @acc
->regname("xar3");
insert(mnem("pop", 2, "\x8a\xbe", "\xff\xff"))
->help("Pop Top of Stack to 32-bit Auxiliary Register")
->example("pop xar4")
->prioritize() // Remove conflict: movl xar4, @acc
->regname("xar4");
insert(mnem("pop", 2, "\x83\xbe", "\xff\xff"))
->help("Pop Top of Stack to 32-bit Auxiliary Register")
->example("pop xar5")
->prioritize() // Remove conflict: movl xar5, @acc
->regname("xar5");
insert(mnem("pop", 2, "\xc4\xbe", "\xff\xff"))
->help("Pop Top of Stack to 32-bit Auxiliary Register")
->example("pop xar6")
->prioritize() // Remove conflict: movl xar6, @acc
->regname("xar6");
insert(mnem("pop", 2, "\xc5\xbe", "\xff\xff"))
->help("Pop Top of Stack to 32-bit Auxiliary Register")
->example("pop xar7")
->prioritize() // Remove conflict: movl xar7, @acc
->regname("xar7");
insert(mnem("pop", 2, "\x87\xbe", "\xff\xff"))
->help("Pop Top of Stack to XT Register")
->example("pop xt")
->prioritize() // Remove conflict: movl xt, @sp
->regname("xt");
// TODO: PREAD loc16,*XAR7 — Read From Program Memory
insert(mnem("push", 2, "\x1e\xbd", "\xff\xff"))
->help("Push Accumulator Onto Stack")
->example("push acc")
->prioritize() // Remove conlict: movl loc32, acc
->regname("acc");
insert(mnem("push", 2, "\x76\x0d", "\xff\xff"))
->help("Push 16-bit Auxiliary Registers Onto Stack")
->example("push ar1:ar0")
->regname("ar1:ar0");
insert(mnem("push", 2, "\x76\x0f", "\xff\xff"))
->help("Push 16-bit Auxiliary Registers Onto Stack")
->example("push ar3:ar2")
->regname("ar3:ar2");
insert(mnem("push", 2, "\x76\x0c", "\xff\xff"))
->help("Push 16-bit Auxiliary Registers Onto Stack")
->example("push ar5:ar4")
->regname("ar5:ar4");
insert(mnem("push", 2, "\x00\x05", "\xff\xff"))
->help("Push AR1H and AR0H Registers Onto Stack")
->example("push ar1h:ar0h")