old-cross-binutils/gas/testsuite/gasp/sfunc.is

51 lines
656 B
Text
Raw Normal View History

1994-01-31 16:53:03 +00:00
******** sfunc.amp
!
! .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