home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / section5 / test.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  757 b   |  27 lines

  1. memS    =       0                ;Small memory model
  2. ?PLM    =       0                ;C calling conventions
  3. ?WIN    =       0                ;Disable Windows support
  4.  
  5. include cmacros.inc
  6. include cmacrosx.inc
  7.  
  8. sBegin  CODE                     ;Start of code segment
  9. assumes CS,CODE                  ;Required by MASM
  10.  
  11.         ;Microsoft C function syntax:
  12.         ;
  13.         ;     int addnums(firstnum, secondnum)
  14.         ;         int firstnum, secondnum;
  15.         ;
  16.         ;Returns firstnum + secondnum
  17.  
  18. cProc   addnums,PUBLIC           ;Start of addnums functions
  19. parmW   firstnum                 ;Declare parameters
  20. parmW   secondnum
  21. cBegin
  22.         mov     ax,firstnum
  23.         add     ax,secondnum
  24. cEnd
  25. sEnd    CODE
  26.         end
  27.