Register | Login
Forum Index > Requests and Feedback > get entire line
Author Message
Pages: 1 2 3 4 5 6 7 8
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[438] - posted: 2011-11-07 20:58:57

ok got it but have this error

Ziron Compiler 1.1.27.6
Copyright (C) 2011. OverHertz Ltd. All rights reserved.
--------------------------------------------
11/7/2011 8:56:35 PM
--------------------------------------------

PlugSys: Emit plugin has loaded!
PlugSys: Mov plugin has loaded!
--------------------------------------------


[1,14]: Expected hexadecimal or - or number or register or [expression] or procedure address or constant string or variable or local variable or local parameter or constant but found valu in [plugin buffer]
Code:
mov eax, valu


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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[439] - posted: 2011-11-07 21:06:11
ok i've fixed 1 other bug, but this still will not solve your problem because what you are trying to do is impossible.. if you return true the assembler will move onto the next keyword from mov which is eax

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
[440] - posted: 2011-11-07 21:09:14
look at this

Code:
function event_mov() {
  uses edi;
  char buf[2048];
  Dword Len;
       
  //assembler state: on "mov"
  
  len = Ziron_ExtractLine(@buf, 2048);  
  Ziron_ShowMessage(@buf);
  
  eax = Ziron_Execute(@buf,Len);
  if (eax == false) {
    Ziron_FatalError('Error plugin');
    return true;
  }       
  
  //returning true, which means this keyword and its parameters have been handled, we move onto next keyword
  return true;
  
  //assembler will move to eax from the line "mov eax, 10"
}


now if you return false, this will work but it means each mov will have been executed twice, once by your plugin from Ziron_Execute and once by the assembler.

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
[441] - posted: 2011-11-07 21:12:26

i see now,

can i have a function that force Ziron to move to next keyword after i get the entire line
by Ziron_ExtractLine

http://www.freewebs.com/ogremagic/index.htm
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[442] - posted: 2011-11-07 21:14:42

sorry ' i am not concentrating well now ,

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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[443] - posted: 2011-11-07 21:26:54
i could add a function to move to the next line, but then you may have further problems..

take this line for example:

Code:
mov eax, 10; callmyFunc(
                         'param1',
                         'param2'
             );


if someone wrote code like this your plugin would execute

Code:
mov eax, 10; callmyFunc(


which for one will cause an error, and if your plugin ignored it, then the assembler would move to the param1, and have problems 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
[444] - posted: 2011-11-07 21:27:12

ok i have done it
Code:
inline procedure Ziron_GotoNextLine()
{
  eax = Ziron_IsNextLineBreak();
  while(!eax)
   {
      Ziron_GetNextToken();
      eax = Ziron_IsNextLineBreak();
   }
}


function event_mov()
{
  uses edi;
  char buf[2048];
  Dword Len;
      
  len = Ziron_ExtractLine(@buf, 2048);  
  Ziron_ShowMessage(@buf);
  
  eax = Ziron_Execute(@buf,Len);
  if (eax == false) {
    Ziron_FatalError('Error plugin');
    return true;
  }       
  
  Ziron_GotoNextLine();
 
  return true;  
}


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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[445] - posted: 2011-11-07 21:29:09
i think you should still take a look at my previous post, as you may still run into this problem smile

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


Quick reply:

Message:



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