Author | Message | ||
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [498] - posted: 2011-11-09 14:49:58 adding string assignment to Ziron is good idea , what do you mean by term
assignment and expressions from plugin ? http://www.freewebs.com/ogremagic/index.htm | ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [500] - posted: 2011-11-09 15:01:38 no it is a way to have functions in plugins that do not affect source functions, i will explain in detail once done Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. | ||
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [502] - posted: 2011-11-09 15:04:39 ok , but is there a way to handle expression from plugIn? http://www.freewebs.com/ogremagic/index.htm | ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [504] - posted: 2011-11-09 15:49:58 you could pre-process the files Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. | ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [506] - posted: 2011-11-09 16:46:21 I think ziron will need to have a special string type and handled with special care, lets take this into account Code:
string assignment is already possible as you see, but this uses constant strings and so on... so i think ziron needs a special 'string' type that needs to be initialized and handled differently to other data types. maybe if when a string is created it is 4+length. e.g. string = [dword][data]; the first 4 bytes would contain how much memory has been allocated for this string, ziron could then keep track of this when referencing a string and do an automatic check to see if more space needs allocated, else a string would be referenced with a 4 byte offset. e.g. Code:
the following string would be initialized with a default string length, lets say 4+32=36 characters. then [myStr+4] is copied 'testing' and the first 4 bytes will be set to 32 now lets say we do Code:
first ziron will product code to check the length of the new string or using sizeof if it is a constant, which then will product code to check the allocated size of memory for the string. pseudo e.g. Code:
anyways i think i will need to carefully think about this Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. | ||
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [509] - posted: 2011-11-09 17:22:10 Ok , pascal and HLa-asm uses an other way of zero terminated string. something like this Code:
so if you have a variable that holds a string pointer , you can get it's Len by seeing the address before the pointer. BCX , has an other way , already convert it to ziron, by function H_GetTmpStr. every time you call H_GetTmpStr it will allocate a new string with desired length , it has pointer table that stores pointers in it and if it exceed it's boundary it will free the first one in the table and allocate a new one. here is the the H_GetTmpStr code. Code:
actually i prefer it. http://www.freewebs.com/ogremagic/index.htm | ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [512] - posted: 2011-11-09 18:35:37 i will add some new event functions such as.... onVariable onLocal onRegister each of them will be fired when lets say: Code:
onRegister would be fired before anything is processed here, but not inside of calls or other code so... Code:
this code would not be affected by the event, only when a register is the start of a new command, for higher level code, this would allow for you to write assignment plugins and so on.... Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. | ||
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [513] - posted: 2011-11-09 18:44:41 good idea , BTW does Ziron keep track of global variables, local variables , local addresses, global addresses in a tables. and if so can we access to them from plugin ? http://www.freewebs.com/ogremagic/index.htm |
Currently Active Users: There are currently 14 user(s) online. 0 member(s) and 14 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 |