As the man page says, or as
xmodmap -pke will show:
keycode NUMBER = KEYSYMNAME ...
The list of keysyms is assigned to the indicated keycode (which
may be specified in decimal, hex or octal and can be determined
by running the xev program). Up to eight keysyms may be
attached to a key, however the last four are not used in any
major X server implementation. The first keysym is used when
no modifier key is pressed in conjunction with this key, the
second with Shift, the third when the Mode_switch key is used
with this key and the fourth when both the Mode_switch and
Shift keys are used.
This means that
keycode 38 mod1 = ...
is illegal syntax.
xkbd, there can be more than four keysyms, and the additional keysyms behave as specified. For example, with the
level3(ralt_switch) xkb-option active (which is the default on my distribution), the right alt key is mapped to
ISO3_Level_Shift, and the 5th to 8th keysym describe the results when RAlt is additionally pressed. So in that case, you can do something like
keycode 38 = a A a A Right Right Right Right
or something similar, depending on what you want ShiftAltA etc. to produce.