Compile-time calculation: Difference between revisions
m
→{{header|Z80 Assembly}}: formatting
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) m (→{{header|Z80 Assembly}}: formatting) |
||
Line 1,576:
Since 10! is bigger than 16 bits, I'll use 8! instead to demonstrate. Most assemblers only support the standard C operators for compile-time calculation, so we're going to need to multiply out the factorial manually.
<lang z80>ld hl,8*7*6*5*4*3*2 ;8! equals 40,320 or 0x9D80
call Monitor
{{out}}
<tt>0x9D80</tt>
=={{header|zkl}}==
|