1
0
mirror of https://github.com/wfjm/w11.git synced 2026-04-27 04:37:55 +00:00
Files
wfjm.w11/tools/asm-11/tests-err/testerr_0600_macro.mac
wfjm 3b033ebfa8 major asm-11 update
- tools/bin
  - asm-11
    - add .if, .if(f|t|tf), .endc, .rept, .endr, .mexit directives
    - add .error, .print, .mcall, .mdelete directives
    - add .narg, .nchr, .ntype directives
    - rewrite macro definition and call argument parsing & handling
    - add -L option (to set .mcall pathlist)
    - add auto-generated ...top label
    - add flag (MRmrd) column in output format
  - asm-11_expect
    - add simple substitution mechanism (for macro testing)
    - handle new flag column in output format
- tools/asm-11
  - tests(-err): many tests added
  - tests(-err)/Makefile: distclean target added
  - mlib: macro library, accessed by .mcall
2023-01-26 16:13:36 +01:00

70 lines
1.9 KiB
Plaintext

; $Id: testerr_0600_macro.mac 1356 2023-01-26 15:10:23Z mueller $
; SPDX-License-Identifier: GPL-3.0-or-later
; Copyright 2023- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
;
; test error response for .macro and macro calls
;
.asect
. = 1000
;
.list me
;
; .macro without macro name -> O error and no macro defined
.macro ;;!! O
.endm ;;!! O
;
; .macro with non-matching name in .endm
.macro badend
.word 0
.endm endbad ;;!! A
;
; .macro with redundant key names
.macro argnam a,b,a ;;!! A
.word a
.word b
.endm
;
; .macro with bad key name
.macro badarg 100
.endm
;
; .macro with bad auto-label name
.macro badlbl ?100
.endm
;
; .macro with \ modfier in key definition
.macro badmod \a
.endm
;
; extra or bad arguments in macro call
.macro extarg a
.word a
.endm
;
a = 123
;
extarg 100 ; ok
extarg 100,200 ;;!! Q
extarg a=100 ; ok
extarg a= ; ok
extarg c=100 ;;!! AU
extarg \a ; ok
extarg \b ;;!! U
extarg \100 ;;!! Q ; ok in MACRO-11
extarg ?a ;;!! Q ; ok in MACRO-11
;
; .narg,.ntype,.nchr without symbol and/or value
.macro badnxx a,b
.word a
.ascii /b/
.narg ;;!! A
.nchr ;;!! A
.nchr $$$ ;;!! A ; ok in MACRO-11
.ntype ;;!! A
.ntype $$$ ;;!! A
.endm
;
badnxx 100,^/foo/
;
.end