2023-08-09 20:05:23 +02:00
|
|
|
%import textio
|
|
|
|
%zeropage basicsafe
|
2023-07-15 22:19:48 +02:00
|
|
|
|
2023-08-14 00:50:40 +02:00
|
|
|
cbm2 {
|
|
|
|
sub SETTIM(ubyte a, ubyte b, ubyte c) {
|
2023-08-12 01:07:46 +02:00
|
|
|
}
|
2023-08-14 00:50:40 +02:00
|
|
|
sub RDTIM16() -> uword {
|
|
|
|
return 0
|
2023-08-12 01:07:46 +02:00
|
|
|
}
|
2023-08-14 00:50:40 +02:00
|
|
|
}
|
2023-08-12 01:07:46 +02:00
|
|
|
|
2023-08-14 00:50:40 +02:00
|
|
|
main {
|
|
|
|
sub start() {
|
|
|
|
ubyte value
|
|
|
|
uword wvalue
|
|
|
|
ubyte other = 99
|
|
|
|
uword otherw = 99
|
2023-08-12 01:07:46 +02:00
|
|
|
|
2023-08-14 00:50:40 +02:00
|
|
|
value=13
|
|
|
|
wvalue=99
|
|
|
|
txt.print_ub(value*value)
|
2023-08-12 01:07:46 +02:00
|
|
|
txt.spc()
|
2023-08-14 00:50:40 +02:00
|
|
|
txt.print_uw(wvalue*wvalue)
|
2023-08-12 01:07:46 +02:00
|
|
|
txt.nl()
|
2023-08-12 13:42:24 +02:00
|
|
|
|
|
|
|
|
2023-08-14 00:50:40 +02:00
|
|
|
txt.print("byte multiply..")
|
|
|
|
cbm.SETTIM(0,0,0)
|
|
|
|
repeat 100 {
|
|
|
|
for value in 0 to 255 {
|
|
|
|
cx16.r0L = value*other
|
|
|
|
}
|
|
|
|
}
|
|
|
|
txt.print_uw(cbm.RDTIM16())
|
2023-08-12 13:42:24 +02:00
|
|
|
txt.nl()
|
|
|
|
|
2023-08-14 00:50:40 +02:00
|
|
|
txt.print("byte squares...")
|
|
|
|
cbm.SETTIM(0,0,0)
|
|
|
|
repeat 100 {
|
|
|
|
for value in 0 to 255 {
|
|
|
|
cx16.r0L = value*value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
txt.print_uw(cbm.RDTIM16())
|
2023-08-12 13:42:24 +02:00
|
|
|
txt.nl()
|
|
|
|
|
2023-08-14 00:50:40 +02:00
|
|
|
txt.print("word multiply..")
|
|
|
|
cbm.SETTIM(0,0,0)
|
|
|
|
repeat 50 {
|
|
|
|
for wvalue in 0 to 255 {
|
|
|
|
cx16.r0 = wvalue*otherw
|
|
|
|
}
|
|
|
|
}
|
|
|
|
txt.print_uw(cbm.RDTIM16())
|
2023-08-12 13:42:24 +02:00
|
|
|
txt.nl()
|
|
|
|
|
2023-08-14 00:50:40 +02:00
|
|
|
txt.print("word squares...")
|
|
|
|
cbm.SETTIM(0,0,0)
|
|
|
|
repeat 50 {
|
|
|
|
for wvalue in 0 to 255 {
|
|
|
|
cx16.r0 = wvalue*wvalue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
txt.print_uw(cbm.RDTIM16())
|
2023-08-12 13:42:24 +02:00
|
|
|
txt.nl()
|
|
|
|
}
|
2023-07-10 22:03:48 +02:00
|
|
|
}
|