mirror of
https://github.com/wfjm/w11.git
synced 2026-04-26 04:08:17 +00:00
- tools - bin/asm-11: BUGFIX: fix directly nested .if behavior - bin/ip_delete_tap: added - asm-11/tests: add zbug_0007.mac, test_0460_if_nest.mac - oskit/test/os/211bsd/211bsd_eth.tcl: use 'ip' command
51 lines
1.4 KiB
Plaintext
51 lines
1.4 KiB
Plaintext
; $Id: test_0510_rept_mexit.mac 1373 2023-02-16 11:21:26Z mueller $
|
|
; SPDX-License-Identifier: GPL-3.0-or-later
|
|
; Copyright 2023- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
|
;
|
|
; test .rept and .mexit
|
|
;
|
|
.asect
|
|
. = 1000
|
|
|
|
; list macro expansion
|
|
.list me,cnd
|
|
;
|
|
; single .rept with an .mexit abort
|
|
a = 1020 ; write limit
|
|
.rept 1024.
|
|
.word 001001 ; before limit check
|
|
.if ge,.-a ; stop if beyond limit
|
|
.mexit
|
|
.endc
|
|
.word 001002 ; after limit check
|
|
; next
|
|
.endr
|
|
1000$: ;;!! 001022:
|
|
;
|
|
; .rept called from a macro, ensure that macro .mexit is independent
|
|
. = 2000
|
|
a = 2020 ; write limit
|
|
.macro mtest
|
|
.rept 1024.
|
|
.word 002001 ; before limit check
|
|
.if ge,.-a ; stop if beyond limit
|
|
.mexit
|
|
.endc
|
|
.word 002002 ; after limit check
|
|
; next
|
|
.endr
|
|
.word 002010
|
|
.word 002011
|
|
.word 002012
|
|
.word 002013
|
|
.mexit
|
|
.word 002020
|
|
.word 002021
|
|
.word 002022
|
|
.word 002023
|
|
.endm
|
|
;
|
|
mtest
|
|
2000$: ;;!! 002032:
|
|
.end
|