prog8/examples/test.p8

57 lines
1.2 KiB
Plaintext
Raw Normal View History

%import c64utils
2019-01-02 22:32:41 +00:00
~ main {
2019-01-01 20:47:19 +00:00
2019-01-05 17:02:17 +00:00
sub start() {
2019-01-12 12:34:45 +00:00
byte b
ubyte ub
memory ubyte mb = $c000
memory uword muw = $c000
word w
uword uw
uword[4] uwa
2019-01-11 23:04:26 +00:00
2019-01-12 12:34:45 +00:00
ub=%10001011
for ubyte i in 0 to 10 {
c64scr.print_ubbin(1, ub)
rol2(ub)
c64.CHROUT('\n')
2019-01-12 01:36:43 +00:00
}
2019-01-12 12:34:45 +00:00
c64.CHROUT('\n')
2019-01-11 23:04:26 +00:00
2019-01-12 12:34:45 +00:00
uw=%1000101100001110
for ubyte i in 0 to 10 {
c64scr.print_uwbin(1, uw)
rol2(uw)
c64.CHROUT('\n')
}
c64.CHROUT('\n')
muw=%1000101100001110
for ubyte i in 0 to 10 {
c64scr.print_uwbin(1, muw)
rol2(muw)
c64.CHROUT('\n')
}
c64.CHROUT('\n')
ubyte x=2
uwa[x]=%1000101100001110
for ubyte i in 0 to 10 {
c64scr.print_uwbin(1, uwa[x])
rol2(uwa[x])
c64.CHROUT('\n')
}
c64.CHROUT('\n')
uwa[2]=%1000101100001110
for ubyte i in 0 to 10 {
c64scr.print_uwbin(1, uwa[2])
rol2(uwa[2]) ; @todo wrong
c64.CHROUT('\n')
}
c64.CHROUT('\n')
}
2019-01-02 22:32:41 +00:00
}