Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Requests and Feedback

get entire line

A community discussion post from the original code:zIRON forum.

Replies

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok workes well.

btw does Ziron_ExtractLine changes the Ziron just like Ziron_GetNextToken or like Ziron_PeekNextToken

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

no, no states are changed.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

this give error

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

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

you need to state the errors you receive when posting about an error, i am unable to always produce the same problem and need to know the error from the compiler.

check in ziron.exe directory there is a log.txt which at bottom contains the output.

note that such code would also cause the assembler to become stuck in a loop, since it will keep processing the same line over and over.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok consider my last event_mov ,

when compiling this

program WIN32CUI 'mov plugin test';
#include 'console.zir';

mov eax,10; 
print('eax = ', eax:int, '\r\n');

wait_key(nil);
ExitProcess(0);

i got that

Ziron Compiler 1.1.27.6 Copyright (C) 2011. OverHertz Ltd. All rights reserved. -------------------------------------------- 11/7/2011 8:32:16 PM -------------------------------------------- PlugSys: Emit plugin has loaded! PlugSys: Mov plugin has loaded! PlugSys: mov PlugSys: eax PlugSys: , PlugSys: value PlugSys: mov PlugSys: PlugSys: PlugSys: [1,3]: Unknown Identifier "mo" in [plugin buffer] Code: mo

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

this is because you are detecting the keyword mov and executing the keyword mov so you are in a loop, i have just made it so keywords are not fired when inside ziron_execute

i have re-updated the package

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

is it in this post '2011-11-06 18:37:47'

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

sorry i don't understand - but the alpha package has been updated with the fix for your problem.