Author Topic: Doyouknow  (Read 2341 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
Doyouknow
« on: July 07, 2011, 05:26:55 AM »
Deleted...
« Last Edit: May 05, 2015, 12:31:38 PM by Peter »

Charles Pegge

  • Guest
Re: Doyouknow
« Reply #1 on: July 07, 2011, 07:01:29 AM »

Hi Peter,

It's the first 2 lines of Assembler. Replace lea with mov, and it will get the end successfully.

lea gives you the effective address of the variable, not its value.

Code: OxygenBasic
  1.  
  2.     mov   esi,mem2  
  3.     mov   edi,mem1  
  4.  

Charles

Charles Pegge

  • Guest
Re: Doyouknow
« Reply #2 on: July 07, 2011, 12:51:19 PM »
Peter,

Getmemory(n) returns a pointer (address) to a memory block filled with  null bytes. It is Typed as a sys integer, So you can do whatever you want with it.

There is another function News(n) and its synonym Nuls(n) which does exactly the same thing except it is treated as a Bstring so that string variables can receive it as an allocation of string space.

The traditional Space(n) and String(n,c) functions are also very closely related.

Charles