Freya wrote:
>It's beeen a long time, but I seem to remember that the command LDIR was
>really easy to use and very fast!??
LDIR is great for moving memory, but the loops described by Laurens are
general purpose.
Greetz,
Patriek
--
For info, see http://www.stack.nl/~wynke/MSX/listinfo
It's beeen a long time, but I seem to remember that the command LDIR was
really easy to use and very fast!??
love
Freya
- Original Message -
From: Laurens Holst <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 15, 2001 2:01 AM
Subject: Re: Large loop
> In general, for a loop with more than 256 steps, I use the following
> code:
>
> ld bc,ITERATIONS
> LOOP: push bc
> ...
> (whatever must be done ITERATIONS times)
> ...
> pop bc
> dec bc
> ld a,b
> or c
> jr nz,LOOP
Faster is:
ld b,ITERATIONS mod 256
ld c,(ITERATIONS-1) / 256 +1
LOOP:
{do
> > > ld hl,DATA_AREA
> > > ld de,DATA_AREA+1
> > > ld bc,4096-1
> > > ld (hl),0
> > > ldir
> >
> > Yes, it is the faster method to fill a memory area.
>
> It's surely the smallest way to fill a memory area,
> but I believe there is a faster method:
>
> ld hl,DATA_AREA
> ld de,DATA_AREA+1
> ld (hl
'Patriek Lesparre' wrote about 'HTML mails (was RE: Z80 loops)' - Tue, Oct 23, 2001 at
05:04:56PM CEST
> The following was recieved by me (Eudora Pro) with
> Content-Type: multipart/alternative;
> boundary="_=_NextPart_001_01C15BB8.C50D2E50&q
The following was recieved by me (Eudora Pro) with
Content-Type: multipart/alternative;
boundary="_=_NextPart_001_01C15BB8.C50D2E50"
while normal mails are sent with
Content-Type: text/plain; charset=us-ascii
So definately something is wrong.
Patriek
At 13:49 23-10-01 +020
Hi,
> This page still has to be fixed, it has spaces in the image files, and
> I got a mail from someone who showed me that OR netscape OR linux
> can't handle spaces in images on the internet... Anyway, the z80 docs
I was the one who sent you that email. Both Netscape AND Linux (or any
other Un
It _was_ sent in plain text. I received it as plain text. Maybe Outlook
converts plain text into html whenever it /receives/ the bloody mail?
Keep on posting in plain text, as I use 'mutt'.
Thom 'don't be sorry about the non-html' Z.
On 23.10.2001 at 14:35 Seidel, J wrote:
> Guess what?
>
>
Title: RE: Z80 loops
Guess what?
It **IS** set to plain text!! That's the first thing I tried :)
Even now it's set to plain text (while typing, the layout -> Plain text is checked). However, AFTER I hit ctrl+enter or click send, it STILL is sent in HTML format
mailinglist).
Otherwise, maybe you are on a company M$ exchange server that modifies you
message (yek).
Greetz
Patrick
- Original Message -
From: Seidel, J
To: '[EMAIL PROTECTED]'
Sent: Tuesday, October 23, 2001 1:49 PM
Subject: RE: Z80 loops
Since year and day I have these archiv
Title: RE: Z80 loops
Since year and day I have these archives stored on my PC :)
Also, the Z80 documentation of CA3 is based on these docs... Online docs available at http://TeddyWareZ.cjb.net/CA3 (documentation link)
This page still has to be fixed, it has spaces in the image files, and
TI calc is indeed interesting!
But better wait before going there, the archives are temporarily taken
offline.
--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html
f Patriek
> Lesparre
> Sent: Monday 22 October 2001 4:44pm
> To: [EMAIL PROTECTED]
> Subject: RE: Z80 loops
>
>
> Tony Bedford wrote:
> >I'm hoping to put together a tip sheet with example
> >code for newbie Z80 programmers like myself. I'd like
> &
> ld hl,DATA_AREA
> ld de,DATA_AREA+1
> ld (hl),0
> rept 4095
> ldi
> endm
> I did use this loop expansion inside the core of
> Fudebrowser for DOS, but I believe Adriano wrote it out
> when porting to UZIX, due to lack of space. This trick
> is also used
Nestor wrote:
>
> > ld hl,DATA_AREA
> > ld de,DATA_AREA+1
> > ld bc,4096-1
> > ld (hl),0
> > ldir
>
> Yes, it is the faster method to fill a memory area.
It's surely the smallest way to fill a memory area,
but I believe there is a faster method:
ld hl,DATA_AREA
ld de,DA
Tony Bedford wrote:
>I'm hoping to put together a tip sheet with example
>code for newbie Z80 programmers like myself. I'd like
>to include your ideas, do you mind?
Sure, they're not MY ideas. Although I did think of the 32bit shift myself,
I probably didn't invent it first. Any experienced Z80
> ld hl,DATA_AREA
> ld de,DATA_AREA+1
> ld bc,4096-1
> ld (hl),0
> ldir
Yes, it is the faster method to fill a memory area.
In general, for a loop with more than 256 steps, I use the following
code:
ld bc,ITERATIONS
LOOP: push bc
...
(whatever must be done ITERATIONS times)
...
pop bc
dec bc
ld
[EMAIL PROTECTED]]On Behalf Of Patriek
> Lesparre
> Sent: Saturday 20 October 2001 4:29am
> To: [EMAIL PROTECTED]
> Subject: Re: Z80 loops
>
>
> Tony Bedford wrote:
> >I have a loop that needs to clear a 4096 byte area.
> >I would like it to be as fast as possible,
Tony Bedford wrote:
>I have a loop that needs to clear a 4096 byte area.
>I would like it to be as fast as possible, but this is
>not critical.
Even if you do not use a LDIR like suggested already, your routine is
pretty inefficient. I'll give you a faster version, so you can learn a few
simple
Tony,
> I have a loop that needs to clear a 4096 byte area.
> I would like it to be as fast as possible, but this is
> not critical.
ld hl,DATA_AREA
ld de,DATA_AREA+1
ld bc,4096-1
ld (hl),0
ldir
:)
=
Adriano Camargo Rodrigues da Cunha ([EMAIL PROTECTED])
http://www.adrpag
OTECTED]]On Behalf Of ag0ny
> Sent: Friday 19 October 2001 6:42pm
> To: [EMAIL PROTECTED]
> Subject: Re: Z80 loops
>
>
> Hi,
>
> What about this?
>
> ld hl,DATA_AREA
> ld (hl),0
> ld de,DATA_AREA+1
> ld bc,4095
>
Hi,
What about this?
ld hl,DATA_AREA
ld (hl),0
ld de,DATA_AREA+1
ld bc,4095
ldir
Regards,
Tony Bedford wrote:
>
> Hi,
>
> I have a loop that needs to clear a 4096 byte area.
> I would like it to be as fast as possible, but this is
Hi,
I have a loop that needs to clear a 4096 byte area.
I would like it to be as fast as possible, but this is
not critical.
Here's what I came up with:
; need to clear data area
; data area is 4096 bytes
; 4096 = (255*16)+16
ld hl,DATA_AREA
ld c,16
@@s
23 matches
Mail list logo