Skip to content

Commit

Permalink
%option romable now disables floating point support
Browse files Browse the repository at this point in the history
because if it's your code that is running in the rom bank you can't have the floating point routines available there
  • Loading branch information
irmen committed Feb 23, 2025
1 parent 5c56267 commit ae04f5a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions compiler/src/prog8/compiler/Compiler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ fun parseMainModule(filepath: Path,
errors.err("BASIC launcher requires output type PRG", program.toplevelModule.position)
}

if(compilerOptions.romable && compilerOptions.floats)
errors.err("When ROMable code is selected, floating point support is not available", program.toplevelModule.position)

errors.report()

return Triple(program, compilerOptions, importedFiles)
Expand Down
2 changes: 0 additions & 2 deletions docs/source/todo.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
TODO
====

- disable floating point support for %option romable ? (because if it's your code that is running in the rom bank you can't have the floating point routines available there)

...


Expand Down
1 change: 1 addition & 0 deletions examples/test.p8
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
%import textio
%zeropage basicsafe
%option no_sysinit, romable

Expand Down

0 comments on commit ae04f5a

Please sign in to comment.