assume cs:code, ds:data, ss:stack
data segment
db 128 dup(0)
data ends
stack segment
db 128 dup(0)
stack ends
code segment
start: mov ax, data
mov ds, ax
mov ax, stack
mov ss,ax
mov sp, 128
; call很类似c语言的函数
; ret 很类似于 c语言的return函数
call s1
call s2
call s3
mov ax, 4C00H
int 21H
s1: mov ax, 1000H
ret
s2: mov ax, 1001H
ret
s3: mov ax, 1002H
ret
code ends
end start