flat assembler
Message board for the users of flat assembler.

Index > Linux > Questions

Author
Thread Post new topic Reply to topic
stanks



Joined: 01 Dec 2003
Posts: 36
Location: Croatia
stanks
Hi

I have few questions. I am using fasm under linux.
Under MASM we can do this:

.data?
var1 byte 128 dup(?)

Is there equivalent under fasm? I try var1 rb 128, but this is not the same.

I forget what else i want to ask Rolling Eyes Shocked Confused ...i have headache...sorry.

stanks
Post 08 Nov 2004, 18:16
View user's profile Send private message ICQ Number Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
Why isn't the same?
It reserves 128 bytes starting from var1 address.

I hope your headache terminates soon Smile
Post 08 Nov 2004, 18:30
View user's profile Send private message Yahoo Messenger Reply with quote
stanks



Joined: 01 Dec 2003
Posts: 36
Location: Croatia
stanks
Well if i reserve 100,000 bytes my program will be 100,000 bytes greater.

stanks
Post 08 Nov 2004, 18:37
View user's profile Send private message ICQ Number Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1171
Location: Overflow
Matrix
you can only reserve bytes at the end of your file if you db 1 bytes after rb 100000 then all of your rb's will be db s
Post 08 Nov 2004, 18:52
View user's profile Send private message Visit poster's website Reply with quote
stanks



Joined: 01 Dec 2003
Posts: 36
Location: Croatia
stanks
I don't understand you Matrix. Can you give me an example?

Thanks

stanks
Post 08 Nov 2004, 19:14
View user's profile Send private message ICQ Number Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1171
Location: Overflow
Matrix
sure Smile


compile this:
Code:
org 100h ;COM file
rb 10
db 'some data'
x rb 65000
;buffer: times 1 db 9
    


now try to uncomment the 1 byte buffer with initial value of 9 Smile
ohh, my file growed large!
its because you declared a byte after a reserved block
Post 08 Nov 2004, 19:30
View user's profile Send private message Visit poster's website Reply with quote
stanks



Joined: 01 Dec 2003
Posts: 36
Location: Croatia
stanks
Thanks

It works, but it doesn't work under gtk (linux). File is still 65000 bytes larger Sad

stanks
Post 08 Nov 2004, 20:16
View user's profile Send private message ICQ Number Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1171
Location: Overflow
Matrix
linux version declares reserved bytes in your com file?
Post 08 Nov 2004, 20:31
View user's profile Send private message Visit poster's website Reply with quote
stanks



Joined: 01 Dec 2003
Posts: 36
Location: Croatia
stanks
Yes i simply compile your example. When last line is commented file is 19 bytes and when i uncomment it, it is 65020 bytes. And i put all reserved bytes after db's, but no change.

stanks
Post 08 Nov 2004, 20:36
View user's profile Send private message ICQ Number Reply with quote
stanks



Joined: 01 Dec 2003
Posts: 36
Location: Croatia
stanks
Heh. Problem solved. Thank you very much Matrix. I put rb's in wrong section.

Thanks once again

stanks
Post 08 Nov 2004, 20:37
View user's profile Send private message ICQ Number Reply with quote
stanks



Joined: 01 Dec 2003
Posts: 36
Location: Croatia
stanks
Until i find another (better) solution this is ok.

stanks
Post 08 Nov 2004, 20:38
View user's profile Send private message 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 GitHub, YouTube, Twitter.

Website powered by rwasa.