如何在FASM汇编语言的子例程中应用交换?

时间:2018-10-27 07:48:34

标签: assembly x86 swap subroutine fasm

format PE console
entry start

include 'win32a.inc'

section '.text' code executable

start:
    push NumA
    push NumB
    call swap
    add  esp, 8

    push [NumB]
    push [NumA]
    push msg
    call [printf]
    add  esp, 12
    push 0
    call [ExitProcess]

swap:?????


section '.data' data writable
    NumA dd 1234
    NumB dd 5678
    msg  db 'The two numbers are %d and %d', 10, 0

section '.idata' data readable import
    library kernel32, 'kernel32.dll', msvcrt, 'msvcrt.dll'
    import kernel32, ExitProcess, 'ExitProcess'
    import msvcrt, printf, 'printf'

我应该在SWAP部分中键入什么?????

0 个答案:

没有答案