home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / PCACHSRC.ZIP / SLAVEXE.ASM < prev    next >
Assembly Source File  |  1990-07-12  |  2KB  |  39 lines

  1. ;SLAVE.ASM                                      B.Kauler
  2. ;for use with MASTREXE.ASM, to demonstrate linking.
  3. ;LINK MASTREXE.OBJ+ SLAVE.OBJ+ SERF.OBJ --> MASTREXE.EXE
  4. ;SLAVE contains a procedure used by MASTER.
  5. ;A few points to note --
  6. ;None of the usual preliminary directives, nor a stack segment,
  7. ;as this module is only data & code that will be combined with
  8. ;the main program.
  9. ;Note that the data segment is labeled "data" and the code segment
  10. ;is labeled "code" -- same as in the master module.  This ensures that
  11. ;LINK will combine them into one code segment and one data segment.
  12. ;'data' and 'code' mean something different -- they just clarify to the
  13. ;LINKer which segments are code or data.
  14. ;Note that Microsoft & Intel have recently tended to favour labeling
  15. ;data segments with "_DATA" and code segments with "_TEXT",
  16. ;so that there is some standardisation of naming for linkage purposes.
  17. ;..........................................................
  18.         public  slave_routine
  19. ;.........................................................
  20. data    segment byte    public  'data'
  21.         assume  ds:data   ;only used by Assembler to assemble data
  22.                           ;references correctly. Doesn't actually
  23.                           ;change DS.
  24. local_mess db  "this data is in SLAVE module",0Ah,0Dh,"$"
  25. data    ends
  26. ;.........................................................
  27. code    segment byte    public  'code'
  28.         assume  cs:code
  29. ;.............................
  30. slave_routine   proc    near
  31.         mov     dx,offset local_mess
  32.         mov     ah,9
  33.         int     21h       ;display message.
  34.         ret
  35. slave_routine   endp
  36. ;.......................................................
  37. code    ends
  38.         end               ;no label needed here.
  39.