-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed a problematic bitshift replacement in the const evaluator
- Loading branch information
Showing
3 changed files
with
79 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
%import textio | ||
%zeropage basicsafe | ||
%option no_sysinit | ||
|
||
main { | ||
sub start() { | ||
ubyte[10] uba = [1,2,3] | ||
bool[10] bba = [true, false, true] | ||
const uword one = 1 | ||
const uword two = 2 | ||
uword @shared answer = one * two >> 8 | ||
txt.print_uw(answer) | ||
txt.spc() | ||
txt.print_uw(one * two >> 8) | ||
txt.nl() | ||
|
||
const uword uw1 = 99 | ||
const uword uw2 = 22 | ||
uword @shared answer2 = uw1 * uw2 >> 8 | ||
txt.print_uw(answer2) | ||
txt.spc() | ||
txt.print_uw(uw1 * uw2 >> 8) | ||
txt.nl() | ||
|
||
uword @shared uw3 = 99 | ||
uword @shared uw4 = 22 | ||
uword @shared answer3 = uw3 * uw4 >> 8 | ||
txt.print_uw(answer3) | ||
txt.spc() | ||
txt.print_uw(uw3 * uw4 >> 8) | ||
txt.nl() | ||
} | ||
} |