Compile-time calculation: Difference between revisions

(add Zig language)
Line 57:
+ L R1,=A(3628800) load reg with factorial
</pre>
=={{header|68000 Assembly}}==
VASM allows you to define values using mathematical operators prior to assembly, but you can only do this with constants.
The following are all valid:
<lang 68000devpac>tenfactorial equ 10*9*8*7*6*5*4*3*2
 
MOVE.L #tenfactorial,D1 ;load the constant integer 10! into D1
LEA tenfactorial,A1 ;load into A1 the memory address 10! = 0x375F00
ADD.L #tenfactorial,D2 ;add 10! to whatever is stored in D2 and store the result in D2</lang>
 
 
=={{header|Ada}}==
1,489

edits