;;=======================================================================75
;; File: EPILOG_E.5.NSM  By: s_dubrovich@yahoo.com
;; Last: 21-May-11 11:16:52 PM
;; Prev: 19-Dec-10 01:29:04 PM,06-May-11 02:14:06 PM,06-May-11 11:04:48 PM
;; Init: 10-Jan-10 10:11:21 PM
;; Vers: 4r1
;; Note: .EXE Epilog. Pair to PROLOG_E.2.NSM, rename to EPILOG.NSM
;;  -codeview segment ordering version: DS=ES,CS,SS
;;=======================================================================75
;; - v.2r2, edits, renamed from EPILOG_T to EPILOG_E, for .EXE & far
;;  call to cp/m api at 0F01Dh:0FEF0h.
;; 06-May-11 02:14:06 PM - v.3r0, pcDos .exe version
;; 06-May-11 11:04:48 PM - v.4r0, DS=SS for small-c coding.
;; 21-May-11 11:16:52 PM - v.4r1, assert stack in .dseg
;;=======================================================================75
;;=======================================================================75
;; Note: for small-c DS=SS
;;=======================================================================75
;; -== S T A C K ==-
;;=======================================================================75
;; Needed here to set Section Order and Placement.

;-;  [SECTION .sseg]  ;; vstart=0 align=16]
  [SECTION .dseg]	;; assert as in data.
ALIGN 16
stackbase:
  TIMES 800h dw 0CCCCh
stacktop:
 ;- Len_ss EQU $-$$

;;-----------------------------------------------------------------------75
;; S E C T I O N S   W R A P - U P
;;-----------------------------------------------------------------------75
;;=======================================================================75
;;    A D U M M Y   S E C T I O N
;;=======================================================================75
;; This is an anchor for nobits sections to allow vstart equivalent to
;; zero.  Otherwise the start of the nobits is at the end of a physical
;; section, some positive value.  By making .dummy of zero length and the
;; last declared physical section, then nasm figures the vstart of the
;; first nobits section as zero.  Check the .MAP file to make sure.

  [SECTION .adummy vstart=0 align=16]
    align 16, db 90h
;;=======================================================================75
;; -= L A S T   C O D E =-
;;=======================================================================75
  [SECTION .cseg]
;; -= mark end of last .cseg with.. =-
 align 16, db 0
 Len_cs EQU ($-$$)

;;=======================================================================75
;; -= L A S T   D A T A =-
;;=======================================================================75
;; -= mark the end of the last .dseg with.. =-
  [SECTION .dseg]
 align 16, db 0
 Len_ds EQU ($-$$)
;;-----------------------------------------------------------------------75
;- Len_Real EQU (Len_cs+Len_ds+Len_ss)
Len_Real EQU (Len_cs+Len_ds)
;;=======================================================================75
;;    N O B I T S   S E C T I O N S
;;=======================================================================75
  [SECTION .x1seg align=16 nobits follows=.adummy]
;-; DTA: resw (16 * 1024)  ;; 32k buffer
    align 16, resb 1
Len_x1 EQU $-$$

  [SECTION .x2seg align=16 nobits follows=.x1seg]
    align 16, resb 1
;-; DTA2: resw (16*1024)  ;; another 32k buffer
Len_x2   EQU $-$$
Len_Virt EQU Len_x1 + Len_x2

;;=======================================================================75
;; - =   E O   E P I L O G _ E   = -
;;=======================================================================75

8:56 PM 6/20/2011