/
The Telemark Assembler with Extras (TASMx) User' Manual.html
2032 lines (2024 loc) · 95.5 KB
/
The Telemark Assembler with Extras (TASMx) User' Manual.html
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
<!DOCTYPE html PUBLIC "-//SQ//DTD HTML 2.0 + all extensions//EN" "hmpro3.dtd">
<!-- saved from url=(0120)https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script type="text/javascript" src="./The Telemark Assembler with Extras (TASMx) User' Manual_files/analytics.js.download" charset="utf-8"></script>
<script type="text/javascript">archive_analytics.values.service='wb';archive_analytics.values.server_name='wwwb-app23.us.archive.org';archive_analytics.values.server_ms=697;</script><script type="text/javascript" src="./The Telemark Assembler with Extras (TASMx) User' Manual_files/wbhack.js.download" charset="utf-8"></script>
<script type="text/javascript">
__wbhack.init('https://web.archive.org/web');
</script>
<link rel="stylesheet" type="text/css" href="./The Telemark Assembler with Extras (TASMx) User' Manual_files/banner-styles.css">
<link rel="stylesheet" type="text/css" href="./The Telemark Assembler with Extras (TASMx) User' Manual_files/iconochive.css">
<!-- End Wayback Rewrite JS Include -->
<title>The Telemark Assembler with Extras (TASMx) User' Manual</title><!--$Revision: 1.4 $--></head>
<body><div id="wm-ipp" lang="en" style="display: none; direction: ltr;">
<div style="position:fixed;left:0;top:0;right:0;">
<div id="wm-ipp-inside">
<div style="position:relative;">
<div id="wm-logo" style="float:left;width:130px;padding-top:10px;">
<a href="https://web.archive.org/web/" title="Wayback Machine home page"><img src="./The Telemark Assembler with Extras (TASMx) User' Manual_files/wayback-toolbar-logo.png" alt="Wayback Machine" width="110" height="39" border="0"></a>
</div>
<div class="r" style="float:right;">
<div id="wm-btns" style="text-align:right;height:25px;">
<a href="http://faq.web.archive.org/" title="Get some help using the Wayback Machine" style="top:-5px;"><span class="iconochive-question" style="color:rgb(87,186,244);font-size:160%;"></span></a>
<a id="wm-tb-close" href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#close" onclick="__wm.h(event);return false;" style="top:-2px;" title="Close the toolbar"><span class="iconochive-remove-circle" style="color:#888888;font-size:240%;"></span></a>
</div>
<div id="wm-share" style="text-align:right;">
<a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html', '', 'height=400,width=600'); return false;" title="Share on Facebook" style="margin-right:5px;" target="_blank"><span class="iconochive-facebook" style="color:#3b5998;font-size:160%;"></span></a>
<a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#" onclick="window.open('https://twitter.com/intent/tweet?text=https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html&via=internetarchive', '', 'height=400,width=600'); return false;" title="Share on Twitter" style="margin-right:5px;" target="_blank"><span class="iconochive-twitter" style="color:#1dcaff;font-size:160%;"></span></a>
</div>
</div>
<table class="c" style="">
<tbody>
<tr>
<td class="u" colspan="2">
<form target="_top" method="get" action="https://web.archive.org/web/submit" name="wmtb" id="wmtb"><input type="text" name="url" id="wmtbURL" value="http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html" onfocus="this.focus();this.select();" autocomplete="off"><input type="hidden" name="type" value="replay"><input type="hidden" name="date" value="20080517085354"><input type="submit" value="Go"></form>
</td>
<td class="n" rowspan="2" style="width:110px;">
<table>
<tbody>
<!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
<tr class="m">
<td class="b" nowrap="nowrap"><a href="https://web.archive.org/web/20071216064559/http://www.gamearchive.com:80/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#INVOCATION" title="16 Dec 2007"><strong>Dec</strong></a></td>
<td class="c" id="displayMonthEl" title="You are here: 08:53:54 May 17, 2008">MAY</td>
<td class="f" nowrap="nowrap"><a href="https://web.archive.org/web/20141220182626/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html" title="20 Dec 2014"><strong>Dec</strong></a></td>
</tr>
<!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
<tr class="d">
<td class="b" nowrap="nowrap"><a href="https://web.archive.org/web/20071216064559/http://www.gamearchive.com:80/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#INVOCATION" title="06:45:59 Dec 16, 2007"><img src="./The Telemark Assembler with Extras (TASMx) User' Manual_files/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0"></a></td>
<td class="c" id="displayDayEl" style="width:34px;font-size:24px;" title="You are here: 08:53:54 May 17, 2008">17</td>
<td class="f" nowrap="nowrap"><a href="https://web.archive.org/web/20141220182626/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html" title="18:26:26 Dec 20, 2014"><img src="./The Telemark Assembler with Extras (TASMx) User' Manual_files/wm_tb_nxt_on.png" alt="Next capture" width="14" height="16" border="0"></a></td>
</tr>
<!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
<tr class="y">
<td class="b" nowrap="nowrap"><a href="https://web.archive.org/web/20060319120823/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html" title="19 Mar 2006"><strong>2006</strong></a></td>
<td class="c" id="displayYearEl" title="You are here: 08:53:54 May 17, 2008">2008</td>
<td class="f" nowrap="nowrap"><a href="https://web.archive.org/web/20141220182626/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html" title="20 Dec 2014"><strong>2014</strong></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="s">
<div id="wm-nav-captures"><a class="t" href="https://web.archive.org/web/*/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html" title="See a list of every capture for this URL">30 captures</a><div class="r" title="Timespan for captures of this URL">1 Jan 2003 - 4 May 2015</div></div>
</td>
<td class="k">
<a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html" id="wm-graph-anchor">
<div id="wm-ipp-sparkline" title="Explore captures for this URL" style="position: relative">
<canvas id="wm-sparkline-canvas" width="550" height="27" border="0"></canvas>
<div class="yt" style="display: none; width: 25px; height: 27px;"></div><div class="mt" style="display: none; width: 2px; height: 27px;"></div></div>
</a>
</td>
</tr>
</tbody>
</table>
<div style="position:absolute;bottom:0;right:2px;text-align:right;">
<a id="wm-expand" class="wm-btn" href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#expand" onclick="__wm.ex(event);return false;"><span class="iconochive-down-solid"></span> <span style="font-size:80%">About this capture</span></a>
</div>
</div>
<div id="wm-capinfo" style="border-top:1px solid #777;display:none;">
<div style="background-color:#353535;color:#aaa;font-weight:bold;text-align:center;"><a class="wm-selector selected" href="javascript:void(0)">COLLECTED BY</a></div>
<div style="padding:3px;position:relative;">
<div style="display:inline-block;vertical-align:top;width:49%;">
<span class="c-logo" style="background-image:url(https://archive.org/services/img/commoncrawl)"></span>
<div>Collection: <a style="color:#33f;" href="https://archive.org/details/commoncrawl" target="_new"><span class="wm-title">Common Crawl</span></a></div>
<div style="max-height:75px;overflow:hidden;position:relative;">
<div style="position:absolute;top:0;left:0;width:100%;height:75px;background:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,0) 90%,rgba(255,255,255,255) 100%);"></div>
Web crawl data from Common Crawl.
</div>
</div>
</div></div></div></div></div><!-- BEGIN WAYBACK TOOLBAR INSERT -->
<script type="text/javascript" src="./The Telemark Assembler with Extras (TASMx) User' Manual_files/timestamp.js.download" charset="utf-8"></script>
<script type="text/javascript" src="./The Telemark Assembler with Extras (TASMx) User' Manual_files/graph-calc.js.download" charset="utf-8"></script>
<script type="text/javascript" src="./The Telemark Assembler with Extras (TASMx) User' Manual_files/auto-complete.js.download" charset="utf-8"></script>
<script type="text/javascript" src="./The Telemark Assembler with Extras (TASMx) User' Manual_files/toolbar.js.download" charset="utf-8"></script>
<style type="text/css">
body {
margin-top:0 !important;
padding-top:0 !important;
/*min-width:800px !important;*/
}
.wb-autocomplete-suggestions {
text-align: left; cursor: default; border: 1px solid #ccc; border-top: 0; background: #fff; box-shadow: -1px 1px 3px rgba(0,0,0,.1);
position: absolute; display: none; z-index: 2147483647; max-height: 254px; overflow: hidden; overflow-y: auto; box-sizing: border-box;
}
.wb-autocomplete-suggestion { position: relative; padding: 0 .6em; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.02em; color: #333; }
.wb-autocomplete-suggestion b { font-weight: bold; }
.wb-autocomplete-suggestion.selected { background: #f0f0f0; }
</style>
<script type="text/javascript">
__wm.bt(550,27,25,2,"web","http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html","2008-05-17",1996);
</script><div class="wb-autocomplete-suggestions " style="left: 0px; top: 1px; width: 0px;"></div>
<!-- END WAYBACK TOOLBAR INSERT -->
<h1 align="CENTER"><a name="Top">The Telemark Assembler Extra (TASMx) User's Manual</a></h1>
<p align="CENTER"><font size="+2">Version 3.2<br>May, 2001</font></p>
<p align="CENTER">Thomas N. Anderson
<br>Squak Valley Software<br>837 Front Street South, <br>Issaquah, WA 98027
<br>Compuserve: 73770,3612
<br>Internet: andersontn@acm.org<br>www.halcyon.com/squakvly/</p>
<p> Copyright (C) 1998 by Squak Valley Software. All rights reserved.</p>
<p><font color="red"><b>This version modified by <a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/contact?to=jess">Jess Askey</a><br>Please email me and NOT Thomas if you have problems with TASMx</b></font></p>
<hr>
<h1><a name="TABLE OF CONTENTS">TABLE OF CONTENTS</a></h1>
<ul>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#EXTRA">TASMx ADDITIONS AND NOTES</a>
</li><li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#INTRODUCTION">INTRODUCTION</a></li>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#SHAREWARE">SHAREWARE</a></li>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#INVOCATION">INVOCATION</a></li>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#ENVIRONMENT%20VARIABLES">ENVIRONMENT VARIABLES</a></li>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#EXIT%20CODES">EXIT CODES</a></li>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#SOURCE%20FILE%20FORMAT">SOURCE FILE FORMAT</a></li>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#EXPRESSIONS">EXPRESSIONS</a></li>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#ASSEMBLER%20DIRECTIVES">ASSEMBLER DIRECTIVES</a></li>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#OBJECT%20FILE%20FORMATS">OBJECT FILE FORMATS</a></li>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#LISTING%20FILE%20FORMAT">LISTING FILE FORMAT</a></li>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#PROM%20PROGRAMMING">PROM PROGRAMMING</a></li>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#ERROR%20MESSAGES">ERROR MESSAGES</a></li>
<li><a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#LIMITATIONS">LIMITATIONS</a></li></ul>
<hr>
<h1><a name="EXTRA">TASMx ADDITIONS AND NOTES</a></h1>
<p>TASMx is an enhanced version of Thomas Anderson's TASM. Specifically it is aimed at developing
classic arcade games code and able to compile Native Atari Macro-11 Code and it's accompanying
macros. The specific difference of TASMx as compared to TASM is the addition of 3 assembler directives.
.PUSH, .PULL and .ERROR. For info on these directives, please read the <a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#ASSEMBLER%20DIRECTIVES">Assembler Directives</a> section below.
More general information on TASM is available at <a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/video/general/hacking/programs/tasmx">http://www.gamearchive.com/video/general/hacking/programs/tasmx/</a>.
</p><p>
<font color="red"><b>PLEASE NOTE: This version of TASMx still falls under the <a href="https://web.archive.org/web/20080517085354/http://www.gamearchive.com/Video_Games/Stuff/programs/tasmx/TASMx_Manual.html#SHAREWARE">SHAREWARE</a> agreement present in this document and written by Thomas Anderson. If you find this
program useful, you must still register through him. There are no fees associated with my hacks on his code.</b></font>
</p><hr>
<h1><a name="INTRODUCTION">INTRODUCTION</a></h1>
<p>The Telemark Assembler (TASM) is a table driven cross assembler for the
MS-DOS and LINUX environments. Assembly source code, written in the appropriate
dialect (generally very close to the manufacturers assembly language), can be
assembled with TASM, and the resulting object code transferred to the target
microprocessor system via PROM or other mechanisms.</p>
<p>The microprocessor families supported by TASM are:</p>
<ul>
<li>6502</li>
<li>6800/6801/68HC11</li>
<li>6805</li>
<li>8048</li>
<li>8051</li>
<li>8080/8085, Z80</li>
<li>TMS32010, TMS320C25</li>
<li>TMS7000</li>
<li>8096/80196</li></ul>
<p>The user so inclined may build tables for other microprocessors. The
descriptions of the various existing tables and instructions on building new
tables are not in this document but can be found in the TASMTABS.HTM file on the
TASM distribution disk.</p>
<p>TASM characteristics include:</p>
<ol>
<li> Powerful expression parsing (17 operators).
</li>
<li> Supports a subset of the 'C' preprocessor commands.
</li>
<li> Macro capability (through use of DEFINE directive).
</li>
<li> Multiple statements per line.
</li>
<li> Four object file formats: Intel hex, MOS Technology hex, Motorola hex,
binary.
</li>
<li> Absolute code generation only.
</li>
<li> Source code available (in C).
</li>
<li> Uniform syntax across versions for different target machines.
</li>
<li> Features in support of PROM programming (preset memory, contiguous block).
</li>
<li> Supports extended instructions for many of the supported microprocessor
families.
</li>
<li> Tables read at run time - single TASM executable for all table versions.
</li>
<li> Symbol table export for inclusion in subsequent assemblies.
</li>
<li> Symbol table export file for import with some simulator products.</li></ol>
<h1><a name="SHAREWARE">SHAREWARE</a></h1>
<p>TASM is distributed as shareware. TASM is not in the public domain. The
TASM distribution files may be freely copied (excluding the source code files)
and freely used for the purpose of evaluating the suitability of TASM for a
given purpose. Use of TASM beyond a reasonable evaluation period requires
registration. Prolonged use without registration is unethical.</p>
<h1><a name="INVOCATION">INVOCATION</a></h1>
<p>TASM can be invoked as follows (optional fields shown in brackets, symbolic
fields in italics):</p>
<pre> tasm -pn [-options ...] <i>src_file</i> [<i>obj_file</i> [<i>lst_file</i> [<i>exp_file</i> [<i>sym_file</i>]]]]</pre>
<p>Where <i>options</i> can be one or more of the following:</p>
<table border="BORDER">
<tbody><tr>
<td align="Left" valign="Top"> -<i>table</i> </td>
<td align="Left" valign="Top">Specify version (<i>table</i> = table
designation) </td></tr>
<tr>
<td align="Left" valign="Top">-t<i>table</i> </td>
<td align="Left" valign="Top">Table (alternate form of above) </td></tr>
<tr>
<td align="Left" valign="Top">-a<i>amask</i> </td>
<td align="Left" valign="Top">Assembly control (optional error checking) </td></tr>
<tr>
<td align="Left" valign="Top">-b </td>
<td align="Left" valign="Top">Produce object in binary (.COM) format </td></tr>
<tr>
<td align="Left" valign="Top">-c </td>
<td align="Left" valign="Top">Object file written as a contiguous block </td></tr>
<tr>
<td align="Left" valign="Top">-d<i>macro</i> </td>
<td align="Left" valign="Top">Define a macro (or just a macro label)
</td></tr>
<tr>
<td align="Left" valign="Top">-e </td>
<td align="Left" valign="Top">Show source lines after macro expansion </td></tr>
<tr>
<td align="Left" valign="Top">-f<i>fillbyte</i> </td>
<td align="Left" valign="Top">Fill entire memory space with fillbyte (hex)
</td></tr>
<tr>
<td align="Left" valign="Top">-g<i>objtype</i> </td>
<td align="Left" valign="Top">Object file (0=Intel Hex, 1=MOS Tech, 2=Motorola,
3=binary,4=Intel Hex (Word)) </td></tr>
<tr>
<td align="Left" valign="Top">-h </td>
<td align="Left" valign="Top">Produce hex table of the assembled code (in list
file) </td></tr>
<tr>
<td align="Left" valign="Top">-i </td>
<td align="Left" valign="Top">Ignore case for labels </td></tr>
<tr>
<td align="Left" valign="Top">-l[al] </td>
<td align="Left" valign="Top">Produce a label table in the listing </td></tr>
<tr>
<td align="Left" valign="Top">-m </td>
<td align="Left" valign="Top">Produce object in MOS Technology format </td></tr>
<tr>
<td align="Left" valign="Top">-o<i>obytes</i> </td>
<td align="Left" valign="Top">Bytes per object record (for hex obj formats)
</td></tr>
<tr>
<td align="Left" valign="Top">-p[<i>lines</i>] </td>
<td align="Left" valign="Top">Page the listing file (lines per page.
default=60) </td></tr>
<tr>
<td align="Left" valign="Top">-q </td>
<td align="Left" valign="Top">Quiet, disable the listing file </td></tr>
<tr>
<td align="Left" valign="Top">-r<i>kb</i> </td>
<td align="Left" valign="Top">Set read buffer size in Kbytes (default 2 Kbytes)
</td></tr>
<tr>
<td align="Left" valign="Top">-s </td>
<td align="Left" valign="Top">Write a symbol table file </td></tr>
<tr>
<td align="Left" valign="Top">-x[<i>xmask</i>] </td>
<td align="Left" valign="Top">Enable extended instruction set (if any) </td></tr>
<tr>
<td align="Left" valign="Top">-y </td>
<td align="Left" valign="Top">Time the assembly </td></tr></tbody></table>
<p>The filename parameters are defined as follows:</p>
<table border="BORDER">
<tbody><tr>
<td align="Left" valign="Top"><i>src_file </i></td>
<td align="Left" valign="Top">Source file name </td></tr>
<tr>
<td align="Left" valign="Top"><i>obj_file </i></td>
<td align="Left" valign="Top">Object code file name </td></tr>
<tr>
<td align="Left" valign="Top"><i>lst_file </i></td>
<td align="Left" valign="Top">Listing file name </td></tr>
<tr>
<td align="Left" valign="Top"><i>exp_file </i></td>
<td align="Left" valign="Top">Symbol export file (only if the EXPORT directive
is used).</td></tr>
<tr>
<td align="Left" valign="Top"><i>sym_file </i></td>
<td align="Left" valign="Top">Symbol table file (only if the <b>-s</b> option
or the SYM/AVSYM directives are used). </td></tr></tbody></table>
<p>The source file must be specified. If not, some usage information is
displayed. Default file names for all the other files are generated if they are
not explicitly provided. The filename is formed by taking the source filename
and changing the extension to one of the following:</p>
<table border="BORDER">
<tbody><tr>
<td align="Left" valign="Top"><strong>Extension </strong></td>
<td align="Left" valign="Top"><strong>File type </strong></td></tr>
<tr>
<td align="Left" valign="Top">.OBJ </td>
<td align="Left" valign="Top">Object file </td></tr>
<tr>
<td align="Left" valign="Top">.LST </td>
<td align="Left" valign="Top">Listing file </td></tr>
<tr>
<td align="Left" valign="Top">.EXP </td>
<td align="Left" valign="Top">Symbol export file </td></tr>
<tr>
<td align="Left" valign="Top">.SYM </td>
<td align="Left" valign="Top">Symbol table file </td></tr></tbody></table>
<p>TASM has no built-in instruction set tables. Instruction set definition
files are read at run time. TASM determines which table to use based on the '-<i>table'</i>
field shown above. For example, to assemble the code in a file called
<i>source.asm</i>, one would enter</p>
<table>
<tbody><tr>
<td align="Left"><tt>tasm -48 source.asm </tt></td>
<td align="Left">for an 8048 assembly </td></tr>
<tr>
<td align="Left"><tt>tasm -65 source.asm </tt></td>
<td align="Left">for a 6502 assembly </td></tr>
<tr>
<td align="Left"><tt>tasm -51 source.asm </tt></td>
<td align="Left">for an 8051 assembly. </td></tr>
<tr>
<td align="Left"><tt>tasm -85 source.asm </tt></td>
<td align="Left">for an 8085 assembly. </td></tr>
<tr>
<td align="Left"><tt>tasm -80 source.asm </tt></td>
<td align="Left">for a Z80 assembly. </td></tr>
<tr>
<td align="Left"><tt>tasm -05 source.asm </tt></td>
<td align="Left">for a 6805 assembly. </td></tr>
<tr>
<td align="Left"><tt>tasm -68 source.asm </tt></td>
<td align="Left">for a 6800/6801/68HC11 assembly. </td></tr>
<tr>
<td align="Left"><tt>tasm -70 source.asm </tt></td>
<td align="Left">for a TMS7000 assembly. </td></tr>
<tr>
<td align="Left"><tt>tasm -3210 source.asm </tt></td>
<td align="Left">for a TMS32010 assembly. </td></tr>
<tr>
<td align="Left" valign="Top"><tt>tasm -3225 source.asm </tt></td>
<td align="Left" valign="Top">for a TMS320C25 assembly.
</td></tr>
<tr>
<td><tt>tasm -96 source.asm </tt></td>
<td>for a 8096/80196 assembly</td></tr></tbody></table>
<p>Tables are read from a file named by taking the digits specified after the
'-' and appending it to 'TASM' then appending the '.TAB' extension. Thus, the
<b>-48</b> flag would cause the tables to be read from the file 'TASM48.TAB'.</p>
<p>It is possible to designate tables by non numeric part numbers if the <b>-t</b>
flag is used. For example, if a user built a table called TASMF8.TAB then TASM
could be invoked as follows:</p>
<pre> tasm -tf8 source.asm</pre>
<p>Each option flag must be preceded by a dash. Options need not precede the
file names. The various options are described in the sections that follow.</p>
<h2>a - Assembly Control</h2>
<p>TASM can provide additional error checking by specifying the <i>-a</i>
option at the time of execution. If the <i>-a</i> is provided without a digit
following, then all the available error checking is done. If a digit follows,
then it is used as a mask to determine the error checks to be made. The bits of
the mask are defined as follows:</p>
<table border="BORDER">
<tbody><tr>
<td align="CENTER" valign="Top"><strong>Bit </strong></td>
<td align="CENTER" valign="Top"><strong>Option </strong></td>
<td align="CENTER" valign="Top"><strong>Default </strong></td>
<td align="Left" valign="Top"><strong>Description </strong></td></tr>
<tr>
<td align="CENTER" valign="Top">0 </td>
<td align="CENTER" valign="Top">-a1 </td>
<td align="CENTER" valign="Top">OFF </td>
<td align="Left" valign="Top">Check for apparent illegal use of indirection
</td></tr>
<tr>
<td align="CENTER" valign="Top">1 </td>
<td align="CENTER" valign="Top">-a2 </td>
<td align="CENTER" valign="Top">ON </td>
<td align="Left" valign="Top">Check for unused data in the arguments </td></tr>
<tr>
<td align="CENTER" valign="Top">2 </td>
<td align="CENTER" valign="Top">-a4 </td>
<td align="CENTER" valign="Top">ON </td>
<td align="Left" valign="Top">Check for duplicate labels </td></tr>
<tr>
<td align="CENTER" valign="Top">3 </td>
<td align="CENTER" valign="Top">-a8 </td>
<td align="CENTER" valign="Top">OFF </td>
<td align="Left" valign="Top">Check for non-unary operators at start of
expression. </td></tr></tbody></table>
<p>Combinations of the above bits can also be used. For example, <i>-a5</i>
would enable the checking for illegal indirection and duplicate labels.
</p>
<p>Illegal indirection applies to micros that use parenthesis around an
argument to indicate indirection. Since it is always legal to put an extra pair
of parenthesis around any expression (as far as the expression parser is
concerned), the user may think that he/she is indicating indirection for an
instruction that has no indirection and TASM would not complain. Enabling this
checking will result in an error message (warning) whenever an outer pair of
parenthesis is used and the instruction set definition table does not explicitly
indicate that to be a valid form of addressing.</p>
<p>Unused data in arguments applies to cases where a single byte of data is
needed from an argument, but the argument contains more than one byte of data.
If a full sixteen bit address is used in a 'Load Immediate' type instruction
that needs only a single byte, for example, an error message would be generated.
Here is an example (6502 code):</p>
<pre> 0001 1234 .org $1234
test.asm line 0002: Unused data in MS byte of argument.
0002 1234 A9 34 start lda #start</pre>
<p>To make the above checks occur whenever you do an assembly, add a line like
this to your AUTOEXEC.BAT file:</p>
<pre> SET TASMOPTS=-a</pre>
<h2>b - Binary Object Format</h2>
<p>This option causes the object file to be written in binary - one byte for
each byte of code/data. Note that no address information is included in the
object file in this format. The contiguous block (-c) output mode is forced when
this option is invoked. This flag is equivalent to <i>-g3</i>.</p>
<h2>c - Contiguous Block Output</h2>
<p>If this option is specified, then all bytes in the range from the lowest
used byte to the highest will be defined in the object file. Normally, with the
default Intel Hex object format enabled, if the Program Counter (PC) jumps
forward because of an .ORG directive, the bytes skipped over will not have any
value assigned them in the object file. With this option enabled, no output to
the object file occurs until the end of the assembly at which time the whole
block is written. This is useful when using TASM to generate code that will be
put into a PROM so that all locations will have a known value. This option is
often used in conjunction with the -f option to ensure all unused bytes will
have a known value.</p>
<h2>d - Define a Macro</h2>
<p>Macros are defined on the command line generally to control the assembly of
various IFDEF's that are in the source file. This is a convenient way to
generate various versions of object code from a single source file.</p>
<h2>e - Expand Source. </h2>
<p>Normally TASM shows lines in the listing file just as they are in the source
file. If macros are in use (via the DEFINE directive) it is sometimes desirable
to see the source lines after expansion. Use the '-e' flag to accomplish this.</p>
<h2>f - Fill Memory.</h2>
<p>This option causes the memory image that TASM maintains to be initialized to
the value specified by the two hex characters immediately following the 'f'.
TASM maintains a memory image that is a full 64K bytes in size (even if the
target processor cannot utilize that memory space). Invocation of this option
introduces a delay at start up of up to 2 seconds (time required to initialize
all 64K bytes).</p>
<h2>g - Object File Format.</h2>
<p>TASM can generate object code in four different formats as indicated below:</p>
<table border="BORDER">
<tbody><tr>
<td><strong>Option </strong></td>
<td><strong>Description</strong></td></tr>
<tr>
<td align="CENTER">-g0 </td>
<td align="Left">Intel hex (default) </td></tr>
<tr>
<td align="CENTER">-g1 </td>
<td align="Left">MOS Technology hex (same as <b>-m</b>) </td></tr>
<tr>
<td align="CENTER">-g2 </td>
<td align="Left">Motorola hex </td></tr>
<tr>
<td align="CENTER">-g3 </td>
<td align="Left">binary (same as <b>-b</b>) </td></tr>
<tr>
<td align="CENTER">-g4 </td>
<td align="Left">Intel hex with word addresses</td></tr></tbody></table>
<p>The <b>-m</b> and <b>-b</b> flags may also be used, as indicated above.
If both are used the right-most option on the command line will be obeyed.</p>
<p>See the section on <b>OBJECT FILE FORMATS</b> for descriptions of each of
the above.</p>
<h2>h - Hex Object Code Table. </h2>
<p>This option causes a hex table of the produced object code to appear in the
listing file. Each line of the table shows sixteen bytes of code.</p>
<h2>i - Ignore Case in Labels.</h2>
<p>TASM is normally case sensitive when dealing with labels. For those that
prefer case insensitivity, the '-i' command line option can be employed.</p>
<h2>l - Label Table.</h2>
<p>This option causes a label table to appear in the listing file. Each label
is shown with its corresponding value. Macro labels (as established via the
DEFINE directives) do not appear.</p>
<p>Two optional suffixes may follow the <b>-l</b> option:</p>
<table border="BORDER">
<tbody><tr>
<td align="Left" valign="Top"><strong>Suffix </strong></td>
<td align="Left" valign="Top"><strong>Description </strong></td></tr>
<tr>
<td align="CENTER" valign="Top">l </td>
<td align="Left" valign="Top">Use long form listing </td></tr>
<tr>
<td align="CENTER" valign="Top">a </td>
<td align="Left" valign="Top">Show all labels (including local labels) </td></tr></tbody></table>
<p>The suffix should immediately follow the '-l'. Here are some examples:</p>
<table>
<tbody><tr>
<td align="Left" valign="Top"><tt>-l </tt></td>
<td align="Left" valign="Top">to show non-local labels in the short form </td></tr>
<tr>
<td align="Left" valign="Top"><tt>-la </tt></td>
<td align="Left" valign="Top">to show all labels in the short form </td></tr>
<tr>
<td align="Left" valign="Top"><tt>-ll </tt></td>
<td align="Left" valign="Top">to show non-local labels in the long form </td></tr>
<tr>
<td align="Left" valign="Top"><tt>-lal </tt></td>
<td align="Left" valign="Top">to show all labels in the long form </td></tr></tbody></table>
<h2>m - MOS Technology Object Format.</h2>
<p>This option causes the object file to be written in MOS Technology hex
format rather than the default Intel hex format. See section on OBJECT FILE
FORMATS for a description of the format.</p>
<h2>o - Set Number of Bytes per Object Record.</h2>
<p>When generating object code in either the MOS Technology format or the Intel
hex format, a default of 24 (decimal) bytes of object are defined on each
record. This can be altered by invoking the '-o' option immediately followed by
two hex digits defining the number of bytes per record desired. For example, if
32 bytes per record are desired, one might invoke TASM as:</p>
<pre> tasm -48 -o20 source.asm</pre>
<h2>p - Page Listing File. </h2>
<p>This option causes the listing file to have top of page headers and form
feeds inserted at appropriate intervals (every sixty lines of output). To
override the default of sixty lines per page, indicate the desired number of
lines per page as a decimal number immediately following the '-p'. Here is an
example:</p>
<pre> tasm -48 -p56 source.asm</pre>
<h2>q - Disable Listing File.</h2>
<p>This option causes all output to the listing file to be suppressed, unless a
.LIST directive is encountered in the source file (see LIST/NOLIST directives).</p>
<h2>r - Set Read Buffer Size.</h2>
<p>This option overrides the default read buffer size of 2 Kbytes. The first
hexadecimal digit immediately after the 'r' is taken as the number of K bytes to
allocate for the read buffer (.e.g. <b>-r8</b> indicates an 8K byte buffer,
<b>-rf</b> indicates a 15K byte buffer). Note that that read buffers are taken
from the same memory pool as labels and macro storage, and that additional read
buffers are needed if "includes" are used. Thus, using 8K byte
buffers may be suitable for most assemblies, but programs with large numbers of
symbols may not allow such a value. Also, reducing the buffer size to 1 Kbyte
can increase the memory pool available for label storage, if such is needed.</p>
<h2>s - Enable Symbol File Generation.</h2>
<p>If this flag is set, a symbol file is generated at the end of the assembly.
The format of the file is one line per label, each label starts in the first
column and is followed by white space and then four hexadecimal digits
representing the value of the label. The following illustrates the format:</p>
<pre> label1 FFFE
label2 FFFF
label3 1000</pre>
<p>The symbol file name can be provided as the fifth file name on the command
line, or the name will be generated from the source file name with a '.SYM'
extension. The symbol table file can also be generated by invoking the SYM
directive. The AVSYM directive also generates the symbol file but in a
different format (see section on ASSEMBLER DIRECTIVES).</p>
<h2>t - Table Name.</h2>
<p>As an alternative to specifying the instruction set table as two decimal
digits, the table indication may be proceeded by the '-t' option. This is useful
if the desired table name starts with a non-numeric. Thus, a table for an F8
might be selected as:</p>
<pre> tasm -tf8 source.asm</pre>
<p>TASM would expect to read the instruction set definition tables from a file
named TASMF8.TAB.</p>
<h2>x - Enable Extended Instruction Set. </h2>
<p>If a processor family has instructions that are valid for only certain
members, this option can be used to enable those beyond the basic standard
instruction set. A hex digit may follow the 'x' to indicate a mask value used in
selecting the appropriate instruction set. Bit 0 of the mask selects the basic
instruction set, thus a '-x1' would have no effect. A '-x3' would enable the
basic set plus whatever instructions have bit 1 set in their class mask. A '-x'
without a digit following is equivalent to a '-xf' which sets all four of the
mask bits. The following table indicates the current extended instruction sets
available in the TASM tables:</p>
<table border="BORDER">
<tbody><tr>
<td align="Left" valign="Top"><strong>Base Table </strong></td>
<td align="Left" valign="Top"><strong>Base Family </strong></td>
<td align="Left" valign="Top"><strong>Ext 1 (-x3) </strong></td>
<td align="Left" valign="Top"><strong>Ext 2 (-x7) </strong></td>
<td align="Left" valign="Top"><strong>Ext 3 (-x5) </strong></td>
<td align="Left" valign="Top"><strong>Ext 4 (-x9) </strong></td></tr>
<tr>
<td align="Left" valign="Top">48 </td>
<td align="Left" valign="Top"> 8048
</td>
<td align="Left" valign="Top">8041A
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">8022
</td>
<td align="Left" valign="Top">8021
</td></tr>
<tr>
<td align="Left" valign="Top">65
</td>
<td align="Left" valign="Top">6502
</td>
<td align="Left" valign="Top">R65C02
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">R65C00/21
</td>
<td align="Left" valign="Top"></td></tr>
<tr>
<td align="Left" valign="Top">05
</td>
<td align="Left" valign="Top">6805
</td>
<td align="Left" valign="Top">M146805 CMOS
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">HC05C4
</td>
<td align="Left" valign="Top"></td></tr>
<tr>
<td align="Left" valign="Top">80
</td>
<td align="Left" valign="Top">Z80
</td>
<td align="Left" valign="Top">HD64180
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td></tr>
<tr>
<td align="Left" valign="Top">68
</td>
<td align="Left" valign="Top">6800
</td>
<td align="Left" valign="Top">6801/6803
</td>
<td align="Left" valign="Top">68HC11
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td></tr>
<tr>
<td align="Left" valign="Top">51
</td>
<td align="Left" valign="Top">8051
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td></tr>
<tr>
<td align="Left" valign="Top">85
</td>
<td align="Left" valign="Top">8080
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td></tr>
<tr>
<td align="Left" valign="Top">3210
</td>
<td align="Left" valign="Top">TMS32010
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td></tr>
<tr>
<td align="Left" valign="Top">3225
</td>
<td align="Left" valign="Top">TMS320C25
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">TMS320C26
</td>
<td align="Left" valign="Top"></td></tr>
<tr>
<td align="Left" valign="Top">70
</td>
<td align="Left" valign="Top">TMS7000
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top"></td></tr></tbody></table>
<p>The above table does not attempt to show the many microprocessor family
members that may apply under a given column.</p>
<p>See the TASMTABS.TXT on-line document for details on each specific table.</p>
<h2>y - Enable Assembly Timing</h2>
<p>If this option is enabled TASM will generate a statement of elapsed time and
assembled lines per second at the end of the assembly.</p>
<h1><a name="ENVIRONMENT VARIABLES">ENVIRONMENT VARIABLES</a></h1>
<p>The TASM environment can be customized by using the environment variables
listed below:</p>
<h2>TASMTABS</h2>
<p>The TASMTABS variable specifies the path to be searched for TASM instruction
set definition tables. If it is not defined then the table(s) must exist in the
current working directory. The following examples illustrate possible usage:</p>
<table>
<tbody><tr>
<td>For MSDOS </td>
<td><tt>set TASMTABS=C:\TASM</tt></td></tr>
<tr>
<td>For LINUX </td>
<td><tt>TASMTABS=/tasm</tt></td></tr></tbody></table>
<h2>TASMOPTS</h2>
<p>This variable specifies TASM command line options that are to be invoked
every time TASM is executed. For example, if TASM is being used for 8048
assemblies with binary object file output desired, the following statement would
be appropriate in the AUTOEXEC.BAT file:</p>
<pre> set TASMOPTS=-48 -b</pre>
<h1><a name="EXIT CODES">EXIT CODES</a></h1>
<p>When TASM terminates, it will return to the OS the following exit codes:</p>
<table border="BORDER">
<tbody><tr>
<td align="Left" valign="Top"><strong>Exit Code </strong></td>
<td align="Left" valign="Top"><b>Definition</b></td></tr>
<tr>
<td align="CENTER" valign="Top">0 </td>
<td align="Left" valign="Top">Normal completion, no assembly errors </td></tr>
<tr>
<td align="CENTER" valign="Top">1 </td>
<td align="Left" valign="Top">Normal completion, with assembly errors </td></tr>
<tr>
<td align="CENTER" valign="Top">2 </td>
<td align="Left" valign="Top">Abnormal completion, insufficient memory </td></tr>
<tr>
<td align="CENTER" valign="Top">3 </td>
<td align="Left" valign="Top">Abnormal completion, file access error </td></tr>
<tr>
<td align="CENTER" valign="Top">4 </td>
<td align="Left" valign="Top">Abnormal completion, general error </td></tr></tbody></table>
<p>Exit codes 2 and above will also be accompanied by messages to the console
concerning the error.</p>
<h1><a name="SOURCE FILE FORMAT">SOURCE FILE FORMAT</a></h1>
<p>Statements in the source file must conform to a format as follows (except
for assembler directive statements which are described in a subsequent section):</p>
<p><i>label operation operand comment</i></p>
<p>All of the fields are optional, under appropriate circumstances. An
arbitrary amount of white space (space and tabs) can separate each field (as
long as the maximum line length of 255 characters is not exceeded). Each of the
fields are described in the following sections.</p>
<h2>Label Field.</h2>
<p>If the first character of the line is alphabetic, it is assumed to be the
start of a label. Subsequent characters are accepted as part of that label until
a space, tab, or ':' is encountered. The assembler assigns a value to the label
corresponding to the current location counter. Labels can be a maximum of 32
characters long. Labels can contain upper and lower case letters, digits,
underscores, and periods (the first character must be alphabetic). Labels are
case sensitive - the label 'START' is a different label from 'start' - unless
the '-i' (ignore case) option is enabled.</p>
<h2>Operation Field.</h2>
<p>The operation field contains an instruction mnemonic which specifies the
action to be carried out by the target processor when this instruction is
executed. The interpretation of each mnemonic is dependent on the target
microprocessor (as indicated by the selected TASM table). The operation field
may begin in any column except the first. The operation field is case
insensitive.</p>
<h2>Operand Field.</h2>
<p>The operand field specifies the data to be operated on by the instruction.
It may include expressions and/or special symbols describing the addressing mode
to be used. The actual format and interpretation is dependent on the target
processor. For a description of the format for currently supported processors,
see the TASMTABS.DOC file on the TASM distribution disk.</p>
<h2>Comment Field. </h2>
<p>The comment field always begins with a semicolon. The rest of the line from
the semicolon to the end of the line is ignored by TASM, but passed on to the
listing file for annotation purposes. The comment field must be the last field
on a line, but it may be the only field, starting in column one, if desired.</p>
<h2>Multiple Statement Lines.</h2>
<p>If the backslash character is encountered on a source line, it is treated as
a newline. The remainder of the line following the backslash will be processed
as an independent line of source code. This allows one to put multiple
statements on a line. This facility is not so useful of itself, but when coupled
with the capability of the DEFINE directive, powerful multiple statement macros
can be constructed (see section on <b>ASSEMBLER DIRECTIVES</b>). Note that
when using the statement separator, the character immediately following it
should be considered the first character of a new line, and thus must either be
a start of a label or white space (not an instruction). As the examples show, a
space is put between the backslash and the start of the next instruction.</p>
<h2>Sample Source Listing.</h2>
<p>Some examples of valid source statements follow (6502 mnemonics shown):</p>
<pre> lab1 lda byte1 ;get the first byte
dec byte1
jne label1
;
lab2 sta byte2,X
; a multiple statement line follows
lda byte1\ sta byte1+4\ lda byte2\ sta byte2+4</pre>
<h1><a name="EXPRESSIONS">EXPRESSIONS</a></h1>
<p>Expressions are made up of various syntactic elements combined according to
a set of syntactical rules. Expressions can be comprised of the following
elements:</p>
<ul>
<li>Labels</li>
<li>Constants</li>
<li>Location Counter Symbol</li>
<li>Operators</li>
<li>Parenthesis</li></ul>
<h2>Labels</h2>
<p>Labels are strings of characters that have a numeric value associated with
them, generally representing an address. Labels can contain upper and lower
case letters, digits, underscores, and periods. The first character must be a
letter or the local label prefix (default '_'). The value of a label is limited
to 32 bit precision. Labels can contain up to 32 characters, all of which are
significant (none are ignored when looking at a label's value, as in some
assemblers). Case is significant unless the '-i' command line option is
invoked.</p>
<p>Local labels must only be unique within the scope of the current module.
Modules are defined with the MODULE directive. Here is an example:</p>
<pre> .MODULE xxx
lda regx
jne _skip
dec
_skip rts
.MODULE yyy
lda regy
jne _skip
dec
_skip rts
</pre>
<p>In the above example, the<i> _skip</i> label is reused without harm. As a
default, local labels are not shown in the label table listing (resulting from
the '-l' command line option). See also sections on MODULE and LOCALLABELCHAR
directives.</p>
<h2>Numeric Constants</h2>
<p>Numeric constants must always begin with a decimal digit (thus hexadecimal
constants that start with a letter must be prefixed by a '0' unless the '$'
prefix is used). The radix is determined by a letter immediately following the
digit string according to the following table:</p>
<table border="BORDER">
<tbody><tr>
<td align="Left" valign="Top"><strong>Radix </strong></td>
<td align="Left" valign="Top"><strong>Suffix </strong></td>
<td align="Left" valign="Top"><strong>Prefix </strong></td></tr>
<tr>
<td align="CENTER" valign="Top">2 </td>
<td align="Left" valign="Top">B or b </td>
<td align="CENTER" valign="Top">% </td></tr>
<tr>
<td align="CENTER" valign="Top">8 </td>
<td align="Left" valign="Top">O or o </td>
<td align="CENTER" valign="Top">@ </td></tr>
<tr>
<td align="CENTER" valign="Top">10 </td>
<td align="Left" valign="Top">D or d (or nothing) </td>
<td align="Left" valign="Top"></td></tr>
<tr>
<td align="CENTER" valign="Top">16 </td>
<td align="Left" valign="Top">H or h </td>
<td align="CENTER" valign="Top">$ </td></tr></tbody></table>
<p>Decimal is the default radix, so decimal constants need no suffix or prefix.</p>
<p>The following representations are equivalent:</p>
<pre> 1234H or $1234
100d or 100
177400o or @177400
01011000b or %01011000
</pre>
<p>The prefixes are provided for compatibility with some other source code
formats but introduce a problem of ambiguity. Both '%' and '$' have alternate
uses ('%' for modulo, '$' for location counter symbol). The ambiguity is
resolved by examining the context. The '%' character is interpreted as the
modulo operator only if it is in a position suitable for a binary operator.
Similarly, if the first character following a '$' is a valid hexadecimal digit,
it is assumed to be a radix specifier and not the location counter.</p>
<h2>Character Constants</h2>
<p>Character constants are single characters surrounded by single quotes. The
ASCII value of the character in the quotes is returned. No escape provision
exists to represent non-printable characters within the quotes, but this is not
necessary since these can be just as easily represented as numeric constants (or
using the TEXT directive which does allow escapes).</p>
<h2>String Constants.</h2>
<p>String constants are one or more characters surrounded by double quotes.
Note that string constants are not allowed in expressions. They are only
allowable following the TITLE, BYTE, DB, and TEXT assembler directives. The
quoted strings may also contain escape sequences to put in unprintable values.
The following escape sequences are supported:</p>
<table border="BORDER">
<tbody><tr>
<td align="Left" valign="Top"><strong>Escape Sequence </strong></td>
<td align="Left" valign="Top"><strong>Description</strong> </td></tr>
<tr>
<td align="CENTER" valign="Top">\n </td>
<td align="Left" valign="Top">Line Feed </td></tr>
<tr>
<td align="CENTER" valign="Top">\r </td>
<td align="Left" valign="Top">Carriage return </td></tr>
<tr>
<td align="CENTER" valign="Top">\b </td>
<td align="Left" valign="Top">Backspace </td></tr>
<tr>
<td align="CENTER" valign="Top">\t </td>
<td align="Left" valign="Top">Tab </td></tr>
<tr>
<td align="CENTER" valign="Top">\f </td>
<td align="Left" valign="Top">Formfeed </td></tr>
<tr>
<td align="CENTER" valign="Top">\\ </td>
<td align="Left" valign="Top">Backslash </td></tr>
<tr>
<td align="CENTER" valign="Top">\" </td>
<td align="Left" valign="Top">Quote </td></tr>
<tr>
<td align="CENTER" valign="Top">\000 </td>
<td align="Left" valign="Top">Octal value of character </td></tr></tbody></table>
<h2>Location Counter Symbol</h2>
<p>The current value of the location counter (PC) can be used in expressions by
placing a '$' in the desired place. The Location Counter Symbol is allowable
anywhere a numeric constant is. (Note that if the '$' is followed by a decimal
digit then it is taken to be the hexadecimal radix indicator instead of the
Location Counter symbol, as mentioned above). The '*' may also be used to
represent the location counter, but is less preferred because of its ambiguity
with the multiplicative operator.</p>
<h2>Operators</h2>
<p>Expressions can optionally contain operators to perform some alterations or
calculations on particular values. The operators are summarized as follows:</p>
<table border="BORDER">
<tbody><tr>
<td align="CENTER" valign="Top"><strong>Operator </strong></td>
<td align="CENTER" valign="Top"><strong>Type </strong></td>
<td align="Left" valign="Top"><strong>Description </strong></td></tr>
<tr>
<td align="CENTER" valign="Top">+ </td>
<td align="CENTER" valign="Top">Additive
</td>
<td align="Left" valign="Top">addition
</td></tr>
<tr>
<td align="CENTER" valign="Top">-
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">subtraction
</td></tr>
<tr>
<td align="CENTER" valign="Top">*
</td>
<td align="Left" valign="Top">Multiplicative
</td>
<td align="Left" valign="Top">multiplication
</td></tr>
<tr>
<td align="CENTER" valign="Top">/
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">division
</td></tr>
<tr>
<td align="CENTER" valign="Top">%
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">modulo
</td></tr>
<tr>
<td align="CENTER" valign="Top"><<</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">logical shift left
</td></tr>
<tr>
<td align="CENTER" valign="Top">>>
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">logical shift right
</td></tr>
<tr>
<td align="CENTER" valign="Top">~
</td>
<td align="Left" valign="Top">Unary
</td>
<td align="Left" valign="Top">bit inversion (one's complement)
</td></tr>
<tr>
<td align="CENTER" valign="Top">-
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">unary negation
</td></tr>
<tr>
<td align="CENTER" valign="Top">=
</td>
<td align="Left" valign="Top">Relational
</td>
<td align="Left" valign="Top">equal
</td></tr>
<tr>
<td align="CENTER" valign="Top">==
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">equal
</td></tr>
<tr>
<td align="CENTER" valign="Top">!=
</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">not equal
</td></tr>
<tr>
<td align="CENTER" valign="Top"><</td>
<td align="Left" valign="Top"></td>
<td align="Left" valign="Top">less than