webserver: some memory speed tests

This commit is contained in:
Vince Weaver 2016-12-16 12:26:51 -05:00
parent d984f43407
commit b42bd856eb
3 changed files with 71 additions and 2 deletions

View File

@ -2,7 +2,10 @@ DOS33 = ../dos33fs-utils/dos33
TXT2BAS = ../asoft_basic-utils/tokenize_asoft
MAKEB = ../dos33fs-utils/make_b
all: ethernet.dsk
all: ethernet.dsk memcpy.o
memcpy.o: memcpy.s
ca65 -o memcpy.o memcpy.s -l memcpy.lst
SETUP.BAS: setup.bas
$(TXT2BAS) < setup.bas > SETUP.BAS
@ -26,4 +29,4 @@ ethernet.dsk: SETUP.BAS \
$(DOS33) -y ethernet.dsk BSAVE -a 0x4000 ./c/vmw_logo.png
clean:
rm -f *~ *.BAS R.TXT
rm -f *~ *.BAS R.TXT *.o *.lst

20
ethernet/memcpy.s Normal file
View File

@ -0,0 +1,20 @@
.define EQU =
PTR EQU $06
lda #0
sta PTR
lda #$40
sta PTR+1
ldx #8
ldy #0
copy_loop:
lda (PTR),y
sta $5000
iny
bne copy_loop
dex
bne copy_loop
rts

46
ethernet/memcpy.txt Normal file
View File

@ -0,0 +1,46 @@
Test 1:
5 FOR J=1 to 1000: NEXT J
10 PRINT CHR$(7)
20 FOR I=16384 to 20479
30 POKE 20480,PEEK(I)
40 NEXT I
100 PRINT CHR$(7)
Time (linapple2) 38s
All one one line
5 FOR J=1 to 1000: NEXT J
10 PRINT CHR$(7)
20 FOR I=16384 to 20479
30 POKE 20480,PEEK(I)
40 NEXT I
100 PRINT CHR$(7)
Time (linapple2) 37s
Assembly language:
PTR EQU $06
lda #0
sta PTR
lda #$40
sta PTR+1
ldx #8
ldy #0
copy_loop:
lda (PTR),y
sta $5000
iny
bne copy_loop
dex
bne copy_loop
rts
Runs more or less instantaenously