



































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




































Advantages: Access to hardware Time-efficiency Space-efficiency Problems: Low productivity High maintenance cost Lack of portability
Both must use the same naming convention (rules regarding the naming of variables and procedures) Both must use the same memory model, with compatible segment names Both must use the same calling convention
An external identifier is a name that has been placed in a module’s object file in such a way that the linker can make the name available to other program modules.
The linker resolves references to external identifiers, but can only do so if the same naming convention is used in all program modules.
Left-to-right Most languages including Basic, Fortran, Pascal use this method These languages are called left-pusher languages Right-to-left C uses this method These languages are called right-pusher languages
If needed, should be preserved by the calling function
Similar mechanism is used to pass parameters and to return values
Can be placed at the beginning of a single statement
Or, It can mark the beginning of a block of assembly language statements
Syntax:
__asm statement __asm { statement- statement- ... statement-n }
mov esi,buf ; initialize index register mov esi,buf // initialize index register mov esi,buf / initialize index register /
All of the following comment styles are acceptable, but the latter two are preferred:
Use data definition directives such as DB, DW, or BYTE
Use assembler operators other than PTR
Use STRUCT, RECORD, WIDTH, and MASK
Use the OFFSET operator (but LEA is ok)
Use macro directives such as MACRO, REPT, IRC, IRP
Reference segments by name.
(You can, however, use segment register names as operands.)