flat assembler
Message board for the users of flat assembler.

Index > Main > Data, definitions of data in binaries...

Author
Thread Post new topic Reply to topic
Custodian



Joined: 08 Jun 2004
Posts: 10
Location: Russia
Custodian
I have two problems...
1) Can I define data of large size?? In Masm such is "label db 234 dup (?)" or some thing same...
2) Is this correct: I write bin program, Using standart DOS interruption, I allocate some memory for running another program, but use this memory to storage some temporary data of my program...
??? Is that correct ???
thx...

_________________
--- Line of Cut ---
Post 13 Jun 2004, 20:47
View user's profile Send private message MSN Messenger ICQ Number Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
1a) label rb 234
1b) label times 234 db ?

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 13 Jun 2004, 23:31
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Custodian



Joined: 08 Jun 2004
Posts: 10
Location: Russia
Custodian
Это все хорошо...
That all is quite good, but what about second theme????

I can explain it more carefully...
Some kind of a program, starting after second boot loader, has a lot of parametres, (We don't any memory manager) which must be avalible at every moment of time... It may be struct or smth like that... so using a stack is a problem...
We start this program, and write some parametres after this program at our memory,
[program],[free memory........
after starting program
[program],[param1],[param2],[paramN],[free memory....
during working of program
[program],[free memory],[paramN],[free memory...

How can I recieve address of free memory?? I don't know how many params would be in program, before it starts... this is a problem...
I know solution using a register or some variable to storage address of free memory, and change it during program... But this works slowly, and we loss some free memory...

If somebody have another solution please reply...

thx...
Post 14 Jun 2004, 15:39
View user's profile Send private message MSN Messenger ICQ Number Reply with quote
Custodian



Joined: 08 Jun 2004
Posts: 10
Location: Russia
Custodian
Oh... I've found solution....

Mr. Comrade
comrade wrote:

1b) label times 234 db ?

It doesn't work fine at my fasm 1.52...
reserved data is quite good, but if I need some definit value?
Masm "256 dup (0)"...

thx...

_________________
--- Line of Cut ---
Post 15 Jun 2004, 06:39
View user's profile Send private message MSN Messenger ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Custodian wrote:
Oh... I've found solution....

Mr. Comrade
comrade wrote:

1b) label times 234 db ?

It doesn't work fine at my fasm 1.52...


actually you should write it like this:
Code:
label: times 88 db ?    

if you want to put some initialised data, just change it to:
Code:
label: times 88 db 'A'
label: times 88 db 0xff
label: times 88 db 127
... and so on :wink:    


regards
Post 15 Jun 2004, 06:54
View user's profile Send private message Visit poster's website Reply with quote
Custodian



Joined: 08 Jun 2004
Posts: 10
Location: Russia
Custodian
Ok... thx...
Post 15 Jun 2004, 07:32
View user's profile Send private message MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.