-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
floats: added AYINT2 as a safe wrapper for AYINT. Internal float to w…
…ord cast now also uses that.
- Loading branch information
Showing
6 changed files
with
55 additions
and
19 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
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,13 +1,20 @@ | ||
%import textio | ||
%zeropage dontuse | ||
%import floats | ||
%option no_sysinit | ||
%address $5000 | ||
%launcher none | ||
%zeropage basicsafe | ||
|
||
main { | ||
sub start() { | ||
txt.print("address of start: ") | ||
txt.print_uwhex(&start, true) | ||
float @shared fl1 = 4444.234 | ||
float @shared fl2 = -9999.111 | ||
float @shared fl3 = fl1+fl2 | ||
floats.print(fl1) | ||
txt.spc() | ||
floats.print(fl2) | ||
txt.spc() | ||
floats.print(fl3) | ||
txt.nl() | ||
txt.print_w(fl3 as word) | ||
txt.nl() | ||
} | ||
} |