home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_11 / 9.ddi / CHAPXMPL.ZIP / MAIN.ASM < prev    next >
Encoding:
Assembly Source File  |  1991-02-13  |  921 b   |  35 lines

  1. ; Turbo Assembler    Copyright (c) 1988, 1991 By Borland International, Inc.
  2.  
  3. ; MAIN.ASM
  4.  
  5. ; Example of linking multiple assembly code modules. This needs SUB1.ASM
  6. ; to provide the ConcatenateStrings function.
  7. ;
  8.  
  9.      DOSSEG
  10.      .MODEL    SMALL
  11.      .STACK    200H
  12.      .DATA
  13. String1        DB   'Hello, ',0
  14. String2        DB   'world',0dh,0ah,'$',0
  15.      GLOBAL    FinalString:BYTE:50
  16. FinalString    DB   50 DUP (?)
  17.      .CODE
  18.      EXTRN     ConcatenateStrings:PROC
  19. ProgramStart:
  20.      mov  ax,@data
  21.      mov  ds,ax
  22.      mov  ax,OFFSET String1
  23.      mov  bx,OFFSET String2
  24.      call ConcatenateStrings       ;combine the two strings
  25.                                    ; into a single string
  26.      mov  ah,9
  27.      mov  dx,OFFSET FinalString
  28.      int  21h                      ;print the resulting string
  29.      mov  ah,4ch
  30.      int  21h                      ;and done
  31.      END  ProgramStart
  32.  
  33.  
  34.  
  35.