Today
...would you expect that we're loading the low byte or the high byte of SOME_LABEL?
>
is rather universal for the high byte while
<
selects the low byte.
Rather easy to remember when assuming that writing is left to right as well as most 8 bit micros being little endian.
<
thus points to the left, to the beginning, to the lowbyte, while
>
points to the right, to the later, to the high byte.
The Day Before Today
Then again, as Fadden reminds, Apple's EDASM did use it the other way around as documented on p.196 of the ProDOS Assembler Tools Manual:
So there may have been other assemblers following that notation...
Exit Strategy
To get away from the ambiguity some assemblers also offer text based operators, like
- CC65 having .LOBYTE and .HIBYTE
- BeepASM offering LO(val) and HI(val)
The x80s
For the 8080/Z80 part it might be noteworthy that the original CP/M ASM did not provide an operator to select either byte. And I can't come up with any genuine (*1) 8080/Z80 that does, which makes sense as the 8080 does have basic 16 bit capabilities for address handling. An 8080 can load a 16 bit immediate direct into BC/DE/HL/SP, eliminating the need to load either half in next to all situations.
In turn x80 and x86 Assemblers could use those symbols as brackets for macro parameters or structures.
6500 World View
In contrast the 6502 had to load and store each byte separate, making those operators almost mandatory. 'Almost' as the original MOS Cross Assembler (*2) did not feature either. This gets even more interesting as the whole First Book of KIM, dedicated entirely to assembly (*3), doesn't use it either.
Are we doing something wrong today, when using tons of such expressions? (*4)
Going Down the Rat Hole
The Assembler used for the Apple II monitor ROM did as well not utilize either but simply assumed the low 8 bit of any (16 bit) expression when an 8 bit value was to be inserted as seen in the reference manual on p.171 (*5):
All of that becomes even more strange as Commodore already announced the Resident Assembler in 1977 - which does mention that syntax:
Same goes for the 1978 AIM65 assembler as seen on page 5-20 of the Users Guide:
Those are all assemblers of the 'official' MOS linage - but it becomes curious when looking at the PET Resident Assembler of 1978. Its manual seems to be a modification of the KIM Manual (*6). Except it leaves out the section about Immediate Address Handling. But at the same time it uses those operators in an example on p.18:
Confusing, isn't it?
*1 - That is assemblers made back then and specific for those CPUs. Not any later multi platform/CPU assembler.
*2 - MOS offered an online package on a GE mainframe as tool to get 6502 systems going - after all, how else to bootstrap development :))
*3 - It seems as if several different assemblers have been used - which might not have mattered at all, as users would have typed in the hex codes only :))
*4 - That or simply having more dynamic setup for more complex environments.
*5 - The 1977 version used for the original Monitor seem to have no instruction for 16 bit constants, only DFB to define 8 bit constants. The 1978 version used for the Autostart-Monitor added DW, but still used the same way of handling low/high byte in immeditate values.
This is especially remarkable as the MOS Cross Assembler already offered .WORD for 16 bit constants.
*6 - Which in turn got the same structure as the Cross Assembler manual. They all look like made by editing the previous one.