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

data section.

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

Replies

Colin admin
Posts
928
Threads
49
Location
Bulgaria

you downloaded latest beta i just updated?

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

oh sorry , works fine. my mistake

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

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

this code must print '_DATA' but it print nothing atall , is something wrong here

function event_Data() {
  uses edi;
  boolean Flg = true;  
  
  if(Flg)
   {
      Ziron_ShowMessage(Ziron_GetStringValue());       
      return true;
   }
  else
   {   
      return false;                           // let Ziron handle the line  
   }  
}

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

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

yes got the last update ver.

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

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

one more thing, when compile without the masm plugin it does not fire any error

program WIN32CUI 'Masm Syntax test';

#include 'console.zir';


.DATA  var      DB 64     //; Declare a byte, referred to as location var, containing the value 64.

wait_key(nil);
ExitProcess(0);

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

using your code, it does output:

PlugSys: _DATA

function event_Data() {
  uses edi;
  boolean Flg = true;  
  
  if(Flg)
   {
      Ziron_ShowMessage(Ziron_GetStringValue());       
      return true;
   }
  else
   {   
      return false;                           // let Ziron handle the line  
   }  
}

procedure FileEntry(DWord handle; char* strCode) {
	eax = strOffset(strCode, '.DATA');
	while (char[eax] <> 0) {
		char[eax] = "_";
		eax = strOffset(eax, '.DATA');
	}
}

function InitPlugin(pointer pGetF) {
  Ziron_LoadAll(pGetF); //use framework utility function to load all

  //register our keyword
  Ziron_RegisterKeyword('_Data', @event_Data);
  
  return strLoaded;
}

entry function DLLMain(DWord iDLL; DWord iReason; Pointer iResult) {
  if (iReason == DLL_PROCESS_ATTACH) {
    return true;
  }

  return false;
}

exports InitPlugin, FileEntry;
Colin admin
Posts
928
Threads
49
Location
Bulgaria
one more thing, when compile without the masm plugin it does not fire any error

....

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

may be i do not got the latest one

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