flat assembler
Message board for the users of flat assembler.

Index > Main > I hope this doesn't sound stupid,but can I change the base?

Author
Thread Post new topic Reply to topic
2



Joined: 26 Sep 2006
Posts: 92
2 21 Oct 2006, 02:57
Some of you may know that I have been using decimal for the interrupts and
stuff in my programs ONLY because it saves space because FASM's default
base is decimal. I like hex better ,but I don't want the '0x' prefix,or 'h' suffix.
The deal is that that takes more bytes.

You may not understand this since you guys mostly write programs,but I have
other things I use assemblers for. I was wondering if there is ANY way I could
change the default bade to hexidecimal. If not,then I'll find another assembler
that has such a feature for this plan.

_________________
There are 10 kinds of people in the world.
Those who know binary and those who haven't met me.
Post 21 Oct 2006, 02:57
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 21 Oct 2006, 03:54
2, why do you need to save bytes in *.asm/*.inc files???

Do you need that INT instructions works with hex? Try this then
Code:
macro int x{int $#x}    


But seriously, I can't see why is so important to save bytes on the source code, the binary output is what's really matters (at least for me).
Post 21 Oct 2006, 03:54
View user's profile Send private message Reply with quote
2



Joined: 26 Sep 2006
Posts: 92
2 21 Oct 2006, 04:44
No,you don't understand!!!!!

I'm not using it to write a program! I'm using it as a source that
outputs customized files which contain weird characters other than those
you can type on the keyboard. I've had some success,but I want to use
hexidecimal as the default base so that EVERY constant I declare is ALWAYS
assumed to be hex.

This isn't about programming. It's about the ultimate plan I have.
I'd tell you about it,but unless I get the right tools,I'll never be able to do it.
Post 21 Oct 2006, 04:44
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 21 Oct 2006, 05:27
2 wrote:
is ANY way I could change the default bade to hexidecimal.
Edit EXPRESSI.INC to your liking. fasm is an open source assembler so you can change it to suit your needs.

At ~ line 157 is the label "get_number:" from there you can make fasm have whatever default numbering system you like. Remember to take account of numbers that look like decimal that end in "d". Another thing to remember that all the hex numbers will still have to start with a digit 0-9 else the assembler cannot distinguish between labels and numbers.
Post 21 Oct 2006, 05:27
View user's profile Send private message Visit poster's website Reply with quote
2



Joined: 26 Sep 2006
Posts: 92
2 21 Oct 2006, 06:18
Hmmm,I'll think about that. Thanks.
Post 21 Oct 2006, 06:18
View user's profile Send private message 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.