30 likes | 150 Views
Exe style program. skeleton. TITLE Exe style skeleton .486 STCK SEGMENT PARA STACK 'stack' use16 DB 64 DUP ('my_stack') ; reserve 256 bytes for stack STCK ENDS DATA1 SEGMENT PARA PUBLIC 'DATA' use16 ; data definitions DATA1 ENDS. COD1 SEGMENT PARA PUBLIC 'CODE' use16
E N D
Exe style program skeleton
TITLE Exe style skeleton .486 STCK SEGMENT PARA STACK 'stack' use16 DB 64 DUP ('my_stack') ; reserve 256 bytes for stack STCK ENDS DATA1 SEGMENT PARA PUBLIC 'DATA' use16 ; data definitions DATA1 ENDS
COD1 SEGMENT PARA PUBLIC 'CODE' use16 MAIN PROC FAR ; main proc MUST be FAR ASSUME CS:COD1,DS:DATA1,SS:STCK PUSH DS ;save DS on stack for OS return XOR AX,AX ; PUSH AX ;put 0 on stack for OS return MOV AX,DATA1 MOV DS,AX ;load data Segment register RET ; return to OS MAIN ENDP COD1 ENDS END MAIN