Compile-time calculation: Difference between revisions
→{{header|6502 Assembly}}
(→{{header|6502 Assembly}}: let cl65 provide the header) |
|||
Line 60:
{{works with|ca65 targeting the C-64}}
The ca65 cross-assembler supports computing and storing double-word (32-bit) integer values; unfortunately most 8-bit systems have no built-in support for manipulating such values.
So in this solution the assembler computes the value of 10! and stores it as a 32-bit integer; the runtime code converts that to floating point using ROM routines, dealing with it 16 bits at a time.
<lang 6502>; Display the value of 10!, which is precomputed at assembly time
|