nurpax / c64jasm

C64 6502 assembler in TypeScript
51 stars 14 forks source link

import JavaScript Math module as Math to make stuff like Math.sin visible to c64jasm asm files #50

Closed nurpax closed 5 years ago

nurpax commented 5 years ago

Rather than having all c64jasm asm files wrap stuff like Math.floor, sin, etc. figure out a way to pull Math directly into scope in the compiler.

TBD are there some other modules like Math that should also be imported?

Also: Math.random is not great in compilers (unreproducible builds!), so should trampoline this function and issue a warning if it's used.

nurpax commented 5 years ago

done in 63595825f1af3a815676015e8677888f9253baeb