mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
0247c1c073
truncated files, so that the tests pass.
50 lines
637 B
Plaintext
50 lines
637 B
Plaintext
!
|
|
|
|
! .MACRO RESERVE_STR P1=0 P2
|
|
! .SDATA .SUBSTR("ABCDEFG",\P1,\P2)
|
|
! .ENDM
|
|
!
|
|
|
|
! RESERVE_STR 2,2
|
|
! .SDATA .SUBSTR("ABCDEFG",2,2)
|
|
.byte 67,68
|
|
! RESERVE_STR ,3
|
|
! .SDATA .SUBSTR("ABCDEFG",0,3)
|
|
.byte 65,66,67
|
|
!
|
|
|
|
!
|
|
|
|
! .MACRO FIND_STR P1
|
|
! .DATA.W .INSTR("ABCDEFG","\P1", 0)
|
|
! .ENDM
|
|
!
|
|
|
|
! FIND_STR CDE
|
|
! .DATA.W .INSTR("ABCDEFG","CDE", 0)
|
|
.short 2
|
|
! FIND_STR H
|
|
! .DATA.W .INSTR("ABCDEFG","H", 0)
|
|
.short -1
|
|
!
|
|
|
|
! .MACRO RESERVE_LENGTH P1
|
|
! .ALIGN 4
|
|
! .SRES .LEN("\P1")
|
|
! .ENDM
|
|
!
|
|
|
|
! RESERVE_LENGTH ABCDEF
|
|
! .ALIGN 4
|
|
.align 4
|
|
! .SRES .LEN("ABCDEF")
|
|
.space 24
|
|
! RESERVE_LENGTH ABC
|
|
! .ALIGN 4
|
|
.align 4
|
|
! .SRES .LEN("ABC")
|
|
.space 12
|
|
!
|
|
|
|
! .END
|