flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 25 Jan 2025, 14:10
You have to use the 'c' variable outside of the rept.
Code: c equ 1000000000 rept 7 n:0 { dd c c equ (c/10) } Code: c = 1000000000 rept 7 n:0 { dd c c = c/10 } |
|||
![]() |
|
Roman 25 Jan 2025, 14:20
Thanks.
Work fine. |
|||
![]() |
|
revolution 25 Jan 2025, 14:40
You also don't need 'n':
Code: c = 1000000000 rept 7 { dd c c = c/10 } |
|||
![]() |
|
revolution 25 Jan 2025, 14:59
To illustrate what happens there, try to predict what this code will display:
Code: rept 1 c:10 { c equ (c/10) } display 10 + '0' Code: flat assembler version 1.73.31 (16384 kilobytes memory) 1 1 passes, 0 bytes. The same code with comments explaining: Code: rept 1 c:10 { c equ (c/10) } ; 10 equ (10/10) display 10 + '0' ; display (10/10) + '0' |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.