diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 2dc1d34dc..588c7064a 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -3,7 +3,7 @@ TODO - [on branch: shortcircuit] investigate McCarthy evaluation again? this may also reduce code size perhaps for things like if a>4 or a<2 .... - [on branch: ir-less-branch-opcodes] IR: reduce the number of branch instructions such as BEQ, BEQR, etc (gradually), replace with CMP(I) + status branch instruction -- IR: reduce amount of CMP/CMPI after instructions that set the status bits correctly (LOADs? INC? etc), but only after setting the status bits is verified! +- IR: reduce amount of CMP/CMPI after instructions that set the status bits correctly (LOADs? INC? Bitwise operations, etc), but only after setting the status bits is verified! ... diff --git a/examples/textelite.p8 b/examples/textelite.p8 index 096b00c46..668543ed4 100644 --- a/examples/textelite.p8 +++ b/examples/textelite.p8 @@ -292,7 +292,7 @@ ship { ubyte fuel = Max_fuel uword cash = 1000 ; actually has to be 4 bytes for the ultra rich.... - ubyte[17] cargohold = 0 + ubyte[17] cargohold sub init() { sys.memset(cargohold, len(cargohold), 0) @@ -318,8 +318,8 @@ market { str[17] names = ["Food", "Textiles", "Radioactives", "Slaves", "Liquor/Wines", "Luxuries", "Narcotics", "Computers", "Machinery", "Alloys", "Firearms", "Furs", "Minerals", "Gold", "Platinum", "Gem-Stones", "Alien Items"] - ubyte[17] current_quantity = 0 - uword[17] current_price = 0 + ubyte[17] current_quantity + uword[17] current_price sub init(ubyte fluct) { ; Prices and availabilities are influenced by the planet's economy type diff --git a/examples/vm/textelite.p8 b/examples/vm/textelite.p8 index 6f1f83d7f..fcffb32fb 100644 --- a/examples/vm/textelite.p8 +++ b/examples/vm/textelite.p8 @@ -233,7 +233,7 @@ ship { ubyte fuel = Max_fuel uword cash = 1000 ; actually has to be 4 bytes for the ultra rich.... - ubyte[17] cargohold = 0 + ubyte[17] cargohold sub init() { sys.memset(cargohold, len(cargohold), 0) @@ -259,8 +259,8 @@ market { str[17] names = ["Food", "Textiles", "Radioactives", "Slaves", "Liquor/Wines", "Luxuries", "Narcotics", "Computers", "Machinery", "Alloys", "Firearms", "Furs", "Minerals", "Gold", "Platinum", "Gem-Stones", "Alien Items"] - ubyte[17] current_quantity = 0 - uword[17] current_price = 0 + ubyte[17] current_quantity + uword[17] current_price sub init(ubyte fluct) { ; Prices and availabilities are influenced by the planet's economy type