2024-01-04 14:02:21 +00:00
|
|
|
%import textio
|
2023-12-31 00:02:33 +00:00
|
|
|
%zeropage basicsafe
|
2024-01-03 23:30:20 +00:00
|
|
|
%option no_sysinit
|
2023-12-31 00:02:33 +00:00
|
|
|
|
2024-01-07 17:48:18 +00:00
|
|
|
main {
|
|
|
|
sub start() {
|
2024-01-15 22:51:19 +00:00
|
|
|
; mem()
|
|
|
|
; bytes()
|
2024-01-14 18:03:49 +00:00
|
|
|
words()
|
|
|
|
}
|
|
|
|
|
|
|
|
sub mem() {
|
|
|
|
@($2000) = $7a
|
|
|
|
rol(@($2000))
|
|
|
|
txt.print_ubbin(@($2000), true)
|
|
|
|
txt.nl()
|
|
|
|
rol2(@($2000))
|
|
|
|
txt.print_ubbin(@($2000), true)
|
|
|
|
txt.nl()
|
|
|
|
ror(@($2000))
|
|
|
|
txt.print_ubbin(@($2000), true)
|
|
|
|
txt.nl()
|
|
|
|
ror2(@($2000))
|
|
|
|
txt.print_ubbin(@($2000), true)
|
|
|
|
txt.nl()
|
|
|
|
txt.nl()
|
|
|
|
}
|
|
|
|
|
|
|
|
sub bytes() {
|
|
|
|
ubyte[] wa = [$1a, $2b, $3c]
|
|
|
|
|
2024-01-15 22:51:19 +00:00
|
|
|
txt.print_ub(all(wa))
|
|
|
|
txt.spc()
|
|
|
|
txt.print_ub(any(wa))
|
|
|
|
txt.nl()
|
|
|
|
|
2024-01-14 18:03:49 +00:00
|
|
|
txt.print_ubbin(wa[2], true)
|
|
|
|
txt.nl()
|
|
|
|
rol(wa[2])
|
|
|
|
txt.print_ubbin(wa[2], true)
|
|
|
|
txt.nl()
|
|
|
|
rol2(wa[2])
|
|
|
|
txt.print_ubbin(wa[2], true)
|
|
|
|
txt.nl()
|
|
|
|
ror(wa[2])
|
|
|
|
txt.print_ubbin(wa[2], true)
|
|
|
|
txt.nl()
|
|
|
|
ror2(wa[2])
|
|
|
|
txt.print_ubbin(wa[2], true)
|
|
|
|
txt.nl()
|
|
|
|
txt.nl()
|
|
|
|
}
|
|
|
|
|
|
|
|
sub words() {
|
|
|
|
uword[] wa = [$11aa, $22bb, $33cc]
|
|
|
|
uword[] @split swa = [$11aa, $22bb, $33cc]
|
2024-01-15 22:51:19 +00:00
|
|
|
uword[] waone = [$0000, $3300, $0000]
|
|
|
|
uword[] wazero = [$0000, $0000, $0000]
|
|
|
|
uword[] @split swaone = [$0000, $3300, $0000]
|
|
|
|
uword[] @split swazero = [$0000, $0000, $0000]
|
2024-01-14 18:03:49 +00:00
|
|
|
|
2024-01-15 22:51:19 +00:00
|
|
|
; txt.print_ub(all(wa)) ; 1
|
|
|
|
; txt.spc()
|
|
|
|
; txt.print_ub(any(wa)) ; 1
|
|
|
|
; txt.nl()
|
|
|
|
; txt.print_ub(all(waone)) ; 0
|
|
|
|
; txt.spc()
|
|
|
|
; txt.print_ub(any(waone)) ; 1
|
|
|
|
; txt.nl()
|
|
|
|
;; txt.print_ub(all(swaone)) ; 0
|
|
|
|
;; txt.spc()
|
|
|
|
txt.print_ub(any(swaone)) ; 1
|
|
|
|
txt.nl()
|
|
|
|
;; txt.print_ub(all(swa)) ; 1
|
|
|
|
;; txt.spc()
|
|
|
|
; txt.print_ub(any(swa)) ; 1
|
|
|
|
; txt.nl()
|
|
|
|
; txt.print_ub(all(wazero)) ; 0
|
|
|
|
; txt.spc()
|
|
|
|
; txt.print_ub(any(wazero)) ; 0
|
|
|
|
; txt.nl()
|
|
|
|
;; txt.print_ub(all(swazero)) ; 0
|
|
|
|
;; txt.spc()
|
|
|
|
txt.print_ub(any(swazero)) ; 0
|
2024-01-14 18:03:49 +00:00
|
|
|
txt.nl()
|
2024-01-09 22:46:27 +00:00
|
|
|
|
2024-01-15 22:51:19 +00:00
|
|
|
; txt.print_uwbin(wa[2], true)
|
|
|
|
; txt.nl()
|
|
|
|
; rol(wa[2])
|
|
|
|
; txt.print_uwbin(wa[2], true)
|
|
|
|
; txt.nl()
|
|
|
|
; rol2(wa[2])
|
|
|
|
; txt.print_uwbin(wa[2], true)
|
|
|
|
; txt.nl()
|
|
|
|
; ror(wa[2])
|
|
|
|
; txt.print_uwbin(wa[2], true)
|
|
|
|
; txt.nl()
|
|
|
|
; ror2(wa[2])
|
|
|
|
; txt.print_uwbin(wa[2], true)
|
|
|
|
; txt.nl()
|
|
|
|
; txt.nl()
|
|
|
|
;
|
|
|
|
; txt.print_uwbin(swa[2], true)
|
|
|
|
; txt.nl()
|
|
|
|
; rol(swa[2])
|
|
|
|
; txt.print_uwbin(swa[2], true)
|
|
|
|
; txt.nl()
|
|
|
|
; rol2(swa[2])
|
|
|
|
; txt.print_uwbin(swa[2], true)
|
|
|
|
; txt.nl()
|
|
|
|
; ror(swa[2])
|
|
|
|
; txt.print_uwbin(swa[2], true)
|
|
|
|
; txt.nl()
|
|
|
|
; ror2(swa[2])
|
|
|
|
; txt.print_uwbin(swa[2], true)
|
|
|
|
; txt.nl()
|
|
|
|
; txt.nl()
|
2023-12-26 21:01:49 +00:00
|
|
|
}
|
2023-12-19 21:59:01 +00:00
|
|
|
}
|