OT: Altair emulator code & C pointers

From: Bob Withers <bwit_at_pobox.com>
Date: Mon Jun 12 12:32:16 2000

At 10:55 AM 6/12/00 -0400, you wrote:
[snip]
>
>// copy binary image to the emulator memory
>for (i = 0; i <= iLength; i++)
> Mem[i+addr] = (uchar) *pstrBuffer+i;
> return 0;
>
> This is the important code. The Altair's memory is represented by an array
>of type uchar and pstrBuffer is the file buffer used int he fread command.
>My question is whether I'm doing the assignment right?
>

Hi Rich,

A possibly faster way to implement this loop is:

        memcpy(Mem + addr, pstrBuffer, iLength);
        return(0);

Regards,
Bob
Received on Mon Jun 12 2000 - 12:32:16 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:33:01 BST