;               SIMPSEG.ASM
; Using simplified segment directives
; (Not available under MASM 2.00)
; But be careful with DEBUG--first 4 bytes
; of data segment will contain extra stuff

TITLE   Simplified Segment Directives
        PAGE    60,132

        .MODEL  SMALL     ;1 code segment, 1 data segment

        .STACK  64        ;Reserve 64 words of stack space

        .DATA             ;Following will be in data segment
num1    db      4
num2    db      7
sum     db      ?

        .CODE             ;Following will be in code segment
main    proc    far       ;Note that no ASSUME is needed
        mov     ax,_DATA  ;Name of data segment
        mov     ds,ax
        mov     al,num1   ;Program really begins here
        add     al,num2
        mov     sum,al
        mov     ax,4c00h  ;Return to DOS using int 21h...
        int     21h       ;==>don't need other bookkeeping                                                                                           ;instructions
main    endp
        end     main

;The following is a DEBUG data dump after running the program:
;3B82:0000  00 4C CD 21 04 07 0B 5A-3C A6 1C 74 18 8B 36 BC
;                        |
;                        |
;Note: data begins here--