Oxygen Basic

Programming => Problems & Solutions => Topic started by: Peter on July 07, 2011, 05:26:55 AM

Title: Doyouknow
Post by: Peter on July 07, 2011, 05:26:55 AM
Deleted...
Title: Re: Doyouknow
Post by: Charles Pegge 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
Title: Re: Doyouknow
Post by: Charles Pegge 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