Skip to content

Commit b42bd85

Browse files
committed
webserver: some memory speed tests
1 parent d984f43 commit b42bd85

File tree

3 files changed

+71
-2
lines changed

3 files changed

+71
-2
lines changed

ethernet/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ DOS33 = ../dos33fs-utils/dos33
22
TXT2BAS = ../asoft_basic-utils/tokenize_asoft
33
MAKEB = ../dos33fs-utils/make_b
44

5-
all: ethernet.dsk
5+
all: ethernet.dsk memcpy.o
6+
7+
memcpy.o: memcpy.s
8+
ca65 -o memcpy.o memcpy.s -l memcpy.lst
69

710
SETUP.BAS: setup.bas
811
$(TXT2BAS) < setup.bas > SETUP.BAS
@@ -26,4 +29,4 @@ ethernet.dsk: SETUP.BAS \
2629
$(DOS33) -y ethernet.dsk BSAVE -a 0x4000 ./c/vmw_logo.png
2730

2831
clean:
29-
rm -f *~ *.BAS R.TXT
32+
rm -f *~ *.BAS R.TXT *.o *.lst

ethernet/memcpy.s

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.define EQU =
2+
3+
PTR EQU $06
4+
5+
lda #0
6+
sta PTR
7+
lda #$40
8+
sta PTR+1
9+
10+
ldx #8
11+
ldy #0
12+
copy_loop:
13+
lda (PTR),y
14+
sta $5000
15+
iny
16+
bne copy_loop
17+
dex
18+
bne copy_loop
19+
20+
rts

ethernet/memcpy.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Test 1:
2+
5 FOR J=1 to 1000: NEXT J
3+
10 PRINT CHR$(7)
4+
20 FOR I=16384 to 20479
5+
30 POKE 20480,PEEK(I)
6+
40 NEXT I
7+
100 PRINT CHR$(7)
8+
9+
Time (linapple2) 38s
10+
11+
All one one line
12+
13+
5 FOR J=1 to 1000: NEXT J
14+
10 PRINT CHR$(7)
15+
20 FOR I=16384 to 20479
16+
30 POKE 20480,PEEK(I)
17+
40 NEXT I
18+
100 PRINT CHR$(7)
19+
20+
Time (linapple2) 37s
21+
22+
Assembly language:
23+
24+
PTR EQU $06
25+
26+
lda #0
27+
sta PTR
28+
lda #$40
29+
sta PTR+1
30+
31+
ldx #8
32+
ldy #0
33+
copy_loop:
34+
lda (PTR),y
35+
sta $5000
36+
iny
37+
bne copy_loop
38+
dex
39+
bne copy_loop
40+
41+
rts
42+
43+
Runs more or less instantaenously
44+
45+
46+

0 commit comments

Comments
 (0)