flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
pelaillo 07 Aug 2004, 17:04
I agree, but I would prefer your style "4"
Code: Procedure definition structure: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +--proc ProcedureName------+ | .arg1 dd ? | Arguments block between "proc" | .arg2 dd ? | and "begin" - optional content | .arg3 dd ? | | +--locals -------+ | Common locals block, between "proc" and | | .cloc1 dd ? | | "begin". Not overlaped by "locals" blocks. | | .cloc2 dw ? | | | +--endl ---------+ | Floating locals blocks inside the +---begin------------------+ | +--locals -------+ | Code block between "begin" and | | .loc1 dd ? | | "endp" - optional content. | | .loc2 dw ? | | | +--endl ---------+ | Floating locals blocks inside the | | code, enclosed between "locals" | +--locals--------+ | and "endl" where every block | | .loc3 db ? | | overlaps the others in stack | | .loc4 db ? | | memory. | +--endl----------+ | | | +--endp--------------------+ |
|||
![]() |
|
decard 07 Aug 2004, 17:26
JohnFound wrote: Hi, all. IMO, from user point of view, it would be better to have two proc macroses. It simply would be more readable, when I will see "proc" or "cproc" I will know what calling convensions it uses. Using two returns, I would have to scroll through its code to find what kind of proc it is. And what if I write one proc with two different returns? |
|||
![]() |
|
JohnFound 07 Aug 2004, 17:27
pelaillo wrote: I agree, but I would prefer your style "4" Yes, I like it too. But there is one "little" problem: How to make "stdcall" macros for procedures with mixed size arguments... Also, I am afraid at the end we will finish with thousends of unnecessary "dd ?". |
|||
![]() |
|
JohnFound 07 Aug 2004, 17:38
decard:
What about: Code: cproc equ proc |
|||
![]() |
|
decard 07 Aug 2004, 17:43
JohnFound wrote: Also, I found the method to track whether the arguments are dotted or not, so now it is not a problem to keep arguments in the "proc" statement. why not to make user write arguments' names with dots? I think that this tracking would be only unnecesary load of preprocessor. regards |
|||
![]() |
|
S.T.A.S. 08 Aug 2004, 02:28
decard wrote: IMO, from user point of view, it would be better to have two proc macroses. It simply would be more readable, when I will see "proc" or "cproc" I will know what calling convensions it uses. Using two returns, I would have to scroll through its code to find what kind of proc it is. What I mean is something like this: Code: ; stdcall proc foo arg,arg2,arg3 ........... ; cdecl proc bar arg,arg2, ... ; <- notice name of the last argument .......... Quote: And what if I write one proc with two different returns? |
|||
![]() |
|
decard 08 Aug 2004, 09:04
S.T.A.S. wrote: What I mean is something like this: right, but it is still a confusing. proc's calling convension should be visible at first sight IMHO. Quote:
I just meant a hipotetical situation like this: Code: proc foo ...some code... stdcall_ret ...some other code... c_ret endp of course it doesn't have any sense, but solution with different returns would allow this. |
|||
![]() |
|
JohnFound 08 Aug 2004, 10:48
decard wrote: of course it doesn't have any sense, but solution with different returns would allow this. Well, actually I can imagine (pretty hypothetic) examples where this can be usefull... |
|||
![]() |
|
decard 08 Aug 2004, 11:01
but in this (rather not usual) case you could code it manually, readability is more important IMO.
|
|||
![]() |
|
aaro 08 Aug 2004, 11:15
Wouldn't it be nicer if we had just one return whitch will clean the stack frame if used inside stdcall proc and won't if used inside cdecl proc?
|
|||
![]() |
|
S.T.A.S. 08 Aug 2004, 11:34
... And this is really possible. Just give proper name to the last argument
|
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.