!
!
-
! .END
-assign.amp:8 Can't find preprocessor variable bar.
+assign.asm:8 Can't find preprocessor variable bar.
!
!
-
! .END
-assign.amp:8 Can't find preprocessor variable bar.
+assign.asm:8 Can't find preprocessor variable bar.
! THERE
THERE
! bar
-crash.amp:18 Unreasonable expansion (-u turns off check).
+crash.asm:18 Unreasonable expansion (-u turns off check).
! THERE
THERE
! bar
-crash.amp:18 Unreasonable expansion (-u turns off check).
+crash.asm:18 Unreasonable expansion (-u turns off check).
!
! .END
-crash1.amp:8 Too many positional arguments.
+crash1.asm:8 Too many positional arguments.
!
! .END
-crash1.amp:8 Too many positional arguments.
+crash1.asm:8 Too many positional arguments.
--- /dev/null
+******** crash2.amp
+!
+
+!foo: .ASSIGNA 1
+! \&foo+1
+ 1+1
+! \&foo+1
+ 1+1
+!foo: .ASSIGNC "foo"
+! \&foo+1
+ foo+1
+! \&foo+1
+ foo+1
+!
+
+!foo: .ASSIGNA 1
+! \&foo+1
+ 1+1
+! \&foo+1
+ 1+1
+!foo: .ASSIGNC "foo"
+! \&foo+1
+ foo+1
+! \&foo+1
+ foo+1
+!
+
+!foo: .ASSIGNA 1
+! \&foo+1
+ 1+1
+! \&foo+1
+ 1+1
+!foo: .ASSIGNC "foo"
+! \&foo+1
+ foo+1
+! \&foo+1
+ foo+1
+!
+
+!foo: .ASSIGNA 1
+! \&foo+1
+ 1+1
+! \&foo+1
+ 1+1
+!foo: .ASSIGNC "foo"
+! \&foo+1
+ foo+1
+! \&foo+1
+ foo+1
+!
+
+!foo: .ASSIGNA 1
+! \&foo+1
+ 1+1
+! \&foo+1
+ 1+1
+!foo: .ASSIGNC "foo"
+! \&foo+1
+ foo+1
+! \&foo+1
+ foo+1
+! foo
+ foo
+! foo foo
+ foo foo
+! foo foo
+ foo foo
+! foo
+ foo
+! .END
--- /dev/null
+******** crash2.amp
+!
+
+!foo: .ASSIGNA 1
+! \&foo+1
+ 1+1
+! \&foo+1
+ 1+1
+!foo: .ASSIGNC "foo"
+! \&foo+1
+ foo+1
+! \&foo+1
+ foo+1
+!
+
+!foo: .ASSIGNA 1
+! \&foo+1
+ 1+1
+! \&foo+1
+ 1+1
+!foo: .ASSIGNC "foo"
+! \&foo+1
+ foo+1
+! \&foo+1
+ foo+1
+!
+
+!foo: .ASSIGNA 1
+! \&foo+1
+ 1+1
+! \&foo+1
+ 1+1
+!foo: .ASSIGNC "foo"
+! \&foo+1
+ foo+1
+! \&foo+1
+ foo+1
+!
+
+!foo: .ASSIGNA 1
+! \&foo+1
+ 1+1
+! \&foo+1
+ 1+1
+!foo: .ASSIGNC "foo"
+! \&foo+1
+ foo+1
+! \&foo+1
+ foo+1
+!
+
+!foo: .ASSIGNA 1
+! \&foo+1
+ 1+1
+! \&foo+1
+ 1+1
+!foo: .ASSIGNC "foo"
+! \&foo+1
+ foo+1
+! \&foo+1
+ foo+1
+! foo
+ foo
+! foo foo
+ foo foo
+! foo foo
+ foo foo
+! foo
+ foo
+! .END
!space1 .EQU 1 + 2 +3+FOO + 3
!space2
-space2:
+space2:
!
!; from the SH manual
!
!
-
!
! .END
-exp.amp:56 can't add two relocatable expressions
-exp.amp:57 the * operator cannot take non-absolute arguments.
-exp.amp:58 the / operator cannot take non-absolute arguments.
-exp.amp:59 the | operator cannot take non-absolute arguments.
-exp.amp:60 the & operator cannot take non-absolute arguments.
-exp.amp:61 the ~ operator cannot take non-absolute arguments.
-exp.amp:62 the * operator cannot take non-absolute arguments.
+exp.asm:56 can't add two relocatable expressions
+exp.asm:57 the * operator cannot take non-absolute arguments.
+exp.asm:58 the / operator cannot take non-absolute arguments.
+exp.asm:59 the | operator cannot take non-absolute arguments.
+exp.asm:60 the & operator cannot take non-absolute arguments.
+exp.asm:61 the ~ operator cannot take non-absolute arguments.
+exp.asm:62 the * operator cannot take non-absolute arguments.
!space1 .EQU 1 + 2 +3+FOO + 3
!space2
-space2:
+space2:
!
!; from the SH manual
!
!
-
!
! .END
-exp.amp:56 can't add two relocatable expressions
-exp.amp:57 the * operator cannot take non-absolute arguments.
-exp.amp:58 the / operator cannot take non-absolute arguments.
-exp.amp:59 the | operator cannot take non-absolute arguments.
-exp.amp:60 the & operator cannot take non-absolute arguments.
-exp.amp:61 the ~ operator cannot take non-absolute arguments.
-exp.amp:62 the * operator cannot take non-absolute arguments.
+exp.asm:56 can't add two relocatable expressions
+exp.asm:57 the * operator cannot take non-absolute arguments.
+exp.asm:58 the / operator cannot take non-absolute arguments.
+exp.asm:59 the | operator cannot take non-absolute arguments.
+exp.asm:60 the & operator cannot take non-absolute arguments.
+exp.asm:61 the ~ operator cannot take non-absolute arguments.
+exp.asm:62 the * operator cannot take non-absolute arguments.
! .FORM LIN=123 COL=23
.psize 123,23
!
-
! .END
-end of file not at start of line.
-.END missing from end of file.
+End of file not at start of line.
! .FORM LIN=123 COL=23
.psize 123,23
!
-
! .END
End of file not at start of line.
-.END missing from end of file.
! COMM
! bar ; this comment will get copied out
bar ; this comment will get copied out
-! foo
- foo
+! foo \; this one will get dropped
+ foo \; this one will get dropped
! BACK_SLASH_SET
! MOV #"\",R0
MOV #"\",R0
!
!
-
! .MACRO PUSH Rn
! MOV.L \Rn,@-r15
! .ENDM
!end_str\@
! .ENDM
!
-
! RES_STR "ONE",R0
! MOV.L #str00018,R0
MOV.L #str00018,R0
! .ALIGN 2
.align 2
!end_str00018
-end_str00018:
+end_str00018:
! RES_STR "TWO",R1
! MOV.L #str00019,R1
MOV.L #str00019,R1
! .ALIGN 2
.align 2
!end_str00019
-end_str00019:
+end_str00019:
! RES_STR "THREE",R2
! MOV.L #str00020,R2
MOV.L #str00020,R2
! .ALIGN 2
.align 2
!end_str00020
-end_str00020:
+end_str00020:
!
!
! .ALIGN 2
.align 2
!end_str00021
-end_str00021:
+end_str00021:
! RES_STR donkey,R1
! MOV.L #str00022,R1
MOV.L #str00022,R1
! .ALIGN 2
.align 2
!end_str00022
-end_str00022:
+end_str00022:
! RES_STR donkey Rn=R1
! .END
-macro.amp:70 Too many positional arguments.
-macro.amp:98 Can't mix positional and keyword arguments.
+macro.asm:70 Too many positional arguments.
+macro.asm:98 Can't mix positional and keyword arguments.
!
!
-
! .MACRO PUSH Rn
! MOV.L \Rn,@-r15
! .ENDM
!end_str\@
! .ENDM
!
-
! RES_STR "ONE",R0
! MOV.L #str00018,R0
MOV.L #str00018,R0
! .ALIGN 2
.align 2
!end_str00018
-end_str00018:
+end_str00018:
! RES_STR "TWO",R1
! MOV.L #str00019,R1
MOV.L #str00019,R1
! .ALIGN 2
.align 2
!end_str00019
-end_str00019:
+end_str00019:
! RES_STR "THREE",R2
! MOV.L #str00020,R2
MOV.L #str00020,R2
! .ALIGN 2
.align 2
!end_str00020
-end_str00020:
+end_str00020:
!
!
! .ALIGN 2
.align 2
!end_str00021
-end_str00021:
+end_str00021:
! RES_STR donkey,R1
! MOV.L #str00022,R1
MOV.L #str00022,R1
! .ALIGN 2
.align 2
!end_str00022
-end_str00022:
+end_str00022:
! RES_STR donkey Rn=R1
! .END
-macro.amp:70 Too many positional arguments.
-macro.amp:98 Can't mix positional and keyword arguments.
+macro.asm:70 Too many positional arguments.
+macro.asm:98 Can't mix positional and keyword arguments.
--- /dev/null
+
+ .MACRO HI
+ A
+ \! this is hidden
+ B
+ ! this is not
+ C
+ .ENDM
+ Hello
+ HI
+ Emily
+
+
+ H'0f
+ 200+H'0F
+
+XX .ASSIGNA Q'100
+! Definition:
+ .MACRO GET X=100,Y,Z
+ MOV #\X+H'0F,@B
+ \Y
+\Z JMP @MAIN
+L\@ ADD #1,@HL
+ MOV #0,@C \! Clear C
+ ADD #2,@C
+ ADD #\&XX, @C
+ .ENDM
+
+ NOP
+
+!Call:
+ GET 200,"ADD #1,@B", ENTRY
+ .END
+
+ ; Definition:
+
+
+ NOP
+
+ ;Call:
+ MOV #200+0F,@B
+ ADD #1,@B
+ENTRY: JMP @MAIN
+L00000: ADD #1,@HL
+ MOV #0,@C
+ ADD #2,@C
+ ADD #0, @C
--- /dev/null
+******** mdouble.amp
+!
+
+! H'0f
+ 15
+! 200+H'0F
+ 200+15
+!
+
+!XX .ASSIGNA Q'100
+!! Definition:
+ ! Definition:
+! .MACRO GET X=100,Y,Z
+! MOV #\X+H'0F,@B
+! \Y
+!\Z JMP @MAIN
+!L\@ ADD #1,@HL
+! MOV #0,@C \! Clear C
+! ADD #2,@C
+! ADD #\&XX, @C
+! .ENDM
+!
+
+! NOP
+ NOP
+!
+
+!!Call:
+ !Call:
+! GET 200,"ADD #1,@B", ENTRY
+! MOV #200+H'0F,@B
+ MOV #200+15,@B
+! ADD #1,@B
+ ADD #1,@B
+!ENTRY JMP @MAIN
+ENTRY: JMP @MAIN
+!L00000 ADD #1,@HL
+L00000: ADD #1,@HL
+! MOV #0,@C
+ MOV #0,@C
+! ADD #2,@C
+ ADD #2,@C
+! ADD #\&XX, @C
+ ADD #64, @C
+! .END
--- /dev/null
+******** mdouble.amp
+!
+
+! H'0f
+ 15
+! 200+H'0F
+ 200+15
+!
+
+!XX .ASSIGNA Q'100
+!! Definition:
+ ! Definition:
+! .MACRO GET X=100,Y,Z
+! MOV #\X+H'0F,@B
+! \Y
+!\Z JMP @MAIN
+!L\@ ADD #1,@HL
+! MOV #0,@C \! Clear C
+! ADD #2,@C
+! ADD #\&XX, @C
+! .ENDM
+!
+
+! NOP
+ NOP
+!
+
+!!Call:
+ !Call:
+! GET 200,"ADD #1,@B", ENTRY
+! MOV #200+H'0F,@B
+ MOV #200+15,@B
+! ADD #1,@B
+ ADD #1,@B
+!ENTRY JMP @MAIN
+ENTRY: JMP @MAIN
+!L00000 ADD #1,@HL
+L00000: ADD #1,@HL
+! MOV #0,@C
+ MOV #0,@C
+! ADD #2,@C
+ ADD #2,@C
+! ADD #\&XX, @C
+ ADD #64, @C
+! .END
--- /dev/null
+
+ .ALTERNATE
+
+alloc MACRO val1,val2
+ DB val1
+ DB val2
+ ENDM
+
+ alloc "that's" 'show biz'
+ alloc 0,1
+ alloc 0 1
+ alloc 0 1
+ alloc ,1
+
+
+
+
+
+
+
--- /dev/null
+******** pl1.amp
+!
+! .ALTERNATE
+!
+
+!alloc MACRO val1,val2
+! DB val1
+! DB val2
+! ENDM
+!
+
+! alloc "that's" 'show biz'
+! DB "that's"
+ .byte 116,104,97,116,39,115
+! DB "show biz"
+ .byte 115,104,111,119,32,98,105,122
+! alloc 0,1
+! DB 0
+ .byte 0
+! DB 1
+ .byte 1
+! alloc 0 1
+! DB 0
+ .byte 0
+! DB 1
+ .byte 1
+! alloc 0 1
+! DB 0
+ .byte 0
+! DB 1
+ .byte 1
+! alloc ,1
+! DB
+ .byte
+! DB 1
+ .byte 1
+!
+
+!
+
+!
+!
+
+!
+
+!
+
+!
+
+!END missing from end of file.
--- /dev/null
+******** pl1.amp
+!
+! .ALTERNATE
+!
+
+!alloc MACRO val1,val2
+! DB val1
+! DB val2
+! ENDM
+!
+
+! alloc "that's" 'show biz'
+! DB "that's"
+ .byte 116,104,97,116,39,115
+! DB "show biz"
+ .byte 115,104,111,119,32,98,105,122
+! alloc 0,1
+! DB 0
+ .byte 0
+! DB 1
+ .byte 1
+! alloc 0 1
+! DB 0
+ .byte 0
+! DB 1
+ .byte 1
+! alloc 0 1
+! DB 0
+ .byte 0
+! DB 1
+ .byte 1
+! alloc ,1
+! DB
+ .byte
+! DB 1
+ .byte 1
+!
+
+!
+
+!
+!
+
+!
+
+!
+
+!
+
+!END missing from end of file.
--- /dev/null
+
+
+ .ALTERNATE
+
+ ! ok
+ !! also ok
+
+foo MACRO
+ ! you can see me
+ !! but not me
+ ! you can see me
+ !! but not me
+ but this "SHOULD !!BE OK"
+ ENDM
+
+ foo
+
+
+define MACRO val1,val2
+ DB val1 ! this comment will show up
+ DB val2 !! this on won't
+ ENDM
+
+ define 0,1
+
+
+ END
+
\ No newline at end of file
--- /dev/null
+******** pl2.amp
+!
+
+!
+
+! .ALTERNATE
+!
+
+! ! ok
+ ! ok
+! !! also ok
+ !! also ok
+!
+
+!foo MACRO
+! ! you can see me
+! !! but not me
+! ! you can see me
+! !! but not me
+! but this "SHOULD !!BE OK"
+! ENDM
+!
+
+! foo
+! ! you can see me
+ ! you can see me
+!
+! ! you can see me
+ ! you can see me
+!
+! but this "SHOULD !!BE OK"
+ but this "SHOULD !!BE OK"
+!
+
+!
+
+!define MACRO val1,val2
+! DB val1 ! this comment will show up
+! DB val2 !! this on won't
+! ENDM
+!
+
+! define 0,1
+! DB 0 ! this comment will show up
+ .byte 0! this comment will show up
+! DB 1
+ .byte 1
+!
+
+!
+
+! END
--- /dev/null
+******** pl2.amp
+!
+
+!
+
+! .ALTERNATE
+!
+
+! ! ok
+ ! ok
+! !! also ok
+ !! also ok
+!
+
+!foo MACRO
+! ! you can see me
+! !! but not me
+! ! you can see me
+! !! but not me
+! but this "SHOULD !!BE OK"
+! ENDM
+!
+
+! foo
+! ! you can see me
+ ! you can see me
+!
+! ! you can see me
+ ! you can see me
+!
+! but this "SHOULD !!BE OK"
+ but this "SHOULD !!BE OK"
+!
+
+!
+
+!define MACRO val1,val2
+! DB val1 ! this comment will show up
+! DB val2 !! this on won't
+! ENDM
+!
+
+! define 0,1
+! DB 0 ! this comment will show up
+ .byte 0! this comment will show up
+! DB 1
+ .byte 1
+!
+
+!
+
+! END
--- /dev/null
+ .ALTERNATE
+
+foo MACRO string
+ LOCAL lab1, lab2
+lab1: DATA.L lab2
+lab2: SDATA string
+ ENDM
+
+ foo "An example"
+ foo "using LOCAL"
+
+! test of LOCAL directive
+
+chk_err MACRO limit
+ LOCAL skip !! frob
+ LOCAL zap,dog,barf
+barf: cmp ax,limit !! check value against
+ !! limit
+ jle skip !! skip call if OK
+skip: call error
+ foo dog
+ zap dog
+ nop
+ ENDM
+
+ chk_err 5
+ chk_err 10
+
+
+ END
--- /dev/null
+******** pl3.amp
+! .ALTERNATE
+!
+
+!foo MACRO string
+! LOCAL lab1, lab2
+!lab1: DATA.L lab2
+!lab2: SDATA string
+! ENDM
+!
+
+! foo "An example"
+! LOCAL lab1, lab2
+!lab1: DATA.L lab2
+LL0001: .long LL0002
+!lab2: SDATA "An example"
+LL0002: .byte 34,65,110,32,101,120,97,109,112,108,101,34
+! foo "using LOCAL"
+! LOCAL lab1, lab2
+!lab1: DATA.L lab2
+LL0003: .long LL0004
+!lab2: SDATA "using LOCAL"
+LL0004: .byte 34,117,115,105,110,103,32,76,79,67,65,76,34
+!
+
+!! test of LOCAL directive
+ ! test of LOCAL directive
+!
+
+!chk_err MACRO limit
+! LOCAL skip !! frob
+! LOCAL zap,dog,barf
+!barf: cmp ax,limit !! check value against
+! !! limit
+! jle skip !! skip call if OK
+!skip: call error
+! foo dog
+! zap dog
+! nop
+! ENDM
+!
+
+! chk_err 5
+! LOCAL skip
+! LOCAL zap,dog,barf
+!barf: cmp ax,5
+LL0008: cmp ax,5
+!
+! jle skip
+ jle LL0005
+!skip: call error
+LL0005: call error
+! foo dog
+! LOCAL lab1, lab2
+!lab1: DATA.L lab2
+LL0009: .long LL000a
+!lab2: SDATA dog
+LL000a: .byte 76,76,48,48,48,55
+! zap dog
+ LL0006 LL0007
+! nop
+ nop
+! chk_err 10
+! LOCAL skip
+! LOCAL zap,dog,barf
+!barf: cmp ax,10
+LL000e: cmp ax,10
+!
+! jle skip
+ jle LL000b
+!skip: call error
+LL000b: call error
+! foo dog
+! LOCAL lab1, lab2
+!lab1: DATA.L lab2
+LL000f: .long LL0010
+!lab2: SDATA dog
+LL0010: .byte 76,76,48,48,48,100
+! zap dog
+ LL000c LL000d
+! nop
+ nop
+!
+
+!
+
+! END
--- /dev/null
+******** pl3.amp
+! .ALTERNATE
+!
+
+!foo MACRO string
+! LOCAL lab1, lab2
+!lab1: DATA.L lab2
+!lab2: SDATA string
+! ENDM
+!
+
+! foo "An example"
+! LOCAL lab1, lab2
+!lab1: DATA.L lab2
+LL0001: .long LL0002
+!lab2: SDATA "An example"
+LL0002: .byte 34,65,110,32,101,120,97,109,112,108,101,34
+! foo "using LOCAL"
+! LOCAL lab1, lab2
+!lab1: DATA.L lab2
+LL0003: .long LL0004
+!lab2: SDATA "using LOCAL"
+LL0004: .byte 34,117,115,105,110,103,32,76,79,67,65,76,34
+!
+
+!! test of LOCAL directive
+ ! test of LOCAL directive
+!
+
+!chk_err MACRO limit
+! LOCAL skip !! frob
+! LOCAL zap,dog,barf
+!barf: cmp ax,limit !! check value against
+! !! limit
+! jle skip !! skip call if OK
+!skip: call error
+! foo dog
+! zap dog
+! nop
+! ENDM
+!
+
+! chk_err 5
+! LOCAL skip
+! LOCAL zap,dog,barf
+!barf: cmp ax,5
+LL0008: cmp ax,5
+!
+! jle skip
+ jle LL0005
+!skip: call error
+LL0005: call error
+! foo dog
+! LOCAL lab1, lab2
+!lab1: DATA.L lab2
+LL0009: .long LL000a
+!lab2: SDATA dog
+LL000a: .byte 76,76,48,48,48,55
+! zap dog
+ LL0006 LL0007
+! nop
+ nop
+! chk_err 10
+! LOCAL skip
+! LOCAL zap,dog,barf
+!barf: cmp ax,10
+LL000e: cmp ax,10
+!
+! jle skip
+ jle LL000b
+!skip: call error
+LL000b: call error
+! foo dog
+! LOCAL lab1, lab2
+!lab1: DATA.L lab2
+LL000f: .long LL0010
+!lab2: SDATA dog
+LL0010: .byte 76,76,48,48,48,100
+! zap dog
+ LL000c LL000d
+! nop
+ nop
+!
+
+!
+
+! END
--- /dev/null
+ .ALTERNATE
+! test of macro substitution around &s
+
+
+foo MACRO a,b
+ x&a&b
+ ENDM
+
+ foo 3 2
+ END
--- /dev/null
+******** pl4.amp
+! .ALTERNATE
+!! test of macro substitution around &s
+ ! test of macro substitution around &s
+!
+
+!
+
+!foo MACRO a,b
+! x&a&b
+! ENDM
+!
+
+! foo 3 2
+! x32
+ x32
+! END
--- /dev/null
+******** pl4.amp
+! .ALTERNATE
+!! test of macro substitution around &s
+ ! test of macro substitution around &s
+!
+
+!
+
+!foo MACRO a,b
+! x&a&b
+! ENDM
+!
+
+! foo 3 2
+! x32
+ x32
+! END
--- /dev/null
+! test of literal text operator
+ .ALTERNATE
+foop MACRO str1,str2
+ SDATA "str1"
+ SDATA str2
+ ENDM
+
+
+
+ foop this< is a <string> with angle brackets>
+ foop this< is a string with spaces>
+ foop this < is a string with a !>>
+
+
+ END
--- /dev/null
+******** pl5.amp
+!! test of literal text operator
+ ! test of literal text operator
+! .ALTERNATE
+!foop MACRO str1,str2
+! SDATA "str1"
+! SDATA str2
+! ENDM
+!
+
+!
+
+!
+! foop this< is a <string> with angle brackets>
+! SDATA "this"
+ .byte 34,116,104,105,115,34
+! SDATA " is a <string> with angle brackets"
+ .byte 34,32,105,115,32,97,32,60,115,116,114,105,110,103,62,32,119,105,116,104,32,97,110,103,108,101,32,98,114,97,99,107,101,116,115,34
+! foop this< is a string with spaces>
+! SDATA "this"
+ .byte 34,116,104,105,115,34
+! SDATA " is a string with spaces"
+ .byte 34,32,105,115,32,97,32,115,116,114,105,110,103,32,119,105,116,104,32,115,112,97,99,101,115,34
+! foop this < is a string with a !>>
+! SDATA "this"
+ .byte 34,116,104,105,115,34
+! SDATA " is a string with a >"
+ .byte 34,32,105,115,32,97,32,115,116,114,105,110,103,32,119,105,116,104,32,97,32,62,34
+!
+
+!
+
+! END
--- /dev/null
+******** pl5.amp
+!! test of literal text operator
+ ! test of literal text operator
+! .ALTERNATE
+!foop MACRO str1,str2
+! SDATA "str1"
+! SDATA str2
+! ENDM
+!
+
+!
+
+!
+! foop this< is a <string> with angle brackets>
+! SDATA "this"
+ .byte 34,116,104,105,115,34
+! SDATA " is a <string> with angle brackets"
+ .byte 34,32,105,115,32,97,32,60,115,116,114,105,110,103,62,32,119,105,116,104,32,97,110,103,108,101,32,98,114,97,99,107,101,116,115,34
+! foop this< is a string with spaces>
+! SDATA "this"
+ .byte 34,116,104,105,115,34
+! SDATA " is a string with spaces"
+ .byte 34,32,105,115,32,97,32,115,116,114,105,110,103,32,119,105,116,104,32,115,112,97,99,101,115,34
+! foop this < is a string with a !>>
+! SDATA "this"
+ .byte 34,116,104,105,115,34
+! SDATA " is a string with a >"
+ .byte 34,32,105,115,32,97,32,115,116,114,105,110,103,32,119,105,116,104,32,97,32,62,34
+!
+
+!
+
+! END
--- /dev/null
+ .ALTERNATE
+! test of expression operator
+define MACRO val, string
+ SDATA val
+ SDATA string
+ ENDM
+ define "1","99%of100" ! notice % within string
+ define %1 + 2, "=3"
+
+
+ define % 1 + 2 %3+4
+
+ define %3*4-2 <=10>
+
+ define %3*4-2 5
+
+ define %1 + 2,<is equal to %1 + 2, right?>
+
+ ! has no effect
+
+ end
--- /dev/null
+******** pl6.amp
+! .ALTERNATE
+!! test of expression operator
+ ! test of expression operator
+!define MACRO val, string
+! SDATA val
+! SDATA string
+! ENDM
+! define "1","99%of100" ! notice % within string
+! SDATA "1"
+ .byte 34,49,34
+! SDATA "99%of100"
+ .byte 34,57,57,37,111,102,49,48,48,34
+! define %1 + 2, "=3"
+! SDATA "3"
+ .byte 34,51,34
+! SDATA "=3"
+ .byte 34,61,51,34
+!
+
+!
+
+! define % 1 + 2 %3+4
+! SDATA "3"
+ .byte 34,51,34
+! SDATA "7"
+ .byte 34,55,34
+!
+
+! define %3*4-2 <=10>
+! SDATA "10"
+ .byte 34,49,48,34
+! SDATA "=10"
+ .byte 34,61,49,48,34
+!
+
+! define %3*4-2 5
+! SDATA "10"
+ .byte 34,49,48,34
+! SDATA 5
+ .byte 53
+!
+
+! define %1 + 2,<is equal to %1 + 2, right?>
+! SDATA "3"
+ .byte 34,51,34
+! SDATA "is equal to %1 + 2, right?"
+ .byte 34,105,115,32,101,113,117,97,108,32,116,111,32,37,49,32,43,32,50,44,32,114,105,103,104,116,63,34
+!
+
+! ! has no effect
+ ! has no effect
+!
+
+! end
--- /dev/null
+******** pl6.amp
+! .ALTERNATE
+!! test of expression operator
+ ! test of expression operator
+!define MACRO val, string
+! SDATA val
+! SDATA string
+! ENDM
+! define "1","99%of100" ! notice % within string
+! SDATA "1"
+ .byte 34,49,34
+! SDATA "99%of100"
+ .byte 34,57,57,37,111,102,49,48,48,34
+! define %1 + 2, "=3"
+! SDATA "3"
+ .byte 34,51,34
+! SDATA "=3"
+ .byte 34,61,51,34
+!
+
+!
+
+! define % 1 + 2 %3+4
+! SDATA "3"
+ .byte 34,51,34
+! SDATA "7"
+ .byte 34,55,34
+!
+
+! define %3*4-2 <=10>
+! SDATA "10"
+ .byte 34,49,48,34
+! SDATA "=10"
+ .byte 34,61,49,48,34
+!
+
+! define %3*4-2 5
+! SDATA "10"
+ .byte 34,49,48,34
+! SDATA 5
+ .byte 53
+!
+
+! define %1 + 2,<is equal to %1 + 2, right?>
+! SDATA "3"
+ .byte 34,51,34
+! SDATA "is equal to %1 + 2, right?"
+ .byte 34,105,115,32,101,113,117,97,108,32,116,111,32,37,49,32,43,32,50,44,32,114,105,103,104,116,63,34
+!
+
+! ! has no effect
+ ! has no effect
+!
+
+! end
--- /dev/null
+ .ALTERNATE
+! test of string operators
+define MACRO str1,str2
+ SDATA str1
+ SDATA "str2"
+ENDM
+ define one" way to get "spaces,0
+ define "lot's! of <special>,chars%", 0
+
+
+
+
--- /dev/null
+******** pl7.amp
+! .ALTERNATE
+!! test of string operators
+ ! test of string operators
+!define MACRO str1,str2
+! SDATA str1
+! SDATA "str2"
+!ENDM
+! define one" way to get "spaces,0
+! SDATA one" way to get "spaces
+ .byte 111,110,101,34,32,119,97,121,32,116,111,32,103,101,116,32,34,115,112,97,99,101,115
+! SDATA "0"
+ .byte 34,48,34
+! define "lot's! of <special>,chars%", 0
+! SDATA "lot's of <special>,chars%"
+ .byte 34,108,111,116,39,115,32,111,102,32,60,115,112,101,99,105,97,108,62,44,99,104,97,114,115,37,34
+! SDATA "0"
+ .byte 34,48,34
+!
+
+!
+
+!
+
+!
+
+!END missing from end of file.
--- /dev/null
+******** pl7.amp
+! .ALTERNATE
+!! test of string operators
+ ! test of string operators
+!define MACRO str1,str2
+! SDATA str1
+! SDATA "str2"
+!ENDM
+! define one" way to get "spaces,0
+! SDATA one" way to get "spaces
+ .byte 111,110,101,34,32,119,97,121,32,116,111,32,103,101,116,32,34,115,112,97,99,101,115
+! SDATA "0"
+ .byte 34,48,34
+! define "lot's! of <special>,chars%", 0
+! SDATA "lot's of <special>,chars%"
+ .byte 34,108,111,116,39,115,32,111,102,32,60,115,112,101,99,105,97,108,62,44,99,104,97,114,115,37,34
+! SDATA "0"
+ .byte 34,48,34
+!
+
+!
+
+!
+
+!
+
+!END missing from end of file.
--- /dev/null
+
+ .ALTERNATE
+ SDATA %1+2+3
+ SDATA "5"
+
+
+
+ MACRO foo
+ SDATA "HI" !! this will go
+ SDATA "THERE ! this will stay
+ ENDM
+
+ foo
+
+
+ SDATA <!<this is <a wacky> example!>!!>
+ SDATA "<this is <a wacky> example>!"
+ END
--- /dev/null
+******** pl8.amp
+!
+
+! .ALTERNATE
+! SDATA %1+2+3
+ .byte 34,54,34
+! SDATA "5"
+ .byte 34,53,34
+!
+
+!
+
+!
+
+! MACRO foo
+! SDATA "HI" !! this will go
+! SDATA "THERE ! this will stay
+! ENDM
+!
+
+! foo
+! SDATA "HI"
+ .byte 34,72,73,34
+! SDATA "THERE ! this will stay
+ .byte 34,84,72,69,82,69,9,32,116,104,105,115,32,119,105,108,108,32,115,116,97,121,34
+!
+
+!
+
+! SDATA <!<this is <a wacky> example!>!!>
+ .byte 34,60,116,104,105,115,32,105,115,32,60,97,32,119,97,99,107,121,62,32,101,120,97,109,112,108,101,62,33,34
+! SDATA "<this is <a wacky> example>!"
+ .byte 34,60,116,104,105,115,32,105,115,32,60,97,32,119,97,99,107,121,62,32,101,120,97,109,112,108,101,62,34,34
+! END
--- /dev/null
+******** pl8.amp
+!
+
+! .ALTERNATE
+! SDATA %1+2+3
+ .byte 34,54,34
+! SDATA "5"
+ .byte 34,53,34
+!
+
+!
+
+!
+
+! MACRO foo
+! SDATA "HI" !! this will go
+! SDATA "THERE ! this will stay
+! ENDM
+!
+
+! foo
+! SDATA "HI"
+ .byte 34,72,73,34
+! SDATA "THERE ! this will stay
+ .byte 34,84,72,69,82,69,9,32,116,104,105,115,32,119,105,108,108,32,115,116,97,121,34
+!
+
+!
+
+! SDATA <!<this is <a wacky> example!>!!>
+ .byte 34,60,116,104,105,115,32,105,115,32,60,97,32,119,97,99,107,121,62,32,101,120,97,109,112,108,101,62,33,34
+! SDATA "<this is <a wacky> example>!"
+ .byte 34,60,116,104,105,115,32,105,115,32,60,97,32,119,97,99,107,121,62,32,101,120,97,109,112,108,101,62,34,34
+! END
--- /dev/null
+******** reperr.amp
+!
+
+! .REPEAT 10
+ .REPEAT 10
+!END missing from end of file.
--- /dev/null
+******** reperr.amp
+!
+
+! .REPEAT 10
+ .REPEAT 10
+!.END missing from end of file.
! .AREPEAT 10
! .END
-!End of file whilst inside .AREPEAT, started on line 3.
+!End of file whilst inside AREPEAT, started on line 3.
! .AENDR
! .AENDR
! .END
-reperr2.amp:4 AENDR without a AREPEAT.
+reperr2.asm:4 AENDR without a AREPEAT.
! .AENDR
! .AENDR
! .END
-reperr2.amp:4 AENDR without a AREPEAT.
+reperr2.asm:4 AENDR without a AREPEAT.
! .AENDR
! .AENDR
! .END
-reperr3.amp:14 AENDR without a AREPEAT.
-reperr3.amp:16 AENDR without a AREPEAT.
-reperr3.amp:17 AENDR without a AREPEAT.
-reperr3.amp:18 AENDR without a AREPEAT.
-reperr3.amp:19 AENDR without a AREPEAT.
-reperr3.amp:20 AENDR without a AREPEAT.
+reperr3.asm:14 AENDR without a AREPEAT.
+reperr3.asm:16 AENDR without a AREPEAT.
+reperr3.asm:17 AENDR without a AREPEAT.
+reperr3.asm:18 AENDR without a AREPEAT.
+reperr3.asm:19 AENDR without a AREPEAT.
+reperr3.asm:20 AENDR without a AREPEAT.
! .AENDR
! .AENDR
! .END
-reperr3.amp:14 AENDR without a AREPEAT.
-reperr3.amp:16 AENDR without a AREPEAT.
-reperr3.amp:17 AENDR without a AREPEAT.
-reperr3.amp:18 AENDR without a AREPEAT.
-reperr3.amp:19 AENDR without a AREPEAT.
-reperr3.amp:20 AENDR without a AREPEAT.
+reperr3.asm:14 AENDR without a AREPEAT.
+reperr3.asm:16 AENDR without a AREPEAT.
+reperr3.asm:17 AENDR without a AREPEAT.
+reperr3.asm:18 AENDR without a AREPEAT.
+reperr3.asm:19 AENDR without a AREPEAT.
+reperr3.asm:20 AENDR without a AREPEAT.
!
! .SDATA "SHOULD NOT FAIL" "HERE"
- .byte 83,72,79,85,76,68,32,78,79,84,32,70,65,73,76,83,72,79,85,76,68,32,78,79,84,32,70,65,73,76,72,69,82,69
+ .byte 83,72,79,85,76,68,32,78,79,84,32,70,65,73,76,72,69,82,69
! .SDATA "SHOULD FAIL" foo "HERE"
- .byte 83,72,79,85,76,68,32,70,65,73,76
-
+ .byte 83,72,79,85,76,68,32,70,65,73,76,102,111,111,72,69,82,69
!
! .SDATAB 8,"BOINK"
a2: .byte 2,72,73
!a3: .SDATA "HI"
a3: .byte 72,73
-!sdata.amp:11 illegal character in SDATA line (0x66).
-.END missing from end of file.
+!END missing from end of file.
!
! .SDATA "SHOULD NOT FAIL" "HERE"
- .byte 83,72,79,85,76,68,32,78,79,84,32,70,65,73,76,83,72,79,85,76,68,32,78,79,84,32,70,65,73,76,72,69,82,69
+ .byte 83,72,79,85,76,68,32,78,79,84,32,70,65,73,76,72,69,82,69
! .SDATA "SHOULD FAIL" foo "HERE"
- .byte 83,72,79,85,76,68,32,70,65,73,76
-
+ .byte 83,72,79,85,76,68,32,70,65,73,76,102,111,111,72,69,82,69
!
! .SDATAB 8,"BOINK"
a2: .byte 2,72,73
!a3: .SDATA "HI"
a3: .byte 72,73
-!sdata.amp:11 illegal character in SDATA line (0x66).
-.END missing from end of file.
+!END missing from end of file.
FOOD'136BAR
! FOOH'88BAR
FOOH'88BAR
-!.END missing from end of file.
+!END missing from end of file.