MASM provides a really handy feature that greatly simplifies using C-style function calls. When a function is defined as 'C' with arguments, it *automatically* uses BP to access the data -- i.e., it saves BP then uses BP to access the elements by name. Further, when the 'USES' option is given, each register is PUSHed and POPed to/from the stack. Lastly, the name of the function is internally prepended with an underscore. In the 'DrayPoly' routine (below), for example, MASM generates the following code to allow us to access 'Color' as a name rather than as [BP+18]. ----- DrawPoly proc far C PRIVATE uses BX CX DX SI DI DS ES, X1:word, Y1:word, Y3:word, X2:word, Y2:word, Y4:word, Color:byte ; PUSH BP ; Implicitly performed by MASM 'C' delaration ; MOV BP,SP ; .. ; PUSH BX ; PUSH CX ; .. ; PUSH DS ; PUSH ES ; ; MASM Replaces any reference to 'X1' as 'WORD PTR [BP+6]' ; MASM Replace any reference to 'X2' as 'WORD PTR [BP+8]' ; .. ; MASM Replace any reference to 'Color' as 'BYTE PTR [BP+18]' MOV AL,Color ; Legal operation == MOV AL,[BP+18] MOV SI,X1 ; Legal operation == MOV SI,[BP+6] ; POP ES ; POP DS ; .. ; Implicitly performed by MASM 'C' declaration ; POP CX ; POP BX ; ... ; RET ; DrawPoly endp ----- Prof. John Lockwood