The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: DC on December 12, 2005, 12:51:42 AM

Title: PROC syntax: food for thought?
Post by: DC on December 12, 2005, 12:51:42 AM
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
Title: Re: PROC syntax: food for thought?
Post by: OS on December 12, 2005, 03:33:40 AM
It's why I code my program labels with a underscore leader .

PUSH ADDR MySTR
CALL _StrLen

Type of thing.
Title: Re: PROC syntax: food for thought?
Post by: DC on December 12, 2005, 04:28:11 AM
I like it...
I know calling for a standard is for the elite tho...
My vote is it makes sense
DC
Title: Re: PROC syntax: food for thought?
Post by: BogdanOntanu on December 12, 2005, 01:53:45 PM
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 ;)

Title: Re: PROC syntax: food for thought?
Post by: DC on December 13, 2005, 02:35:12 AM
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.