mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-25 11:04:18 +08:00
27 lines
312 B
NASM
27 lines
312 B
NASM
|
|
.MACRO RESERVE_STR P1=0 P2
|
|
.SDATA .SUBSTR("ABCDEFG",\P1,\P2)
|
|
.ENDM
|
|
|
|
RESERVE_STR 2,2
|
|
RESERVE_STR ,3
|
|
|
|
|
|
.MACRO FIND_STR P1
|
|
.DATA.W .INSTR("ABCDEFG","\P1", 0)
|
|
.ENDM
|
|
|
|
FIND_STR CDE
|
|
FIND_STR H
|
|
|
|
.MACRO RESERVE_LENGTH P1
|
|
.ALIGN 4
|
|
.SRES .LEN("\P1")
|
|
.ENDM
|
|
|
|
RESERVE_LENGTH ABCDEF
|
|
RESERVE_LENGTH ABC
|
|
|
|
.END
|
|
|