Register | Login
Forum Index > Requests and Feedback > data section.
Author Message
Pages: 1 2 3 4 5 6 7 8 9 10 11
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[584] data section. - posted: 2011-11-11 14:29:37

how can i put something in data section , code section .... etc

Fasm uses that
Code:
section '.idata' import data readable writeable


masm uses that
Code:
 .data
        szDisplayName db "Direct Call DLL",0
        CommandLine   dd 0
        hWnd          dd 0
        hInstance     dd 0

    .code       


hlaAsm uses that
Code:
const
        XDIM := 300;
        YDIM := 300;         
static  
        align(4);
        hwnd : dword := NULL;     
storage
        align(4);
        hStdOut         :dword;    
readonly
        align(4);
        BasicTitle      :string := siteTitle_c;       



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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[585] - posted: 2011-11-11 14:35:58
ziron manages this, all consts and global vars go into the data section.

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
[586] - posted: 2011-11-11 14:38:25

what about uninitialized section

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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[588] - posted: 2011-11-11 15:44:39
currently there is no uninitialized data support

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
[590] - posted: 2011-11-11 15:47:56

ok , i asking for that because , i am planning to create masm plugin that will understand
that
Code:
program WIN32CUI 'Basic Syntax test';

#include 'console.zir';


.DATA      
var      DB 64     ; Declare a byte, referred to as location var, containing the value 64.
var2  DB ?   ; Declare an uninitialized byte, referred to as location var2.
        DB 10   ; Declare a byte with no label, containing the value 10. Its location is var2 + 1.
X      DW ?   ; Declare a 2-byte uninitialized value, referred to as location X.
Y      DD 30000 ; Declare a 4-byte value, referred to as location Y, initialized to 30000.

Z      DD 1, 2, 3     ; Declare three 4-byte values, initialized to 1, 2, and 3. The value of location Z + 8 will be 3.
bytes    DB 10 DUP(?)   ; Declare 10 uninitialized bytes starting at location bytes.
arr      DD 100 DUP(0)  ; Declare 100 4-byte words starting at location arr, all initialized to 0
str1    DB 'hello',0   ; Declare 6 bytes starting at the address str, initialized to the ASCII character values for hello and the null (0) byte.

.CODE
PUBLIC _myFunc
_myFunc PROC
  ; Subroutine Prologue
  
  mov eax,5
  ret
_myFunc ENDP

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
[594] - posted: 2011-11-11 15:52:57
aha smile

well i would suggest to init vars as 0x00 regardless of uninit. I will look into ununit data in good time 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
[595] - posted: 2011-11-11 15:58:33

ok , can i register '.DATA' as Let and Dim in plugin Basic?

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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[596] - posted: 2011-11-11 16:01:16
no because it contains special char "." i will have a think how it can be done 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 9 10 11
create new reply


Quick reply:

Message:



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