2023-12-28 18:58:45 +00:00
|
|
|
%import math
|
2023-12-29 06:00:14 +00:00
|
|
|
%import textio
|
|
|
|
%zeropage dontuse
|
2023-12-09 20:48:22 +00:00
|
|
|
|
2023-10-15 20:44:34 +00:00
|
|
|
main {
|
2023-11-12 19:40:17 +00:00
|
|
|
sub start() {
|
2023-12-29 15:23:24 +00:00
|
|
|
uword @shared x = 65535
|
|
|
|
word @shared y = x as word
|
|
|
|
txt.print_w(y)
|
2023-12-29 06:00:14 +00:00
|
|
|
txt.nl()
|
2023-12-29 15:23:24 +00:00
|
|
|
txt.print_w(x as word)
|
2023-12-29 06:00:14 +00:00
|
|
|
txt.nl()
|
|
|
|
|
2023-12-29 15:23:24 +00:00
|
|
|
word @shared x2 = -1
|
|
|
|
uword @shared y2 = x2 as uword
|
|
|
|
txt.print_uw(y2)
|
|
|
|
txt.nl()
|
|
|
|
txt.print_uw(x2 as uword)
|
2023-12-29 06:00:14 +00:00
|
|
|
txt.nl()
|
2023-12-29 15:23:24 +00:00
|
|
|
|
|
|
|
txt.print_uw(shiftluw1())
|
2023-12-26 21:01:49 +00:00
|
|
|
}
|
2023-12-29 15:23:24 +00:00
|
|
|
|
|
|
|
; sub shiftluw1() -> uword {
|
|
|
|
; uword q = $a49f
|
|
|
|
; return (q << 1) & 65535 as uword
|
|
|
|
; }
|
|
|
|
|
2023-12-19 21:59:01 +00:00
|
|
|
}
|