Section 9.1: The history of assembler programs (Frame 3)                     [prev][home][next]

Here's an example of an extremely simple assembler program that just adds two integers together and stores the result in another word of memory:

        LOD    A
        ADD    B
        STD    C
        HLT
A:      NUM    5
B:      NUM    7
C:      NUM    0

The computer of course cannot read this directly as characters. Actually, if the computer ran into a sequence of ASCII characters, it would try executing them as instructions because it would not "know" that the values were supposed to be printable characters instead of executable instructions. It's all just bits inside the computer memory!