Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ldrw: MACRO
- if (\3 == 0) || (\3 == "offset")
- if "\1" == "a"
- if \4 == 0 ; low
- db $fa, $fa, (\2 + BOOTSTRAP_OFFSET) >> 8
- else
- db $fa, (\2 + BOOTSTRAP_OFFSET) & $ff, (\2 + BOOTSTRAP_OFFSET) & $ff
- endc
- elif "\2" == "a"
- if \4 == 0 ; low
- db $ea, $ea, (\1 + BOOTSTRAP_OFFSET) >> 8
- else
- db $ea, (\1 + BOOTSTRAP_OFFSET) & $ff, (\2 + BOOTSTRAP_OFFSET) & $ff
- endc
- else
- if _NARG == 3
- db (\2 + BOOTSTRAP_OFFSET) & $ff, (\2 + BOOTSTRAP_OFFSET) & $ff, (\2 + BOOTSTRAP_OFFSET) >> 8
- else
- if \4 == 0 ; low
- db (\2 + BOOTSTRAP_OFFSET) >> 8, (\2 + BOOTSTRAP_OFFSET) >> 8, (\2 + BOOTSTRAP_OFFSET) >> 8
- else
- db (\2 + BOOTSTRAP_OFFSET) & $ff, (\2 + BOOTSTRAP_OFFSET) & $ff, (\2 + BOOTSTRAP_OFFSET) & $ff
- endc
- endc
- endc
- else
- if "\1" == "a"
- if \4 == 0 ; low
- db $fa, $fa, \2 >> 8
- else
- db $fa, \2 & $ff, \2 & $ff
- endc
- elif "\2" == "a"
- if \4 == 0 ; low
- db $ea, $ea, \1 >> 8
- else
- db $ea, \1 & $ff, \1 & $ff
- endc
- else
- if _NARG == 3
- db \2 & $ff, \2 & $ff, \2 >> 8
- else
- if \4 == 0 ; low
- db \2 >> 8, \2 >> 8, \2 >> 8
- else
- db \2 & $ff, \2 & $ff, \2 & $ff
- endc
- endc
- endc
- endc
- ENDM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement