68kasm is a two-pass 68000, 68008 & 68010 cross-assembler which generates a formatted listing file and an S-record (MIKBUG) object code file from an assembly language source file.
This program was originally written during 1986 in VAX-11 C by Paul McKee at North Carolina State University. It has since been modified at Trinity College Dublin for course 3d2 by the addition of, amongst other things, a simple MACRO facility. The program has also been ported to run under Windows95, WFW 3.11 and Alpha OSF/1.
2. Source Code Format
2.1 Source Line Format
The input to the assembler is a file containing instructions, assembler directives and comments. Each line of the file may be up to 256 characters long. It is recommended that source lines do not exceed 80 characters as this will guarantee that the lines of the listing file will not be longer than 132 characters. The assembler folds all lowercase letters to uppercase except for strings and ASCII constants. Each source line comprises the following fields:
LABEL OPERATION OPERAND,OPERAND,... COMMENT
The fields may be separated by any number of spaces and tabs. There must be no spaces or tabs within a field apart from comments, strings and ASCII constants. For example:
LOOP MOVE.L (A0)+,(A1)+ Sample source line
2.1.1 Label Field
Legal labels follow the rules for forming symbol names described in section 2.2. Labels may be distinguished in one of two ways: (i) they may begin in column 1 or (ii) they may end in a colon which does not become part of the label but simply serves to mark its end. A line may consist of a label alone. A label is defined to have a value equal to the current location counter and this symbol may be used elsewhere is the program to refer to that location.
2.1.2 Operation Field
The operation field specifies a valid instruction or assembler directive. A size suffix (.B, .W, .L or .S) may be appended to the operation code (if allowed) to specify respectively Byte, Word, Long, or Short operations. The operation field must not start in column 1 because it would then be confused with a label.
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部0条评论
快来发表一下你的评论吧 !