prog8/examples/test.p8
Irmen de Jong 2360625927 added min/max values for the various integer types as sys.MAX_XXX and sys.MIN_XXX
renamed sys.sizeof_xxx into sys.SIZEOF_XXX to be consistent with the uppercasing of the other constants
2024-11-21 23:25:02 +01:00

40 lines
852 B
Lua

%import floats
%import textio
%option no_sysinit
%zeropage basicsafe
main {
sub start() {
txt.print_b(sys.MIN_BYTE)
txt.spc()
txt.print_b(sys.MAX_BYTE)
txt.nl()
txt.print_ub(sys.MIN_UBYTE)
txt.spc()
txt.print_ub(sys.MAX_UBYTE)
txt.nl()
txt.print_w(sys.MIN_WORD)
txt.spc()
txt.print_w(sys.MAX_WORD)
txt.nl()
txt.print_uw(sys.MIN_UWORD)
txt.spc()
txt.print_uw(sys.MAX_UWORD)
txt.nl()
txt.nl()
floats.print(floats.EPSILON)
txt.nl()
floats.print(floats.MIN)
txt.nl()
floats.print(floats.MAX)
txt.nl()
floats.print(floats.E)
txt.nl()
txt.print_ub(floats.SIZEOF)
txt.nl()
txt.print_ub(sys.SIZEOF_FLOAT)
txt.nl()
}
}