next up previous
Next:Rex86 Sample - Your Name Up: Overview Previous: Rex86 Sample - String to Int With Negatives


Rex86 Sample - Swap Procedure

JMP     main

;swapProc
PUSH    CX
MOV     CX,AX
MOV     AX,BX
MOV     BX,CX
POP     CX
RET

;main
MOV     AX,735
MOV     BX,1402
CALL    swapProc
OUTPUT
MOV     AX,BX
OUTPUT
JMP     sced

;main
CALL    outputABProc
CALL    swapProc
CALL    outputABProc
JMP     sced

;outputABProc
PUSH    AX
OUTPUT
MOV     AX,BX
OUTPUT
POP     AX
RET

;outputABProc
PUSH    AX
PUSH    CX
MOV     CX,AX
POINT   AX,"AX="
OUTPUT  TEXT
MOV     AX,CX
OUTPUT
POINT   AX,"BX="
OUTPUT  TEXT
MOV     AX,BX
OUTPUT
POP     CX
POP     AX
RET


;----------------------
;AX=
;735
;BX=
;1402
;AX=
;1402
;BX=
;735


next up previous
Next:Rex86 Sample - Your Name Up: Overview Previous: Rex86 Sample - String to Int With Negatives

by dlong@progmatism.com. Plz don't copy kthx.