flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Ciper 05 Jan 2013, 18:25
Code: org 100h mov al,0ch ; Nibble to convert aaa or ax,3030h mov bx,ax mov ah,2 rept 2 { mov dl,bh int 21h shl bx,8 } int 20h _________________ Ciper |
|||
![]() |
|
Ciper 05 Jan 2013, 19:41
baldr,
Thank you very much for your constructive criticism and code+explanations; I am sure I will benefit from those (as I think some other readers as well). ps: No excuse for bad space usage ![]() _________________ Ciper |
|||
![]() |
|
baldr 05 Jan 2013, 20:05
Ciper,
Those spaces are just elements of style. Examine others' sources, find style that pleases you most, adjust it as you want, and use it properly. Be ready for criticism too, nobody's perfect. ![]() Heh, in your Principles of Operation thread you call FASM source "highly readable and annotated". Was the pun intended? ![]() |
|||
![]() |
|
Ciper 05 Jan 2013, 20:14
baldr,
Sure; mea culpa; I treated these small tutorials with some neglect. Some pun intended, indeed... But overall it -- FASM source -- is readable and modifyable. By the way, what I especially like in your code is that '00'; sometimes we think too much in hex ![]() _________________ Ciper Last edited by Ciper on 05 Jan 2013, 21:05; edited 3 times in total |
|||
![]() |
|
HaHaAnonymous 05 Jan 2013, 20:51
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:05; edited 1 time in total |
|||
![]() |
|
baldr 05 Jan 2013, 21:12
Ciper,
If we do read in hex and can write in hex, how do anybody suppose that we don't think in hex? ![]() Long time ago I thought that Tomasz feed real sources to some stripper (no pun, some program like strip(1), only with other targets) that removes all comments, makes structure offsets plain numbers and such... but later some bugs discovered (ahoy, revolution!) convince me that those sources are appear authentic. They're readable (somewhat) and modifiable (to that extent, too). Anyway, I don't think that 3Bh is any better than ';'. To paraphrase my mother, "never use constant of other type if you really mean it of this type". ----8<---- HaHaAnonymous, No space after comma in operands. That makes me really mad. ![]() Tabs seem to be at 3. Not a power of 2 (or multiple of it). Data definition directives are too far to right to be immediately recognized. Not to mention (I don't think it's production code) those jmps to the next instruction's address. ![]() |
|||
![]() |
|
HaHaAnonymous 05 Jan 2013, 21:24
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:05; edited 1 time in total |
|||
![]() |
|
baldr 05 Jan 2013, 22:09
HaHaAnonymous,
Space after comma is just a preference (you do have space after comma in your regular text, aren't you?). Spaces instead of tabs are good. Only their quantity make me mad (or maybe, divisibility of their quantity?) Code: ; <-----------------> data1 dd $00000000 ; line comments at col. 45 |
|||
![]() |
|
HaHaAnonymous 05 Jan 2013, 22:50
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:05; edited 1 time in total |
|||
![]() |
|
baldr 05 Jan 2013, 23:57
HaHaAnonymous,
Maybe it can relieve our eyes if you just tab db (or space it to line up) for short labels, and use one space after every label that extends out of tab space. I do understand that you may have no problems with tracking those spaces. I don't understand why do you impose such abilities on us. Do you want us to read your code, or just to ignore it because you ignore its readability? When I scan the foreign code, I don't have extra time (hell, I don't have it anyway). Well-formed code (not so strict as well-formed XML ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.