! .MACRO SUM FROM=0, TO=9 ! ; \FROM \TO ! MOV R\FROM,R10 !COUNT .ASSIGNA \FROM+1 ! .AWHILE \&COUNT LE \TO ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! .ENDM ! ! SUM 0,5 ! ; 0 5 ; 0 5 ! MOV R0,R10 MOV R0,R10 !COUNT .ASSIGNA 0+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R1,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R2,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R3,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R4,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R5,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! SUM TO=5 ! ; 0 5 ; 0 5 ! MOV R0,R10 MOV R0,R10 !COUNT .ASSIGNA 0+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R1,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R2,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R3,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R4,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R5,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! SUM FROM=2, TO=5 ! ; 2 5 ; 2 5 ! MOV R2,R10 MOV R2,R10 !COUNT .ASSIGNA 2+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R3,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R4,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! MOV R\&COUNT,R10 MOV R5,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AWHILE \&COUNT LE 5 ! MOV R\&COUNT,R10 !COUNT .ASSIGNA \&COUNT+1 ! .AENDW ! ! !; hi this is a comment ; hi this is a comment ! .MACRO BACK_SLASH_SET ! \(MOV #"\",R0) ! .ENDM ! BACK_SLASH_SET ! MOV #"\",R0 MOV #"\",R0 ! .MACRO COMM ! bar ; this comment will get copied out ! foo \; this one will get dropped ! .ENDM ! COMM ! bar ; this comment will get copied out bar ; this comment will get copied out ! foo \; this one will get dropped foo \; this one will get dropped ! BACK_SLASH_SET ! MOV #"\",R0 MOV #"\",R0 ! .MACRO PLUS2 ! ADD #1,R\&V1 ! .SDATA "\&V'1" ! .ENDM !V .ASSIGNC "R" !V1 .ASSIGNA 1 ! PLUS2 ! ADD #1,R\&V1 ADD #1,R1 ! .SDATA "\&V'1" .byte 82,49 ! .MACRO PLUS1 P,P1 ! ADD #1,\P1 ! .SDATA "\P'1" ! .ENDM ! PLUS1 R,R1 ! ADD #1,R1 ADD #1,R1 ! .SDATA "R1