Skip to content

Commit 3f1a829

Browse files
Add examples
1 parent 98084d0 commit 3f1a829

File tree

5 files changed

+99
-0
lines changed

5 files changed

+99
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
REM @english
2+
REM OPTIMIZATION BENCHMARKS MULTITASKING
3+
REM
4+
REM This example attempts to calculate the time required to
5+
REM perform task switching.
6+
REM
7+
REM @italian
8+
REM MISURE DI OTTIMIZZAZIONE CONVERTIRE STRINGHE IN VALORI
9+
REM
10+
REM Questo esempio cerca di calcolare il tempo necessario per
11+
REM svolgere il task switching.
12+
REM
13+
REM @include
14+
15+
CONST maxCounter = 2000
16+
17+
BITMAP ENABLE(16)
18+
19+
CLS
20+
21+
airplane = LOAD IMAGE("air_attack_airplane.png")
22+
23+
startTime = TIME
24+
25+
counter = 0
26+
DO
27+
PUT IMAGE airplane AT 20,20
28+
INC counter
29+
EXIT IF counter = maxCounter
30+
LOOP
31+
32+
PRINT (TIME - startTime); " jiffy(s)"
33+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
REM @english
2+
REM OPTIMIZATION BENCHMARKS MULTITASKING
3+
REM
4+
REM This example attempts to calculate the time required to
5+
REM perform task switching.
6+
REM
7+
REM @italian
8+
REM MISURE DI OTTIMIZZAZIONE CONVERTIRE STRINGHE IN VALORI
9+
REM
10+
REM Questo esempio cerca di calcolare il tempo necessario per
11+
REM svolgere il task switching.
12+
REM
13+
REM @include
14+
15+
CONST maxCounter = 2000
16+
17+
BITMAP ENABLE(16)
18+
19+
CLS
20+
21+
red16x16 = LOAD IMAGE("red16x16.png")
22+
23+
startTime = TIME
24+
25+
counter = 0
26+
DO
27+
PUT IMAGE red16x16 AT 20,20
28+
INC counter
29+
EXIT IF counter = maxCounter
30+
LOOP
31+
32+
PRINT (TIME - startTime); " jiffy(s)"
33+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
REM @english
2+
REM OPTIMIZATION BENCHMARKS MULTITASKING
3+
REM
4+
REM This example attempts to calculate the time required to
5+
REM perform task switching.
6+
REM
7+
REM @italian
8+
REM MISURE DI OTTIMIZZAZIONE CONVERTIRE STRINGHE IN VALORI
9+
REM
10+
REM Questo esempio cerca di calcolare il tempo necessario per
11+
REM svolgere il task switching.
12+
REM
13+
REM @include
14+
15+
CONST maxCounter = 2000
16+
17+
BITMAP ENABLE(16)
18+
19+
CLS
20+
21+
red8x8 = LOAD IMAGE("red8x8.png")
22+
23+
startTime = TIME
24+
25+
counter = 0
26+
DO
27+
PUT IMAGE red8x8 AT 20,20
28+
INC counter
29+
EXIT IF counter = maxCounter
30+
LOOP
31+
32+
PRINT (TIME - startTime); " jiffy(s)"
33+

examples/red16x16.png

192 Bytes
Loading

examples/red8x8.png

192 Bytes
Loading

0 commit comments

Comments
 (0)