; Meaningless program that makes a few hops and then exits .386 .MODEL FLAT ExitProcess PROTO NEAR32 stdcall, dwExitCode:DWORD INCLUDE IO.H ; header file for input/output .DATA jump_table dword label_one, label_two, label_three prompt1 BYTE "one", 0 prompt2 BYTE "two", 0 prompt3 BYTE "three", 0 .CODE _start: mov ebx, sizeof( dword ) * 2 jmp jump_table[ ebx ] ; table offset must be index or base register ; label_one: output prompt1 jmp quit_program ; unconditional relative jump ; label_two: output prompt2 jmp quit_program ; unconditional relative jump ; label_three: output prompt3 jmp quit_program ; unconditional relative jump ; quit_program: INVOKE ExitProcess, 0 ; exit with return code 0 PUBLIC _start ; make entry point public END ; end of source code