Register | Login
Forum Index > Source Help > compiling error
Author Message
Pages: 1 2 3 4
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[163] - posted: 2011-10-27 20:04:31
also rather than alot of mem access

Code:
push edi
edi = GetNextLine(@buf);

repeat {
  WriteLn(@LineIn);
  Eax = @buf;
  
  add eax, edi
  
  edi = GetNextLine(Eax);
} while (edi > 0);

int32 k = edi;
pop edi


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
[164] - posted: 2011-10-27 20:08:30

Code:
while (edi > 0);


did not compile ok!!!!!!!!!


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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[165] - posted: 2011-10-27 20:09:46
yes as i said in other post, it is a bug for next patch release,

change it to while edi > 0)

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
[166] - posted: 2011-10-27 20:12:40

ok , here it is until fixing come.
Code:
while(edi > 0)
{
  WriteLn(@LineIn);
  Eax = @buf;
  
  add eax, edi
  
  edi = GetNextLine(Eax);
} 


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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[167] - posted: 2011-10-27 20:31:12
i'd like to know that when writing console app you can include 'ch.zir'

it is a basic error output, access violations etc, will help you debug your code smile

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
[169] - posted: 2011-10-27 20:41:15
ok i will.

i want you to help me in the following code. i have logical error this code always print
the first line of fpu_opcodes.txt .
Code:
program WIN32CUI 'test';

#include 'console.zir';
#include  'ch.zir'

const  buf = loadfs('fpu_opcodes.txt');
char LineIn[1024];

function GetNextLine(char* strbuf)
{ 
   global int32 Incr=0; 
   uses edi esi;
   Eax = 0;
   Ecx = Incr;  
   Esi = strbuf;
   add Esi,Ecx
   Edi = @LineIn;
   while( char[Esi] != 0)
    {
       if(char[Esi] == 13 and char[esi+1] == 10) 
        {
          char[Edi] = 0; 
          Ecx = Incr;
          add Ecx,Eax
          add Ecx,2
          Incr = Ecx;  
          break;
        }
       bl = char[Esi]; 
       char[Edi] = bl; 
       Eax++; 
       Esi++;
       Edi++;
   }
}

push edi
edi = GetNextLine(@buf);
while(edi > 0)
{
  WriteLn(@LineIn);
  edi = GetNextLine(@buf);
} 
int32 k = edi;
pop edi

wait_key(nil);

ExitProcess(0);



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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[170] - posted: 2011-10-27 20:41:27
also from what i understand; what you want is:

Code:
program WIN32CUI 'test';

#include 'console.zir';
#include 'ch.zir';

const buf = loadfs('fpu_opcodes.txt');
char LineIn[1024];

function GetNextLine(char* strbuf) { 
  uses esi edi;
  eax = xor;
  
  esi = strbuf;  
  edi = @LineIn;
  
  while( char[esi] != 0) {
    if (char[esi] == 13) {
      char[edi] = 0; 
      eax++; 
      break;
    }
    bl = char[Esi]; 
    char[edi] = bl; 
    eax++; 
    esi++;
    edi++;
  }
}


push edi
ecx = @buf; //eax would be changed by GetNextLine
edi = GetNextLine(eax);

while(edi > 0) {
  WriteLn(@LineIn);
  
  add ecx, edi  
  edi = GetNextLine(ecx);
} 

int32 k = edi;
pop edi


wait_key(nil);

ExitProcess(0);


Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[171] - posted: 2011-10-27 20:51:31
another change that would be important:

Code:
function GetNextLine(char* strbuf) { 
  uses esi edi;
  eax = xor;
  
  esi = strbuf;  
  edi = @LineIn;
  
  while( char[esi] != 0) {
    if (char[esi] == 13) {
      eax++; 
      break;
    }
    bl = char[Esi]; 
    char[edi] = bl; 
    eax++; 
    esi++;
    edi++;
  }
  char[edi] = 0;   
}


Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Pages: 1 2 3 4
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 7 user(s) online. 0 member(s) and 7 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