You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler allows you to initialize a global variable with a literal: const byte test = 1, but doesn't actually generate any code to initialize those variables on program start.
It lets you defer it for later if you want to do some hardware initialization beforehand, and also it is in line with Millfork's "middle-level language" philosophy. It also has bonus points of being able to reset your program's memory with a single line of code (as you can call init_rw_memory() whenever you want as many times you want).
Currently, Millfork is not designed to have any kind of runtime, it just goes straight to your main function in the simplest and fastest way necessary. In comparison, C runtime does many things like memory initialization before it finally calls main.
The compiler allows you to initialize a global variable with a literal:
const byte test = 1
, but doesn't actually generate any code to initialize those variables on program start.Built with
java -jar millfork.jar main.mfk -o build/rom.nes -t nes_small -g -s -fsource-in-asm -fillegals
The text was updated successfully, but these errors were encountered: