prog8/examples/test.p8

43 lines
765 B
Plaintext
Raw Normal View History

%import c64utils
%zeropage basicsafe
2019-06-25 21:36:54 +00:00
%import c64flt
2019-03-29 01:13:28 +00:00
~ main {
2019-02-21 00:31:33 +00:00
sub start() {
2019-06-28 20:10:01 +00:00
; TODO array to heap ubyte[100] arr1 = 1 to 100
; TODO array to heap ubyte[100] arr2 = 101 to 200
&ubyte m1 = $d020
&uword mw1 = $c000
ubyte[] arr1 = [1,2,3,4,5,6,7,8,9,10,11]
ubyte[] arr2 = [11,22,33,44,55,66,77,88,99,100,101]
2019-06-26 20:29:10 +00:00
2019-06-28 00:57:13 +00:00
word w1 = 1111
word w2 = 2222
2019-06-28 20:10:01 +00:00
m1 = 0
mw1 = 65535
Y = @($d020)
@($d020) = A
ror(w1)
ror2(w1)
rol(w1)
rol2(w1)
lsr(w1)
lsl(w1)
2019-06-28 00:57:13 +00:00
swap(w1, w2)
swap(A, Y)
2019-06-28 20:10:01 +00:00
swap(arr1[4], arr2[9])
; TODO swap(arr1[4], Y)
; TODO swap(Y, arr2[9])
2019-06-28 00:57:13 +00:00
swap(@($d020), @($d021))
2019-06-27 23:21:31 +00:00
}
}