flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > .break/.continue in HL macros in FASM Classic |
Author |
|
revolution 16 May 2020, 17:57
You can use jmp
Code: .while something .if ;... jmp .we_are_done .else ;... .endif .endw .we_are_done: |
|||
16 May 2020, 17:57 |
|
AsmGuru62 16 May 2020, 21:43
Indeed.
|
|||
16 May 2020, 21:43 |
|
bitRAKE 16 May 2020, 22:28
Well for fasmg ...
Code: ; ~\fasmg\packages\x86\include\macro\if.inc define _if..break? _break macro _break jmp __ENDW end macro The laziest way I can think of would be to define .break at the start of each .repeat. Then a label needs to be added to _until, and restore prior definition of .break. I'd make some tests and try this out, but I've never really used the dot HLL stuff. I don't mind it, but it's just not my style. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
16 May 2020, 22:28 |
|
revolution 16 May 2020, 23:41
Moved to Macroinstructions forum.
These are implemented in macros, not within the compilers internals. |
|||
16 May 2020, 23:41 |
|
Roman 24 Jun 2020, 08:38
From INCLUDE\MACRO\IF.inc
macro .endw { jmp __WHILE __ENDW: restore __ENDW restore __WHILE } macro break { jmp __ENDW} In code use macro break Code: .while [count] < 10 .if eax = 1 break .else inc [count] .endif .endw If .while in proc enought use ret Code: .while [count] < 10 .if eax = 1 ret .else inc [count] .endif .endw ret |
|||
24 Jun 2020, 08:38 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.