Authors
Publication
Publication Details
Volume: 3 Issue: 3
Date
May/June 1985
Pages
8
See all articles from Sinc-Link v3 n3
I discovered something very peculiar about the 2068 when I tried to put some machine code into the area of memory normally occupied by the RAM-resident code “function dispatcher”. It seems as if machine code routines in this area (6200 hex or greater) run more slowly than identical rountines elsewhere in memory.
To see this for yourself, try putting the routine shown below at two locations: at A000 and at 6200, then run the two routines. Enter the routine at A000, save it to tape, then compare the results of the two sequences.
LOAD "" CODE 40960
PRINT USR 40960
LOAD "" CODE 25088
PRINT USR 25088
Machine code routine
A000 FE DI
A001 3E02 LD A,02
A003 47 LD B,A
A004 21FF1F LD HL,1FFF
A007 10FE LOOP DJNZ,LOOP
A009 De3FE OUT (FE),A
A00B EE0F XOR 0F
A00D 06A4 LD B,A4
A00F 2D DEC L
A010 20F5 JR NZ,LOOP
A012 05 DEC B
A013 20F5 DEC H
A014 20F1 JR NZ,LOOP
A016 FB EI
A017 C9 RET