Register | Login
Forum Index > Source Help > Left function
Author Message
Pages: 1
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[256] Left function - posted: 2011-11-01 20:41:01

Hi ,

continue to converting some BCX functions to Ziron , so here is the Left function
Code:
function Left(char* str; int32 length)
{
  uses Esi Edi Ecx;
  Esi = str;
  Ecx = Esi;
  while(char[Ecx] != 0)
   {
     Ecx++;
   }
  sub Ecx,Esi 
  if(length < Ecx)
   {
      Ecx = length;
   }
  Edi = GetTmpStr(Ecx);
  push Edi 
  push Ecx
  rep movsb
  pop Ecx
  pop Eax
  char[Eax+Ecx]=0;
}


can be used like this
Code:
const name = 'Emil Halim';
pointer leftstr = Left(@name,4);
print(leftstr);



http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[258] - posted: 2011-11-02 00:03:49
btw.. what is BCX ?

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[259] - posted: 2011-11-02 06:50:42

BCX is a Basic to C Converter.

http://bcx-basic.sourceforge.net/


http://www.freewebs.com/ogremagic/index.htm
Pages: 1
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 3 user(s) online. 0 member(s) and 3 guest(s)
Most users ever online was 1046, January 28, 2022, 2:08 pm.


Statistics:
Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51
Welcome to our newest member, yecate
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd