News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Prototype - a little slim on details

Started by Magnum, August 17, 2013, 08:42:03 AM

Previous topic - Next topic

Magnum

I don't see the tag for code that is usually shown.

Hutch's description is more detailed, but I am the person who needs to see examples.

Microsoft has none.

Proto

language type - there are tons of language, so what are the available ones and when would you use them ?

I recall that C can use inline assembly.

I see that you separate parameters with commas.

PROTO

Syntax: label PROTO [distance] [langtype] [, [parameter]:tag]...

Description

Defines a prototype for a subsequent procedure. Informs the assembler about how many and what kind of arguments should be expected in a procedure definition. This allows the assembler to perform type checking on arguments.

If you define a prototype for all stack-based procedures defined with the PROC directive, you can place procedure prototypes in a separate include file. This is recommended when using procedures in a library file

This is one example of something I need a prototype for.

Custom proc
       PUSH EBP
       MOV EBP,ESP
       PUSH ECX
       PUSH EAX
       PUSH ECX
       MOV EAX,DWORD PTR FS:[18]
       MOV EAX,DWORD PTR DS:[EAX+30]
       MOV ECX,DWORD PTR DS:[EAX]
       MOV DWORD PTR SS:[EBP-4],ECX
       POP ECX
       POP EAX
       MOV EAX,DWORD PTR SS:[EBP-4]
       SHR EAX,10
       AND EAX,1
       MOV ESP,EBP
       POP EBP
       RET
   Custom endp
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

dedndave

it has no parameters, so.....
Custom PROTO