Unlike many assemblers, the CrossWorks orizon assembler fully understands data types. The most well-known and widely used assembler that uses data typing extensively is Microsoft's MASM and its many clones. So, if you've used MASM before you should be pretty well at home with the concept of data types in an assembler and also with the CrossWorks implementation of data typing.
If you haven't used MASM before you may well wonder why data typing should ever be put into an assembler, given that many assembly programs are written without the help of data types at all. But there are many good reasons to do so, even without the precedent set by Microsoft, and the two most valuable benefits are:
- The ability to catch potential or real errors at assembly time rather than letting them through the assembler to go undetected until applications are deployed in the field.
- Data typing is an additional and effective source of program documentation, describing the way data are grouped and represented.
We don't expect you to fully appreciate the usefulness of assembly-level data typing until you’ve used it in an application and had first-hand experience of both benefits above. Of course, it's still possible to write (almost) typeless assembly code using the CrossWorks assembler if you should wish to do so, but effective use of data typing is a real programmer aid when writing code. Lastly, we should just mention one other important benefit that data typing brings and that is the interaction between properly-typed assembly code and the debugger. If you correctly type your data, the debugger will present the values held in memory using a format based on the type of the object rather than as a string of hexadecimal bytes. Having source-level debugging information displayed in a human-readable format is surely a way to improve productivity.