not a bug

This commit is contained in:
Irmen de Jong 2020-12-10 03:22:43 +01:00
parent cf1e8b194a
commit 4094f89d4a
3 changed files with 3 additions and 10 deletions

View File

@ -2,6 +2,8 @@
TODO
====
- optimize away 1 ** x into just 1 and 0 ** x into just 0
- optimize 2 ** x into (1<<x) if x is an integer. where 1 is in the type of the assign target if possible
- add minv(a,b) and maxv(a,b) functions to determine the max or min of 2 values
- add progend() builtin function that returns the last address of the program in memory + 1 (to be able to stick dynamic data after the program easily)
- see if we can group some errors together for instance the (now single) errors about unidentified symbols

View File

@ -75,8 +75,7 @@ main {
uword width = mkword(buffer[4], buffer[3])
uword height = mkword(buffer[6], buffer[5])
ubyte bpp = buffer[7]
uword num_colors = 1
num_colors <<= bpp ; TODO FIX THIS: uword num_colors = 1 << bpp
uword num_colors = $0001 << bpp
ubyte flags = buffer[8]
ubyte compression = flags & %00000011
ubyte palette_format = (flags & %00000100) >> 2

View File

@ -7,14 +7,6 @@
main {
sub start() {
ubyte bpp = 7
uword num_colors = 1 << bpp ; TODO FIX THIS
txt.chrout('\n')
txt.chrout('\n')
txt.print_uw(num_colors)
txt.chrout('\n')
test_stack.test()
}