Compile-time calculation: Difference between revisions
Content deleted Content added
Puppydrum64 (talk | contribs) m →{{header|Z80 Assembly}}: formatting |
Puppydrum64 (talk | contribs) m →{{header|8086 Assembly}}: formatting |
||
Line 127:
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 asm>mov ax,8*7*6*5*4*3*2 ;8! equals 40,320 or 0x9D80
call Monitor
{{out}}
<tt>0x9D80</tt>
|