AZM-COM.DOC by Mike Rubenstein The Z80MR creates two output files from an assembly language source file with an .AZM extention. The assembly language file can be any combina- tion of Z80 mnemonics or assembler commands and pseudo-ops in the cor- rect form as described in the file Z80MR.DOC. Each line of the source program is seperated by a carriage return, linefeed and can be created on any editor. The object file is the executable machine code represented by ASCII characters in a form known as Intel hex format. The object file will have the same filename as the source file but it will have a .HEX exten- sion. This format must be translated into the actual machine executable binary values in order to be run on a computer. This can be done with LOAD.COM or DDT.COM which came with your CP/M, described later. The listing file is the other ouput by the assembler. It is an ASCII representation of the code actually produced by the assembler. There are many options available for controlling what is included in the list- ing file as described in Z80MR.DOC. The listing file will have the same filename as the source file but will have a .PRN extension. Invoking the Assembler ---------------------- To assemble the file TEST.AZM, the following command can be used: Z80MR TEST The assembler will read in the file TEST.AZM from the current drive and create an object file TEST.HEX and a listing file TEST.PRN. Controlling Output ------------------ Either of the output files (or both) may be omitted. In addition, the files may be located on different drives. Since the source file must always have an .AZM extention, we may use the extention to control the output: Z80MR TEST.BBZ ^^^ |||_ drive for the .PRN file ||_ drive for the output .HEX file |_ drive to find the source .AZM file This is identical to that you may already have used for ASM.COM, MAC,COM and other assemblers. The 'Z' is needed if you do not want that file to be generated. Loading Hex Files ----------------- The object file must be translated from Hex format to machine executable values by another program. If the program was written to ORG at 100H, the program may be loaded with the CP/M utility LOAD.COM. This is quite standard with all normal CP/M programs. To convert TEST.HEX to TEST.COM just enter: B>LOAD TEST (TEST.HEX is assumed by LOAD.COM) If you have a program that does not ORG at 100H you must use DDT to read in the .HEX file which it does by translating the Hex format to binary as it reads it into memory. Once in memory you may manipulate it with DDT even SAVE an image of the program in memory actually creating a .COM file. If you write a program that ORGs where CP/M resides, you can wipe out CP/M and have to reset the computer to recover. See the file called PHASE.DOC for some more information on ORGing files at High memory loca- tions. end