The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
POKE STRING and @string$
#11
LCD Wrote:
nitrofurano Wrote:btw, it's missing a description about memcopy (or memcpy) at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Library">http://www.boriel.com/wiki/en/index.php ... IC:Library</a><!-- m -->

based on that, i'm trying to create a new subroutine, which attempts to do a memcopy from paged memory (128k) (far still incomplete and accurate, because, besides it doesn't work fine yet, it doesn't copy a group of bytes splitted into different neighbour pages)

Code:
sub memcpypagedtodisplay(tdest as ulong, tpadr as ulong, tleng as ulong): dim tpvl as ulong dim tqadr as ulong tpvl=int (tpadr/16384) tqadr=tpadr mod 16384 out 32765,16+(int(tpvl*1.5)) memcopy(tdest,49152+tqadr,tleng) end sub
Is this not a little bit offtopic?
Anyway, Memcopy is not optimal, it can be replaced with much faster and shorter ASM routine. I made one and it is on my HDD, but I do not remember which one was working and which not.
Code:
sub CopyMem(src as Uinteger,des as Uinteger,length as Uinteger,bank as ubyte) asm ld a,(ix+11) ld bc,32765 out (c),a ld hl,(ix+5) ld de,(ix+7) ld bc,(ix+9) ldir ld a,(23388) ld bc,32765 out (c),a end asm end sub
Code:
sub CopyMem(src as Uinteger,des as Uinteger,length as Uinteger) asm ld d,(ix+7) ld e,(ix+6) ld h,(ix+5) ld l,(ix+4) ld b,(ix+9) ld c,(ix+8) ldir end asm end sub
At the moment I'm "tera-busy" (not mega, neither giga Tongue) with the compiler refactoring and other projects, so I have almost no time to examine this.
This idea is *very* interesting, and this routine may go in the library/ package, bundled with the compiler. :roll:
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)