News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

PROC syntax: food for thought?

Started by DC, December 12, 2005, 12:51:42 AM

Previous topic - Next topic

DC

being a working grampa, learning this stuff is here a little, there a little, and a bit confusing at times, loads of fun tho...
I've noticed a thing or two over the years...
sometimes following example code or trying to see how things are done, it's hard to tell the difference between APIs and PROCs... they look the same...
I can't tell you the time I could have saved digging through the msds and what not had I realized right off the bat that what I was looking for was a PROC right in front of me...
a prefix would sure make it easier to know the difference between API stuff and PROC stuff...
eg... xLookingForSomething or xGetData...
humbly submited,
DC
this isn't daja vu, I'm just learning it for the 37th time
http://www.bmath.net

OS

It's why I code my program labels with a underscore leader .

PUSH ADDR MySTR
CALL _StrLen

Type of thing.

DC

I like it...
I know calling for a standard is for the elite tho...
My vote is it makes sense
DC
this isn't daja vu, I'm just learning it for the 37th time
http://www.bmath.net

BogdanOntanu

That is why in my own OS (aka SolarOS) all API names start with API_xxxxx_xxxx for example:
API_Window_Create()... For the same purpose all OS internal stuff starts (or will start) with OS_xxxx_xxx
and direct hardware stuff starts with ATA_xxx_xxx, IRQ_xxx_xxx, USB_xxx_xxx, NET_xxx_xxx  and so on...


It is more to type in -- yes I know -- but I am not afraid to type in some extra characters when it is about making code easyer to understand and follow up after a few months ;)

With this you get the additional benefit on things auto-aranging themselfes in RADASM IDE propreties/ procedures list window

For the same reson i like TASM proc syntax better:
PROC My_Proc_Name
  USES ebx,esi,edi
  ARG a_wnd_handle:dword, a_msg_code:dword
  LOCAL l_x_crt:dword, l_delta_crt:dword

....

ENDP

However MASM's syntax has the advantage of keeping the parameters on the same line as the procedure when you colapse some code in the IDE ;)

Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro

DC

nice GUI for the new OS,
I was looking at your page (BogdanOntanu) and saw that you were mainly a tasm guy, would masm32 stuff work as well? or would that require a whole new build?
this stuff's a bit over my head but I've been really wishing there was a totally asm based OS and would quickly mov from winDohs.
this isn't daja vu, I'm just learning it for the 37th time
http://www.bmath.net