.386
.MODEL FLAT
ExitProcess PROTO NEAR32 stdcall, dwExitCode:DWORD
INCLUDE io.h
cr EQU 0dh
Lf EQU 0ah
.STACK 4096
.DATA
p1 byte cr,lf, "Enter number 1 for function 1: ",0
p2 byte cr,lf, "Enter number 2 for function 2: ",0
p3 byte cr,lf, "Enter number 0 to exit: ",0
voroodi byte 10 dup (?)
p4 byte cr,lf, "function1: ",0
p5 byte cr,lf, "function2: ",0
.CODE
_start:
f:
output p1
output p2
output p3
input voroodi,10
atod voroodi
cmp eax,01h
je func1
cmp eax,02h
je func2
cmp eax,00h
je exit
endl:
jmp f
exit:
INVOKE ExitProcess, 0
func1:
output p4
jmp endl
func2:
output p5
jmp endl
PUBLIC _start
END