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 Format2.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,... COMMENTThe 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 line2.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.
猜您喜欢
评论