flat assembler
Message board for the users of flat assembler.

Index > DOS > file I/O

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
rhyno_dagreat



Joined: 31 Jul 2006
Posts: 487
Location: Maryland, Unol Daleithiau
rhyno_dagreat 12 Oct 2006, 13:31
I just use a calculator for speed primarily.
Post 12 Oct 2006, 13:31
View user's profile Send private message Reply with quote
Goplat



Joined: 15 Sep 2006
Posts: 181
Goplat 12 Oct 2006, 14:00
2: Yes, you did it right, but look how long it took. If it had just been mov ax,4e00h you could immediately see it's dos call 4e hex (78 decimal). Setting both ah and al at once like that even though they're used separately is common in assembly, and as you can see decimal makes it take a long time to figure out what's going on.
Post 12 Oct 2006, 14:00
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 12 Oct 2006, 14:16
What about this? Wink
Code:
        org     256

        finit
        fldpi
        fsubr   [alpha]
        fistp   [alpha]
        mov     ah,byte [alpha]
        int     33

 alpha dd 1117669503    
Post 12 Oct 2006, 14:16
View user's profile Send private message Visit poster's website Reply with quote
2



Joined: 26 Sep 2006
Posts: 92
2 12 Oct 2006, 21:42
Quote:

2: Yes, you did it right, but look how long it took. If it had just been mov ax,4e00h you could immediately see it's dos call 4e hex (78 decimal). Setting both ah and al at once like that even though they're used separately is common in assembly, and as you can see decimal makes it take a long time to figure out what's going on.


Yes,but you're forgetting 2 things. First of all,the assembler
recognizes is the same no matter how you do it,second,we have
calculators right on our computers so you don't have 2 torment
yourself like I did. I have hex edited many games. I'm always
struggling with the fact that the games do the numbers in decimal,
but in a hex editor they are hex. So,I torment myself because it's
needed. You write your code however you want,but I'm still using
decimal just to save space. I suggest that you stay away from all my
topics if you don't like it.
Post 12 Oct 2006, 21:42
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 12 Oct 2006, 21:59
You can aswell make your own versions of all the assembly mnemonics and rename registers (like using R0D instead of EAX) etc. if it suits you - I know people who do this (one especially interesting case was my friend from Russia that made customized version of fasm to use two-letter mnemonics intead of three, like MV and SB instead of MOV and SUB - talk about saving space!). But if you want the code to be read by others, it's good to actually follow some standards. Otherwise you can just share only the output code - well, anyone can disassemble it if really wants.

Perhaps that may sound a bit unconvincing from someone, who almost doesn't comment his code and uses raw structure offsets and magic constants in large amount. Perhaps Tom Tobias is a better authority to speak about readability on this forums. Wink

PS. However if you just want to share the finished program, without discussing the programming issues, you're of course free to share it in any form you wish. As long as it's a usable form.
Post 12 Oct 2006, 21:59
View user's profile Send private message Visit poster's website Reply with quote
2



Joined: 26 Sep 2006
Posts: 92
2 13 Oct 2006, 20:10
Yeah,that would be cool,but I don't really wanna confuse people that much. Just wanna confuse you enough! Number bases just didn't really
come as confusion to me. I still don't know what Goplat was talking about.
He's obviously programming for different reasons than me.
Post 13 Oct 2006, 20:10
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.