forked from Arakula/A09
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patha09.c
More file actions
7070 lines (6580 loc) · 242 KB
/
a09.c
File metadata and controls
7070 lines (6580 loc) · 242 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
/* A09, 6809 Assembler.
(C) Copyright 1993,1994 L.C. Benschop.
Parts (C) Copyright 2001-2018 H. Seib.
This version of the program is distributed under the terms and conditions
of the GNU General Public License version 2. See file the COPYING for details.
THERE IS NO WARRANTY ON THIS PROGRAM.
Generates binary image file from the lowest to
the highest address with actually assembled data.
Machine dependencies:
char is 8 bits.
short is 16 bits.
integer arithmetic is twos complement.
syntax:
a09 [-{b|r|s|x|f}filename]|[-c] [-lfilename] [-ooption] [-dsym=value]* sourcefile.
Options
-c suppresses code output
-bfilename binary output file name (default name minus a09 suffix plus .bin)
-rfilename Flex9 RELASMB-compatible output file name (relocatable)
-sfilename s-record output file name (default its a binary file)
-xfilename intel hex output file name (-"-)
-ffilename Flex9 output file name (-"-)
-lfilename list file name (default no listing)
-dsym[=value] define a symbol
-oopt defines an option
recognized pseudoops:
ext defines an external symbol (relocating mode only)
extern -"-
public defines a public symbol (effective in relocating mode only)
macro defines a macro
exitm terminates a macro expansion
endm ends a macro definition
if
ifn
ifc
ifnc
else
endif
dup
endd
org
equ
set
setdp sets direct page in 6809 / 6309 mode
text
fcb
fcw
fdb
fcc
rmb
reg
end
include
title
nam
ttl
sttl
setpg
pag
spc
rep
rpt
repeat
opt define an option (see below for possible options)
err
abs force absolute mode
common
endcom
def
define
enddef
name
symlen
bin, binary includes a binary file at the current position
recognized options:
On | Off Meaning
------------------------------------------------------------
PAG | NOP* Page Formatting
CON | NOC* Print skipped conditional code
MAC*| NOM Print macro calling line
EXP | NOE* Print macro expansion lines
SYM*| NOS Print symbol table
MUL*| NMU Print multiple object code lines
LIS*| NOL Print assembler listing
LP1 | NO1* Print Pass 1 Listing
DAT*| NOD Print date in listing
NUM | NON* Print line numbers
INV | NOI* Print invisible lines
TSC | NOT* Strict TSC Compatibility
WAR*| NOW Print warnings
CLL*| NCL Check line length
LFN | NLF* Print long file names
LLL*| NLL List library lines
GAS | NOG* Gnu AS source style compatibility
REL*| NOR Print Relocation table in Relocating mode
M68*| H63|M00|M01 MC6809 / HD6309 / MC6800 / MC6801 mode
| M02|M03|M08 MC6802 / MC6803 / MC6808 mode
| M09 MC6809 mode
TXT | NTX* Print text table
LPA | LNP* Listing in f9dasm patch format
DLM | NDL* Define label on macro expansion
* denotes default value
v0.1 93/11/03 Initial version.
v0.2 94/03/21 Fixed PC relative addressing bug
Added SET, SETDP, INCLUDE. IF/ELSE/ENDIF
No macros yet, and no separate linkable modules.
v0.1.X 99/12/20 added Intel hex option (SLB)
-- H.Seib Additions: --
v0.2.S 01/10/13 converted to readable format
v0.3 01/10/15 added transfer address processing
increased max. #symbols and other constants
(hey, this isn't CP/M anymore :-)
added a bit of intelligence to command line processing
loads file(s) into internal storage prior to processing
(this aids a lot in preventing recursive invocations)
added LIB,LIBRARY pseudoop (same as INCLUDE)
added OPT,OPTION pseudoop
v0.4 01/10/22 added -t switch to increase compatibility with the
TSC FLEX Assembler line, which uses a slightly more
rigid source file format
v0.5 01/10/23 added SETPG, SETLI, PAG, SPC, NAM(TTL,TITLE), STTL, REP(RPT,REPEAT)
v0.6 01/10/23 added EXITM, IFN, IFC, IFNC, DUP, ENDD
v0.7 01/10/29 added REG, ERR, TEXT
v0.8 01/10/30 converted command line handling to -O switch for options
and added a bunch of options
RZB pseudoop added
v0.9 01/11/05 clean-ups, increased TSC FLEX Assembler compatibility
v0.10 01/11/15 ASM and VERSION texts predefined
v0.11 01/11/27 increased TSC FLEX Assembler compatibility (labels made case sensitive)
v0.12 01/11/28 added some convenience mnemonics and simulated 6800 instructions to
increase TSC FLEX Assembler compatibility
v1.02 01/04/11 check for address range overlaps implemented
v1.03 02/09/24 macro parser had an error; corrected
v1.04 02/12/10 error message output adjusted for Visual C++ 6.0 IDE compatibility
added OPT LFN/NLF for that purpose
v1.05 02/12/23 crude form of backwards ORG added to binary output
v1.06 03/06/10 added OPT LLL/NLL to include/suppress listing of LIB lines
v1.07 03/06/23 outsymtable() only starts with a page feed if current line
is is NOT the first line on a page
v1.08 03/07/01 SKIP count for the IF(N) and IF(N)C statements added to
normal statements (i.e., outside macro definitions)
v1.09 05/06/02 some cleanups
added -r format for FLEX9 RELASMB compatible output
added ABS, GLOBAL, EXT, DEFINE, ENDDEF, COMMON, ENDCOM
REL|NOR option added
GAS|NOG option added (rudimentary)
M68|H63 option added
v1.10 05/06/03 made options available as numeric strings
added local label support
added SYMLEN
TXT|NTX option added
v1.11 05/06/06 IFD/IFND directives added
added special checks for "0,-[-]indexreg" and "0,indexreg+[+]"
when determining the postbyte for indexed addressing modes
v1.12 05/06/20 OPT CON|NOC correctly implemented
v1.13 skipped for users that might have an uneasy feeling about
the number "13" >:-)
v1.14 05/08/01 text symbol replacement enhanced; it was a bit TOO general.
Now, &xxx is only treated as a text variable when xxx REALLY
is a text symbol; in all other cases, it's not preprocessed.
Let the assembler engine handle eventual errors.
Thanks to Peter from Australia for pointing this out!
v1.15 05/08/02 only 1 local label was allowed per address; now, as many as
possible can be at the same location.
Thanks to Peter from Australia for pointing this out!
v1.16 05/08/05 SETDP is illegal in relocating mode!
SETDP without any parameter DISABLES Direct mode entirely.
Cured an interesting bug... the following sequence:
ORG 1
LDA TEST
SHIT NOP
ORG 1
TEST RMB 1
caused a phase error; this was caused by the invalid
assumption in scanlabel() that forward references have
a higher memory location than the current address.
Thanks to Peter from Australia for pointing this out!
v1.17 05/08/08 made tests for above problem more rigorous; now ANY forward
reference to a label that's not yet defined is treated as
uncertain.
Removed a nasty bug that caused the following code to produce
incorrect values:
org $8000 (anything >= $8000 will do)
lbl rmb 8
SizeBad equ (*-lbl)/2
OPT NOL changed to OPT NO1 to allow implementing OPT LIS|NOL.
OPT LIS*|NOL added
Thanks to Peter from Australia for pointing these out!
v1.18 05/08/09 backward search for local labels now searches for "<= local
address" instead of "< local address"
Thanks to Peter from Australia for pointing this out!
Added INCD / DECD convenience mnemonics
(realized as ADDD/SUBD 1)
v1.19 05/08/10 Added a bunch of 6800-style mnemonics; if they conflict
with 6809 mnemonics ("INC A" for example), they are only
active in TSC mode
v1.20 05/08/16 changed special checks for
"0,-[-]indexreg" and "0,indexreg+[+]"
to include all known labels and changed the scope to
",[-[-]]indexreg[+[+]]"
v1.21 06/02/21 Bug in "xxx >0,reg" found by Margus Kliimask
v1.22 08/09/03 Addded BIN(ARY) pseudo-op to include binary files
v1.23 09/02/13 6800 code generation added
accept multiple input files (first one defines default
output and listing file names)
v1.24 09/02/13 made compilable with gcc
v1.25 09/03/05 6800 alternate mnemonics work better now
v1.26 09/03/14 assembling DOS format files in Loonix works better now
v1.27 10/01/20 LPA/NLP options added
v1.28 10/04/21 INCD/DECD produced invalid code
v1.29 15/06/19 M01/M02/M03/M08 options added
v1.30 15/06/22 PHASE/DEPHASE pseudo-ops added
v1.31 15/07/15 6301/6303 support added
v1.32 15/08/19 FCQ/FQB pseudo-ops added
v1.33 15/08/28 Macro problems (found by Bob Grieb) fixed
v1.34 15/09/09 More macro problems (found by Bob Grieb) fixed
v1.35 15/09/11 Corrected an oversight in the special checks for
"0,-[-]indexreg" and "0,indexreg+[+]"
v1.36 15/09/25 BSZ,ZMB pseudo-ops added (AS9-compatible alternatives
to RZB)
FILL <value>,<byte_count> psudo-op added
v1.37 16/06/16 DLM|NDL* options added; see
https://github.com/Arakula/A09/issues/1
for details.
v1.38 18/12/06 corrected 6801/6301 errors in JSR/STD processing
as reported by M. Hepperle - thank you!
*/
/* @see https://stackoverflow.com/questions/2989810/which-cross-platform-preprocessor-defines-win32-or-win32-or-win32
or http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system
*/
#if !defined(_WIN32) && !defined(_WIN64) && (defined(__unix__) \
|| defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
/* UNIX-style OS. ------------------------------------------- */
#define UNIX 1 /* set to != 0 for UNIX specials */
#include <unistd.h> /* import unlink */
#else
#define UNIX 0 /* set to != 0 for UNIX specials */
#endif
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#if !UNIX
#include <malloc.h>
#endif
#include <stdarg.h>
#include <stdlib.h>
#include <time.h>
/*****************************************************************************/
/* Definitions */
/*****************************************************************************/
#define VERSION "1.38"
#define VERSNUM "$0126" /* can be queried as &VERSION */
#define MAXLABELS 8192
#define MAXMACROS 1024
#define MAXTEXTS 1024
#define MAXRELOCS 32768
#define MAXIDLEN 32
#define MAXLISTBYTES 7
#define FNLEN 256
#define LINELEN 1024
/*****************************************************************************/
/* Line buffer definitions */
/*****************************************************************************/
struct linebuf
{
struct linebuf * next; /* pointer to next line */
struct linebuf * prev; /* pointer to previous line */
char *fn; /* pointer to original file name */
long ln; /* line number therein */
unsigned char lvl; /* line level */
unsigned char rel; /* relocation mode */
char txt[1]; /* text buffer */
};
char *fnms[128] = {0}; /* we process up to 128 different fls*/
short nfnms; /* # loaded files */
/* special bits in lvl : */
#define LINCAT_MACDEF 0x20 /* macro definition */
#define LINCAT_MACEXP 0x40 /* macro expansion */
#define LINCAT_MACINV (0x20|0x40) /* macro invocation */
#define LINCAT_INVISIBLE 0x80 /* does not appear in listing */
#define LINCAT_LVLMASK 0x1F /* mask for line levels (0..31) */
/* Helpers for the above */
#define LINE_IS_MACDEF(lvl) ((lvl & LINCAT_MACINV) == LINCAT_MACDEF)
#define LINE_IS_MACEXP(lvl) ((lvl & LINCAT_MACINV) == LINCAT_MACEXP)
#define LINE_IS_MACINV(lvl) ((lvl & LINCAT_MACINV) == LINCAT_MACINV)
#define LINE_IS_INVISIBLE(lvl) (lvl & LINCAT_INVISIBLE)
struct linebuf *rootline = NULL; /* pointer to 1st line of the file */
struct linebuf *curline = NULL; /* pointer to currently processed ln */
/*****************************************************************************/
/* Opcode definitions */
/*****************************************************************************/
struct oprecord
{
char * name; /* opcode mnemonic */
unsigned short cat; /* opcode category */
unsigned long code; /* category-dependent additional code*/
};
/* Instruction categories : */
#define OPCAT_ONEBYTE 0x00 /* one byte opcodes NOP */
#define OPCAT_TWOBYTE 0x01 /* two byte opcodes SWI2 */
#define OPCAT_THREEBYTE 0x02 /* three byte opcodes TAB */
#define OPCAT_FOURBYTE 0x03 /* four byte opcodes ABA */
#define OPCAT_IMMBYTE 0x04 /* opcodes w. imm byte ANDCC */
#define OPCAT_LEA 0x05 /* load effective address LEAX */
#define OPCAT_SBRANCH 0x06 /* short branches BGE */
#define OPCAT_LBR2BYTE 0x07 /* long branches 2 byte opc LBGE */
#define OPCAT_LBR1BYTE 0x08 /* long branches 2 byte opc LBRA */
#define OPCAT_ARITH 0x09 /* accumulator instr. ADDA */
#define OPCAT_DBLREG1BYTE 0x0a /* double reg instr 1 byte opc LDX */
#define OPCAT_DBLREG2BYTE 0x0b /* double reg instr 2 byte opc LDY */
#define OPCAT_SINGLEADDR 0x0c /* single address instrs NEG */
#define OPCAT_2REG 0x0d /* 2 register instr TFR,EXG */
#define OPCAT_STACK 0x0e /* stack instr PSHx,PULx */
#define OPCAT_BITDIRECT 0x0f /* direct bitmanipulation AIM */
#define OPCAT_BITTRANS 0x10 /* direct bit transfer BAND */
#define OPCAT_BLOCKTRANS 0x11 /* block transfer TFM */
#define OPCAT_IREG 0x12 /* inter-register operations ADCR */
#define OPCAT_QUADREG1BYTE 0x13 /* quad reg instr 1 byte opc LDQ */
#define OPCAT_2IMMBYTE 0x14 /* 2byte opcode w. imm byte BITMD */
#define OPCAT_2ARITH 0x15 /* 2byte opcode accum. instr. SUBE */
#define OPCAT_ACCARITH 0x16 /* acc. instr. w.explicit acc ADD */
#define OPCAT_IDXEXT 0x17 /* indexed/extended, 6800-style JMP */
#define OPCAT_ACCADDR 0x18 /* single address instrs, 6800 NEG */
#define OPCAT_PSEUDO 0x3f /* pseudo-ops */
#define OPCAT_6309 0x40 /* valid for 6309 only! */
#define OPCAT_NOIMM 0x80 /* immediate not allowed! STD */
#define OPCAT_6301 0x100 /* valid for 6301 only! */
/* the various Pseudo-Ops */
#define PSEUDO_RMB 0
#define PSEUDO_ELSE 1
#define PSEUDO_END 2
#define PSEUDO_ENDIF 3
#define PSEUDO_ENDM 4
#define PSEUDO_EQU 5
#define PSEUDO_EXT 6
#define PSEUDO_FCB 7
#define PSEUDO_FCC 8
#define PSEUDO_FCW 9
#define PSEUDO_IF 10
#define PSEUDO_MACRO 11
#define PSEUDO_ORG 12
#define PSEUDO_PUB 13
#define PSEUDO_SETDP 14
#define PSEUDO_SET 15
#define PSEUDO_INCLUDE 16
#define PSEUDO_OPT 17
#define PSEUDO_NAM 18
#define PSEUDO_STTL 19
#define PSEUDO_PAG 20
#define PSEUDO_SPC 21
#define PSEUDO_REP 22
#define PSEUDO_SETPG 23
#define PSEUDO_SETLI 24
#define PSEUDO_EXITM 25
#define PSEUDO_IFN 26
#define PSEUDO_IFC 27
#define PSEUDO_IFNC 28
#define PSEUDO_DUP 29
#define PSEUDO_ENDD 30
#define PSEUDO_REG 31
#define PSEUDO_ERR 32
#define PSEUDO_TEXT 33
#define PSEUDO_RZB 34
#define PSEUDO_ABS 35
#define PSEUDO_DEF 36
#define PSEUDO_ENDDEF 37
#define PSEUDO_COMMON 38
#define PSEUDO_ENDCOM 39
#define PSEUDO_NAME 40
#define PSEUDO_SYMLEN 41
#define PSEUDO_IFD 42
#define PSEUDO_IFND 43
#define PSEUDO_BINARY 44
#define PSEUDO_PHASE 45
#define PSEUDO_DEPHASE 46
#define PSEUDO_FCQ 47
#define PSEUDO_FILL 48
struct oprecord optable09[]=
{
{ "ABA", OPCAT_FOURBYTE, 0x3404abe0 },
{ "ABS", OPCAT_PSEUDO, PSEUDO_ABS },
{ "ABX", OPCAT_ONEBYTE, 0x3a },
{ "ABY", OPCAT_TWOBYTE, 0x31a5 },
{ "ADC", OPCAT_ACCARITH, 0x89 },
{ "ADCA", OPCAT_ARITH, 0x89 },
{ "ADCB", OPCAT_ARITH, 0xc9 },
{ "ADCD", OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x1089 },
{ "ADCR", OPCAT_6309 |
OPCAT_IREG, 0x1031 },
{ "ADD", OPCAT_ACCARITH, 0x8b },
{ "ADDA", OPCAT_ARITH, 0x8b },
{ "ADDB", OPCAT_ARITH, 0xcb },
{ "ADDD", OPCAT_DBLREG1BYTE, 0xc3 },
{ "ADDE", OPCAT_6309 |
OPCAT_2ARITH, 0x118b },
{ "ADDF", OPCAT_6309 |
OPCAT_2ARITH, 0x11cb },
{ "ADDR", OPCAT_6309 |
OPCAT_IREG, 0x1030 },
{ "ADDW", OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x108b },
{ "AIM", OPCAT_6309 |
OPCAT_BITDIRECT, 0x02 },
{ "AND", OPCAT_ACCARITH, 0x84 },
{ "ANDA", OPCAT_ARITH, 0x84 },
{ "ANDB", OPCAT_ARITH, 0xc4 },
{ "ANDCC", OPCAT_IMMBYTE, 0x1c },
{ "ANDD", OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x1084 },
{ "ANDR", OPCAT_6309 |
OPCAT_IREG, 0x1034 },
{ "ASL", OPCAT_SINGLEADDR, 0x08 },
{ "ASLA", OPCAT_ONEBYTE, 0x48 },
{ "ASLB", OPCAT_ONEBYTE, 0x58 },
{ "ASLD", OPCAT_TWOBYTE, 0x5849 },
{ "ASLD63", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1048 },
{ "ASR", OPCAT_SINGLEADDR, 0x07 },
{ "ASRA", OPCAT_ONEBYTE, 0x47 },
{ "ASRB", OPCAT_ONEBYTE, 0x57 },
{ "ASRD", OPCAT_TWOBYTE, 0x4756 },
{ "ASRD63", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1047 },
{ "BAND", OPCAT_6309 |
OPCAT_BITTRANS, 0x1130 },
{ "BCC", OPCAT_SBRANCH, 0x24 },
{ "BCS", OPCAT_SBRANCH, 0x25 },
{ "BEC", OPCAT_SBRANCH, 0x24 },
{ "BEOR", OPCAT_6309 |
OPCAT_BITTRANS, 0x1134 },
{ "BEQ", OPCAT_SBRANCH, 0x27 },
{ "BES", OPCAT_SBRANCH, 0x25 },
{ "BGE", OPCAT_SBRANCH, 0x2c },
{ "BGT", OPCAT_SBRANCH, 0x2e },
{ "BHI", OPCAT_SBRANCH, 0x22 },
{ "BHS", OPCAT_SBRANCH, 0x24 },
{ "BIAND", OPCAT_6309 |
OPCAT_BITTRANS, 0x1131 },
{ "BIEOR", OPCAT_6309 |
OPCAT_BITTRANS, 0x1135 },
{ "BIN", OPCAT_PSEUDO, PSEUDO_BINARY },
{ "BINARY", OPCAT_PSEUDO, PSEUDO_BINARY },
{ "BIOR", OPCAT_6309 |
OPCAT_BITTRANS, 0x1133 },
{ "BIT", OPCAT_ACCARITH, 0x85 },
{ "BITA", OPCAT_ARITH, 0x85 },
{ "BITB", OPCAT_ARITH, 0xc5 },
{ "BITD", OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x1085 },
{ "BITMD", OPCAT_6309 |
OPCAT_2IMMBYTE, 0x113c },
{ "BLE", OPCAT_SBRANCH, 0x2f },
{ "BLO", OPCAT_SBRANCH, 0x25 },
{ "BLS", OPCAT_SBRANCH, 0x23 },
{ "BLT", OPCAT_SBRANCH, 0x2d },
{ "BMI", OPCAT_SBRANCH, 0x2b },
{ "BNE", OPCAT_SBRANCH, 0x26 },
{ "BOR", OPCAT_6309 |
OPCAT_BITTRANS, 0x1132 },
{ "BPL", OPCAT_SBRANCH, 0x2a },
{ "BRA", OPCAT_SBRANCH, 0x20 },
{ "BRN", OPCAT_SBRANCH, 0x21 },
{ "BSR", OPCAT_SBRANCH, 0x8d },
{ "BSZ", OPCAT_PSEUDO, PSEUDO_RZB }, // AS9 style
{ "BVC", OPCAT_SBRANCH, 0x28 },
{ "BVS", OPCAT_SBRANCH, 0x29 },
{ "CBA", OPCAT_FOURBYTE, 0x3404a1e0 },
{ "CLC", OPCAT_TWOBYTE, 0x1cfe },
{ "CLF", OPCAT_TWOBYTE, 0x1cbf },
{ "CLI", OPCAT_TWOBYTE, 0x1cef },
{ "CLIF", OPCAT_TWOBYTE, 0x1caf },
{ "CLR", OPCAT_SINGLEADDR, 0x0f },
{ "CLRA", OPCAT_ONEBYTE, 0x4f },
{ "CLRB", OPCAT_ONEBYTE, 0x5f },
{ "CLRD", OPCAT_TWOBYTE, 0x4f5f },
{ "CLRD63", OPCAT_6309 |
OPCAT_TWOBYTE, 0x104f },
{ "CLRE", OPCAT_6309 |
OPCAT_TWOBYTE, 0x114f },
{ "CLRF", OPCAT_6309 |
OPCAT_TWOBYTE, 0x115f },
{ "CLRW", OPCAT_6309 |
OPCAT_TWOBYTE, 0x105f },
{ "CLV", OPCAT_TWOBYTE, 0x1cfd },
{ "CLZ", OPCAT_TWOBYTE, 0x1cfb },
{ "CMP", OPCAT_ACCARITH, 0x81 },
{ "CMPA", OPCAT_ARITH, 0x81 },
{ "CMPB", OPCAT_ARITH, 0xc1 },
{ "CMPD", OPCAT_DBLREG2BYTE, 0x1083 },
{ "CMPE", OPCAT_6309 |
OPCAT_2ARITH, 0x1181 },
{ "CMPF", OPCAT_6309 |
OPCAT_2ARITH, 0x11c1 },
{ "CMPR", OPCAT_6309 |
OPCAT_IREG, 0x1037 },
{ "CMPS", OPCAT_DBLREG2BYTE, 0x118c },
{ "CMPU", OPCAT_DBLREG2BYTE, 0x1183 },
{ "CMPW", OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x1081 },
{ "CMPX", OPCAT_DBLREG1BYTE, 0x8c },
{ "CMPY", OPCAT_DBLREG2BYTE, 0x108c },
{ "COM", OPCAT_SINGLEADDR, 0x03 },
{ "COMA", OPCAT_ONEBYTE, 0x43 },
{ "COMB", OPCAT_ONEBYTE, 0x53 },
{ "COMD", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1043 },
{ "COME", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1143 },
{ "COMF", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1153 },
{ "COMW", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1053 },
{ "COMMON", OPCAT_PSEUDO, PSEUDO_COMMON },
{ "CPD", OPCAT_DBLREG2BYTE, 0x1083 },
{ "CPX", OPCAT_DBLREG1BYTE, 0x8c },
{ "CPY", OPCAT_DBLREG2BYTE, 0x108c },
{ "CWAI", OPCAT_IMMBYTE, 0x3c },
{ "DAA", OPCAT_ONEBYTE, 0x19 },
{ "DEC", OPCAT_SINGLEADDR, 0x0a },
{ "DECA", OPCAT_ONEBYTE, 0x4a },
{ "DECB", OPCAT_ONEBYTE, 0x5a },
{ "DECD", OPCAT_THREEBYTE, 0x830001 },
{ "DECD63", OPCAT_6309 |
OPCAT_TWOBYTE, 0x104a },
{ "DECE", OPCAT_6309 |
OPCAT_TWOBYTE, 0x114a },
{ "DECF", OPCAT_6309 |
OPCAT_TWOBYTE, 0x115a },
{ "DECW", OPCAT_6309 |
OPCAT_TWOBYTE, 0x105a },
{ "DEF", OPCAT_PSEUDO, PSEUDO_DEF },
{ "DEFINE", OPCAT_PSEUDO, PSEUDO_DEF },
{ "DEPHASE", OPCAT_PSEUDO, PSEUDO_DEPHASE },
{ "DES", OPCAT_TWOBYTE, 0x327f },
{ "DEU", OPCAT_TWOBYTE, 0x335f },
{ "DEX", OPCAT_TWOBYTE, 0x301f },
{ "DEY", OPCAT_TWOBYTE, 0x313f },
{ "DIVD", OPCAT_6309 |
OPCAT_2ARITH, 0x118d },
{ "DIVQ", OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x118e },
{ "DUP", OPCAT_PSEUDO, PSEUDO_DUP },
{ "EIM", OPCAT_6309 |
OPCAT_BITDIRECT, 0x05 },
{ "ELSE", OPCAT_PSEUDO, PSEUDO_ELSE },
{ "END", OPCAT_PSEUDO, PSEUDO_END },
{ "ENDCOM", OPCAT_PSEUDO, PSEUDO_ENDCOM },
{ "ENDD", OPCAT_PSEUDO, PSEUDO_ENDD },
{ "ENDDEF", OPCAT_PSEUDO, PSEUDO_ENDDEF },
{ "ENDIF", OPCAT_PSEUDO, PSEUDO_ENDIF },
{ "ENDM", OPCAT_PSEUDO, PSEUDO_ENDM },
{ "EOR", OPCAT_ACCARITH, 0x88 },
{ "EORA", OPCAT_ARITH, 0x88 },
{ "EORB", OPCAT_ARITH, 0xc8 },
{ "EORD", OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x1088 },
{ "EORR", OPCAT_6309 |
OPCAT_IREG, 0x1036 },
{ "EQU", OPCAT_PSEUDO, PSEUDO_EQU },
{ "ERR", OPCAT_PSEUDO, PSEUDO_ERR },
{ "EXG", OPCAT_2REG, 0x1e },
{ "EXITM", OPCAT_PSEUDO, PSEUDO_EXITM },
{ "EXT", OPCAT_PSEUDO, PSEUDO_EXT },
{ "EXTERN", OPCAT_PSEUDO, PSEUDO_EXT },
{ "FCB", OPCAT_PSEUDO, PSEUDO_FCB },
{ "FCC", OPCAT_PSEUDO, PSEUDO_FCC },
{ "FCQ", OPCAT_6309 |
OPCAT_PSEUDO, PSEUDO_FCQ },
{ "FCW", OPCAT_PSEUDO, PSEUDO_FCW },
{ "FDB", OPCAT_PSEUDO, PSEUDO_FCW },
{ "FILL", OPCAT_PSEUDO, PSEUDO_FILL },
{ "FQB", OPCAT_6309 |
OPCAT_PSEUDO, PSEUDO_FCQ },
{ "GLOBAL", OPCAT_PSEUDO, PSEUDO_PUB },
{ "IF", OPCAT_PSEUDO, PSEUDO_IF },
{ "IFC", OPCAT_PSEUDO, PSEUDO_IFC },
{ "IFD", OPCAT_PSEUDO, PSEUDO_IFD },
{ "IFN", OPCAT_PSEUDO, PSEUDO_IFN },
{ "IFNC", OPCAT_PSEUDO, PSEUDO_IFNC },
{ "IFND", OPCAT_PSEUDO, PSEUDO_IFND },
{ "INC", OPCAT_SINGLEADDR, 0x0c },
{ "INCA", OPCAT_ONEBYTE, 0x4c },
{ "INCB", OPCAT_ONEBYTE, 0x5c },
{ "INCD", OPCAT_THREEBYTE, 0xc30001 },
{ "INCD63", OPCAT_6309 |
OPCAT_TWOBYTE, 0x104c },
{ "INCE", OPCAT_6309 |
OPCAT_TWOBYTE, 0x114c },
{ "INCF", OPCAT_6309 |
OPCAT_TWOBYTE, 0x115c },
{ "INCLUDE", OPCAT_PSEUDO, PSEUDO_INCLUDE },
{ "INCW", OPCAT_6309 |
OPCAT_TWOBYTE, 0x105c },
{ "INS", OPCAT_TWOBYTE, 0x3261 },
{ "INU", OPCAT_TWOBYTE, 0x3341 },
{ "INX", OPCAT_TWOBYTE, 0x3001 },
{ "INY", OPCAT_TWOBYTE, 0x3121 },
{ "JMP", OPCAT_SINGLEADDR, 0x0e },
{ "JSR", OPCAT_DBLREG1BYTE, 0x8d },
{ "LBCC", OPCAT_LBR2BYTE, 0x1024 },
{ "LBCS", OPCAT_LBR2BYTE, 0x1025 },
{ "LBEC", OPCAT_LBR2BYTE, 0x1024 },
{ "LBEQ", OPCAT_LBR2BYTE, 0x1027 },
{ "LBES", OPCAT_LBR2BYTE, 0x1025 },
{ "LBGE", OPCAT_LBR2BYTE, 0x102c },
{ "LBGT", OPCAT_LBR2BYTE, 0x102e },
{ "LBHI", OPCAT_LBR2BYTE, 0x1022 },
{ "LBHS", OPCAT_LBR2BYTE, 0x1024 },
{ "LBLE", OPCAT_LBR2BYTE, 0x102f },
{ "LBLO", OPCAT_LBR2BYTE, 0x1025 },
{ "LBLS", OPCAT_LBR2BYTE, 0x1023 },
{ "LBLT", OPCAT_LBR2BYTE, 0x102d },
{ "LBMI", OPCAT_LBR2BYTE, 0x102b },
{ "LBNE", OPCAT_LBR2BYTE, 0x1026 },
{ "LBPL", OPCAT_LBR2BYTE, 0x102a },
{ "LBRA", OPCAT_LBR1BYTE, 0x16 },
{ "LBRN", OPCAT_LBR2BYTE, 0x1021 },
{ "LBSR", OPCAT_LBR1BYTE, 0x17 },
{ "LBVC", OPCAT_LBR2BYTE, 0x1028 },
{ "LBVS", OPCAT_LBR2BYTE, 0x1029 },
{ "LD", OPCAT_ACCARITH, 0x86 },
{ "LDA", OPCAT_ARITH, 0x86 },
{ "LDAA", OPCAT_ARITH, 0x86 },
{ "LDAB", OPCAT_ARITH, 0xc6 },
{ "LDAD", OPCAT_DBLREG1BYTE, 0xcc },
{ "LDB", OPCAT_ARITH, 0xc6 },
{ "LDBT", OPCAT_6309 |
OPCAT_BITTRANS, 0x1136 },
{ "LDD", OPCAT_DBLREG1BYTE, 0xcc },
{ "LDE", OPCAT_6309 |
OPCAT_2ARITH, 0x1186 },
{ "LDF", OPCAT_6309 |
OPCAT_2ARITH, 0x11c6 },
{ "LDMD", OPCAT_6309 |
OPCAT_2IMMBYTE, 0x113d },
{ "LDQ", OPCAT_6309 |
OPCAT_QUADREG1BYTE,0x10cc },
{ "LDS", OPCAT_DBLREG2BYTE, 0x10ce },
{ "LDU", OPCAT_DBLREG1BYTE, 0xce },
{ "LDW", OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x1086 },
{ "LDX", OPCAT_DBLREG1BYTE, 0x8e },
{ "LDY", OPCAT_DBLREG2BYTE, 0x108e },
{ "LEAS", OPCAT_LEA, 0x32 },
{ "LEAU", OPCAT_LEA, 0x33 },
{ "LEAX", OPCAT_LEA, 0x30 },
{ "LEAY", OPCAT_LEA, 0x31 },
{ "LIB", OPCAT_PSEUDO, PSEUDO_INCLUDE },
{ "LIBRARY", OPCAT_PSEUDO, PSEUDO_INCLUDE },
{ "LSL", OPCAT_SINGLEADDR, 0x08 },
{ "LSLA", OPCAT_ONEBYTE, 0x48 },
{ "LSLB", OPCAT_ONEBYTE, 0x58 },
{ "LSLD", OPCAT_TWOBYTE, 0x5849 },
{ "LSLD63", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1048 },
{ "LSR", OPCAT_SINGLEADDR, 0x04 },
{ "LSRA", OPCAT_ONEBYTE, 0x44 },
{ "LSRB", OPCAT_ONEBYTE, 0x54 },
{ "LSRD", OPCAT_TWOBYTE, 0x4456 },
{ "LSRD63", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1044 },
{ "LSRW", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1054 },
{ "MACRO", OPCAT_PSEUDO, PSEUDO_MACRO },
{ "MUL", OPCAT_ONEBYTE, 0x3d },
{ "MULD", OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x118f },
{ "NAM", OPCAT_PSEUDO, PSEUDO_NAM },
{ "NAME", OPCAT_PSEUDO, PSEUDO_NAME },
{ "NEG", OPCAT_SINGLEADDR, 0x00 },
{ "NEGA", OPCAT_ONEBYTE, 0x40 },
{ "NEGB", OPCAT_ONEBYTE, 0x50 },
{ "NEGD", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1040 },
{ "NOP", OPCAT_ONEBYTE, 0x12 },
{ "OIM", OPCAT_6309 |
OPCAT_BITDIRECT, 0x01 },
{ "OPT", OPCAT_PSEUDO, PSEUDO_OPT },
{ "OPTION", OPCAT_PSEUDO, PSEUDO_OPT },
{ "ORA", OPCAT_ARITH, 0x8a },
{ "ORAA", OPCAT_ARITH, 0x8a },
{ "ORAB", OPCAT_ARITH, 0xca },
{ "ORB", OPCAT_ARITH, 0xca },
{ "ORCC", OPCAT_IMMBYTE, 0x1a },
{ "ORD", OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x108a },
{ "ORG", OPCAT_PSEUDO, PSEUDO_ORG },
{ "ORR", OPCAT_6309 |
OPCAT_IREG, 0x1035 },
{ "PAG", OPCAT_PSEUDO, PSEUDO_PAG },
{ "PAGE", OPCAT_PSEUDO, PSEUDO_PAG },
{ "PHASE", OPCAT_PSEUDO, PSEUDO_PHASE },
{ "PSH", OPCAT_STACK, 0x34 },
{ "PSHA", OPCAT_TWOBYTE, 0x3402 },
{ "PSHB", OPCAT_TWOBYTE, 0x3404 },
{ "PSHD", OPCAT_TWOBYTE, 0x3406 },
{ "PSHS", OPCAT_STACK, 0x34 },
{ "PSHSW", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1038 },
{ "PSHU", OPCAT_STACK, 0x36 },
{ "PSHUW", OPCAT_6309 |
OPCAT_TWOBYTE, 0x103a },
{ "PSHX", OPCAT_TWOBYTE, 0x3410 },
{ "PSHY", OPCAT_TWOBYTE, 0x3420 },
{ "PUB", OPCAT_PSEUDO, PSEUDO_PUB },
{ "PUBLIC", OPCAT_PSEUDO, PSEUDO_PUB },
{ "PUL", OPCAT_STACK, 0x35 },
{ "PULA", OPCAT_TWOBYTE, 0x3502 },
{ "PULB", OPCAT_TWOBYTE, 0x3504 },
{ "PULD", OPCAT_TWOBYTE, 0x3506 },
{ "PULS", OPCAT_STACK, 0x35 },
{ "PULSW", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1039 },
{ "PULU", OPCAT_STACK, 0x37 },
{ "PULUW", OPCAT_6309 |
OPCAT_TWOBYTE, 0x103b },
{ "PULX", OPCAT_TWOBYTE, 0x3510 },
{ "PULY", OPCAT_TWOBYTE, 0x3520 },
{ "REG", OPCAT_PSEUDO, PSEUDO_REG },
{ "REP", OPCAT_PSEUDO, PSEUDO_REP },
{ "REPEAT", OPCAT_PSEUDO, PSEUDO_REP },
{ "RESET", OPCAT_ONEBYTE, 0x3e },
{ "RMB", OPCAT_PSEUDO, PSEUDO_RMB },
{ "ROL", OPCAT_SINGLEADDR, 0x09 },
{ "ROLA", OPCAT_ONEBYTE, 0x49 },
{ "ROLB", OPCAT_ONEBYTE, 0x59 },
{ "ROLD", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1049 },
{ "ROLW", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1059 },
{ "ROR", OPCAT_SINGLEADDR, 0x06 },
{ "RORA", OPCAT_ONEBYTE, 0x46 },
{ "RORB", OPCAT_ONEBYTE, 0x56 },
{ "RORD", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1046 },
{ "RORW", OPCAT_6309 |
OPCAT_TWOBYTE, 0x1056 },
{ "RPT", OPCAT_PSEUDO, PSEUDO_REP },
{ "RTI", OPCAT_ONEBYTE, 0x3b },
{ "RTS", OPCAT_ONEBYTE, 0x39 },
{ "RZB", OPCAT_PSEUDO, PSEUDO_RZB },
{ "SBA", OPCAT_FOURBYTE, 0x3404a0e0 },
{ "SBC", OPCAT_ACCARITH, 0x82 },
{ "SBCA", OPCAT_ARITH, 0x82 },
{ "SBCB", OPCAT_ARITH, 0xc2 },
{ "SBCD", OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x1082 },
{ "SBCR", OPCAT_6309 |
OPCAT_IREG, 0x1033 },
{ "SEC", OPCAT_TWOBYTE, 0x1a01 },
{ "SEF", OPCAT_TWOBYTE, 0x1a40 },
{ "SEI", OPCAT_TWOBYTE, 0x1a10 },
{ "SEIF", OPCAT_TWOBYTE, 0x1a50 },
{ "SET", OPCAT_PSEUDO, PSEUDO_SET },
{ "SETDP", OPCAT_PSEUDO, PSEUDO_SETDP },
{ "SETLI", OPCAT_PSEUDO, PSEUDO_SETLI },
{ "SETPG", OPCAT_PSEUDO, PSEUDO_SETPG },
{ "SEV", OPCAT_TWOBYTE, 0x1a02 },
{ "SEX", OPCAT_ONEBYTE, 0x1d },
{ "SEXW", OPCAT_6309 |
OPCAT_ONEBYTE, 0x14 },
{ "SEZ", OPCAT_TWOBYTE, 0x1a04 },
{ "SPC", OPCAT_PSEUDO, PSEUDO_SPC },
{ "STA", OPCAT_NOIMM |
OPCAT_ARITH, 0x87 },
{ "STAA", OPCAT_NOIMM |
OPCAT_ARITH, 0x87 },
{ "STAB", OPCAT_NOIMM |
OPCAT_ARITH, 0xc7 },
{ "STAD", OPCAT_NOIMM |
OPCAT_DBLREG1BYTE, 0xcd },
{ "STB", OPCAT_NOIMM |
OPCAT_ARITH, 0xc7 },
{ "STBT", OPCAT_6309 |
OPCAT_BITTRANS, 0x1137 },
{ "STD", OPCAT_NOIMM |
OPCAT_DBLREG1BYTE, 0xcd },
{ "STE", OPCAT_NOIMM |
OPCAT_6309 |
OPCAT_2ARITH, 0x1187 },
{ "STF", OPCAT_NOIMM |
OPCAT_6309 |
OPCAT_2ARITH, 0x11c7 },
{ "STQ", OPCAT_NOIMM |
OPCAT_6309 |
OPCAT_QUADREG1BYTE,0x10cd },
{ "STS", OPCAT_NOIMM |
OPCAT_DBLREG2BYTE, 0x10cf },
{ "STTL", OPCAT_PSEUDO, PSEUDO_STTL },
{ "STU", OPCAT_NOIMM |
OPCAT_DBLREG1BYTE, 0xcf },
{ "STW", OPCAT_NOIMM |
OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x1087 },
{ "STX", OPCAT_NOIMM |
OPCAT_DBLREG1BYTE, 0x8f },
{ "STY", OPCAT_NOIMM |
OPCAT_DBLREG2BYTE, 0x108f },
{ "SUB", OPCAT_ACCARITH, 0x80 },
{ "SUBA", OPCAT_ARITH, 0x80 },
{ "SUBB", OPCAT_ARITH, 0xc0 },
{ "SUBD", OPCAT_DBLREG1BYTE, 0x83 },
{ "SUBE", OPCAT_6309 |
OPCAT_2ARITH, 0x1180 },
{ "SUBF", OPCAT_6309 |
OPCAT_2ARITH, 0x11c0 },
{ "SUBW", OPCAT_6309 |
OPCAT_DBLREG2BYTE, 0x1080 },
{ "SUBR", OPCAT_6309 |
OPCAT_IREG, 0x1032 },
{ "SWI", OPCAT_ONEBYTE, 0x3f },
{ "SWI2", OPCAT_TWOBYTE, 0x103f },
{ "SWI3", OPCAT_TWOBYTE, 0x113f },
{ "SYMLEN", OPCAT_PSEUDO, PSEUDO_SYMLEN },
{ "SYNC", OPCAT_ONEBYTE, 0x13 },
{ "TAB", OPCAT_THREEBYTE, 0x1f894d },
{ "TAP", OPCAT_TWOBYTE, 0x1f8a },
{ "TBA", OPCAT_THREEBYTE, 0x1f984d },
{ "TEXT", OPCAT_PSEUDO, PSEUDO_TEXT },
{ "TFM", OPCAT_6309 |
OPCAT_BLOCKTRANS, 0x1138 },
{ "TFR", OPCAT_2REG, 0x1f },
{ "TIM", OPCAT_6309 |
OPCAT_BITDIRECT, 0x0b },
{ "TITLE", OPCAT_PSEUDO, PSEUDO_NAM },
{ "TPA", OPCAT_TWOBYTE, 0x1fa8 },
{ "TST", OPCAT_SINGLEADDR, 0x0d },
{ "TSTA", OPCAT_ONEBYTE, 0x4d },
{ "TSTB", OPCAT_ONEBYTE, 0x5d },
{ "TSTD", OPCAT_6309 |
OPCAT_TWOBYTE, 0x104d },
{ "TSTE", OPCAT_6309 |
OPCAT_TWOBYTE, 0x114d },
{ "TSTF", OPCAT_6309 |
OPCAT_TWOBYTE, 0x115d },
{ "TSTW", OPCAT_6309 |
OPCAT_TWOBYTE, 0x105d },
{ "TSX", OPCAT_TWOBYTE, 0x1f41 },
{ "TSY", OPCAT_FOURBYTE, 0x34403520 }, /* PSHS S/PULS Y */
{ "TTL", OPCAT_PSEUDO, PSEUDO_NAM },
{ "TXS", OPCAT_TWOBYTE, 0x1f14 },
{ "TYS", OPCAT_FOURBYTE, 0x34203540 }, /* PSHS Y/PULS S */
{ "WAI", OPCAT_TWOBYTE, 0x3cff },
{ "ZMB", OPCAT_PSEUDO, PSEUDO_RZB },
};
struct oprecord optable00[]=
{
{ "ABA", OPCAT_ONEBYTE, 0x1b },
{ "ABS", OPCAT_PSEUDO, PSEUDO_ABS },
{ "ADC", OPCAT_ACCARITH, 0x89 },
{ "ADCA", OPCAT_ARITH, 0x89 },
{ "ADCB", OPCAT_ARITH, 0xc9 },
{ "ADD", OPCAT_ACCARITH, 0x8b },
{ "ADDA", OPCAT_ARITH, 0x8b },
{ "ADDB", OPCAT_ARITH, 0xcb },
{ "AND", OPCAT_ACCARITH, 0x84 },
{ "ANDA", OPCAT_ARITH, 0x84 },
{ "ANDB", OPCAT_ARITH, 0xc4 },
{ "ASL", OPCAT_ACCADDR, 0x08 },
{ "ASLA", OPCAT_ONEBYTE, 0x48 },
{ "ASLB", OPCAT_ONEBYTE, 0x58 },
{ "ASR", OPCAT_ACCADDR, 0x07 },
{ "ASRA", OPCAT_ONEBYTE, 0x47 },
{ "ASRB", OPCAT_ONEBYTE, 0x57 },
{ "BCC", OPCAT_SBRANCH, 0x24 },
{ "BCS", OPCAT_SBRANCH, 0x25 },
{ "BEC", OPCAT_SBRANCH, 0x24 },
{ "BEQ", OPCAT_SBRANCH, 0x27 },
{ "BES", OPCAT_SBRANCH, 0x25 },
{ "BGE", OPCAT_SBRANCH, 0x2c },
{ "BGT", OPCAT_SBRANCH, 0x2e },
{ "BHI", OPCAT_SBRANCH, 0x22 },
{ "BHS", OPCAT_SBRANCH, 0x24 },
{ "BIN", OPCAT_PSEUDO, PSEUDO_BINARY },
{ "BINARY", OPCAT_PSEUDO, PSEUDO_BINARY },
{ "BIT", OPCAT_ACCARITH, 0x85 },
{ "BITA", OPCAT_ARITH, 0x85 },
{ "BITB", OPCAT_ARITH, 0xc5 },
{ "BLE", OPCAT_SBRANCH, 0x2f },
{ "BLO", OPCAT_SBRANCH, 0x25 },
{ "BLS", OPCAT_SBRANCH, 0x23 },
{ "BLT", OPCAT_SBRANCH, 0x2d },
{ "BMI", OPCAT_SBRANCH, 0x2b },
{ "BNE", OPCAT_SBRANCH, 0x26 },
{ "BPL", OPCAT_SBRANCH, 0x2a },
{ "BRA", OPCAT_SBRANCH, 0x20 },
{ "BSR", OPCAT_SBRANCH, 0x8d },
{ "BSZ", OPCAT_PSEUDO, PSEUDO_RZB }, // AS9 style
{ "BVC", OPCAT_SBRANCH, 0x28 },
{ "BVS", OPCAT_SBRANCH, 0x29 },
{ "CBA", OPCAT_ONEBYTE, 0x11 },
{ "CLC", OPCAT_ONEBYTE, 0x0c },
{ "CLI", OPCAT_ONEBYTE, 0x0e },
{ "CLR", OPCAT_ACCADDR, 0x0f },
{ "CLRA", OPCAT_ONEBYTE, 0x4f },
{ "CLRB", OPCAT_ONEBYTE, 0x5f },
{ "CLV", OPCAT_ONEBYTE, 0x0a },
{ "CMP", OPCAT_ACCARITH, 0x81 },
{ "CMPA", OPCAT_ARITH, 0x81 },
{ "CMPB", OPCAT_ARITH, 0xc1 },
{ "COM", OPCAT_ACCADDR, 0x03 },
{ "COMA", OPCAT_ONEBYTE, 0x43 },
{ "COMB", OPCAT_ONEBYTE, 0x53 },
{ "CPX", OPCAT_DBLREG1BYTE, 0x8c },
{ "DAA", OPCAT_ONEBYTE, 0x19 },
{ "DEC", OPCAT_ACCADDR, 0x0a },
{ "DECA", OPCAT_ONEBYTE, 0x4a },
{ "DECB", OPCAT_ONEBYTE, 0x5a },
{ "DEF", OPCAT_PSEUDO, PSEUDO_DEF },
{ "DEFINE", OPCAT_PSEUDO, PSEUDO_DEF },
{ "DEPHASE", OPCAT_PSEUDO, PSEUDO_DEPHASE },
{ "DES", OPCAT_ONEBYTE, 0x34 },
{ "DEX", OPCAT_ONEBYTE, 0x09 },
{ "DUP", OPCAT_PSEUDO, PSEUDO_DUP },
{ "ELSE", OPCAT_PSEUDO, PSEUDO_ELSE },
{ "END", OPCAT_PSEUDO, PSEUDO_END },
{ "ENDCOM", OPCAT_PSEUDO, PSEUDO_ENDCOM },
{ "ENDD", OPCAT_PSEUDO, PSEUDO_ENDD },
{ "ENDDEF", OPCAT_PSEUDO, PSEUDO_ENDDEF },
{ "ENDIF", OPCAT_PSEUDO, PSEUDO_ENDIF },
{ "ENDM", OPCAT_PSEUDO, PSEUDO_ENDM },
{ "EOR", OPCAT_ACCARITH, 0x88 },
{ "EORA", OPCAT_ARITH, 0x88 },
{ "EORB", OPCAT_ARITH, 0xc8 },
{ "EQU", OPCAT_PSEUDO, PSEUDO_EQU },
{ "ERR", OPCAT_PSEUDO, PSEUDO_ERR },
{ "EXITM", OPCAT_PSEUDO, PSEUDO_EXITM },
{ "EXT", OPCAT_PSEUDO, PSEUDO_EXT },
{ "EXTERN", OPCAT_PSEUDO, PSEUDO_EXT },
{ "FCB", OPCAT_PSEUDO, PSEUDO_FCB },
{ "FCC", OPCAT_PSEUDO, PSEUDO_FCC },
{ "FCW", OPCAT_PSEUDO, PSEUDO_FCW },
{ "FDB", OPCAT_PSEUDO, PSEUDO_FCW },
{ "FILL", OPCAT_PSEUDO, PSEUDO_FILL },
{ "GLOBAL", OPCAT_PSEUDO, PSEUDO_PUB },
{ "IF", OPCAT_PSEUDO, PSEUDO_IF },
{ "IFC", OPCAT_PSEUDO, PSEUDO_IFC },
{ "IFD", OPCAT_PSEUDO, PSEUDO_IFD },
{ "IFN", OPCAT_PSEUDO, PSEUDO_IFN },
{ "IFNC", OPCAT_PSEUDO, PSEUDO_IFNC },
{ "IFND", OPCAT_PSEUDO, PSEUDO_IFND },
{ "INC", OPCAT_ACCADDR, 0x0c },
{ "INCA", OPCAT_ONEBYTE, 0x4c },
{ "INCB", OPCAT_ONEBYTE, 0x5c },
{ "INCLUDE", OPCAT_PSEUDO, PSEUDO_INCLUDE },
{ "INS", OPCAT_ONEBYTE, 0x31 },
{ "INX", OPCAT_ONEBYTE, 0x08 },
{ "JMP", OPCAT_IDXEXT, 0x4e },
{ "JSR", OPCAT_IDXEXT, 0x8d },
{ "LDA", OPCAT_ACCARITH, 0x86 },
{ "LDAA", OPCAT_ARITH, 0x86 },
{ "LDAB", OPCAT_ARITH, 0xc6 },
{ "LDB", OPCAT_ARITH, 0xc6 },
{ "LDS", OPCAT_DBLREG1BYTE, 0x8e },
{ "LDX", OPCAT_DBLREG1BYTE, 0xce },
{ "LIB", OPCAT_PSEUDO, PSEUDO_INCLUDE },
{ "LIBRARY", OPCAT_PSEUDO, PSEUDO_INCLUDE },
{ "LSL", OPCAT_ACCADDR, 0x08 },
{ "LSLA", OPCAT_ONEBYTE, 0x48 },
{ "LSLB", OPCAT_ONEBYTE, 0x58 },
{ "LSR", OPCAT_ACCADDR, 0x04 },
{ "LSRA", OPCAT_ONEBYTE, 0x44 },
{ "LSRB", OPCAT_ONEBYTE, 0x54 },
{ "MACRO", OPCAT_PSEUDO, PSEUDO_MACRO },
{ "NAM", OPCAT_PSEUDO, PSEUDO_NAM },
{ "NAME", OPCAT_PSEUDO, PSEUDO_NAME },
{ "NEG", OPCAT_ACCADDR, 0x00 },
{ "NEGA", OPCAT_ONEBYTE, 0x40 },