DisasmTestA.asm revision c6febce9aa7fc74b1001531a0e2edc2e224f2a89
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington;
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; VBox disassembler:
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; Assembler test routines
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington;
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; Copyright (C) 2006-2007 Sun Microsystems, Inc.
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington;
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; This file is part of VirtualBox Open Source Edition (OSE), as
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; available from http://www.virtualbox.org. This file is free software;
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; you can redistribute it and/or modify it under the terms of the GNU
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; General Public License (GPL) as published by the Free Software
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; Foundation, in version 2 as it comes in the "COPYING" file of the
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington;
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; Clara, CA 95054 USA or visit http://www.sun.com if you need
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; additional information or have any questions.
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington;
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington;*******************************************************************************
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington;* Header Files *
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington;*******************************************************************************
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington%include "VBox/nasm.mac"
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington%include "VBox/vm.mac"
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington%include "VBox/err.mac"
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington%include "VBox/stam.mac"
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington%include "VBox/x86.mac"
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington
685810e390056c123842842f5104daa3179cf2c9Phill CunningtonBITS 32
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington
685810e390056c123842842f5104daa3179cf2c9Phill CunningtonBEGINCODE
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington
685810e390056c123842842f5104daa3179cf2c9Phill Cunningtonalign 16
685810e390056c123842842f5104daa3179cf2c9Phill CunningtonBEGINPROC TestProc
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington mov word [edi], 0123ah
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington movzx eax,byte [edx]
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington movzx eax,word [edx]
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; mov dword es:[ebx + 1234h], 0789h
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; mov word fs:[ebx + ecx], 0654h
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; mov byte [esi + eax*4], 0654h
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; mov bl, byte ds:[ebp + 1234h]
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; mov al, cs:[1234h + ecx*8]
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; mov al, cs:[1234h]
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; mov ax, cs:[1234h]
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington; mov eax, cs:[1234h]
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington lock cmpxchg [ecx], eax
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington lock cmpxchg [ecx], ax
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington lock cmpxchg [ecx], dl
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington movzx ESI,word [EAX]
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington in al, dx
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington in ax, dx
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington in eax, dx
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington mov ebx, [ecx + eax*4 + 17]
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington mov ebx, [ebp + eax*4 + 4]
685810e390056c123842842f5104daa3179cf2c9Phill Cunnington mov ebx, [ebp + eax*4]
int 80h
in al, 60h
in ax, dx
out 64h, eax
movss xmm0, xmm1
movsd xmm6, xmm1
pause
ENDPROC TestProc
%ifndef RT_OS_OS2
BITS 64
align 16
BEGINPROC TestProc64
;incorrectly assembled by yasm; REX.W should not be added!
;test rax, dword 0cc90cc90h
and [r15], rax
movzx rcx, sil
and sil, 3
movzx ecx, ah
and ah, 3
sub rcx, 1234h
mov rax, qword [0cc90cc90h]
mov rax, qword [00c90cc90h]
mov rax, dword 0cc90cc90h
mov rax, qword 0ffffcc90cc90h
movzx rax,byte [edx]
movzx rax,word [edx]
movzx rax,byte [rdx]
lock cmpxchg [rcx], rax
lock cmpxchg [rcx], ax
lock cmpxchg [r15], dl
movzx RSI, word [R8]
in al, dx
in ax, dx
in eax, dx
mov rbx, [rcx + rax*4 + 17]
mov rbx, [rbp + rax*4 + 4]
mov rbx, [rbp + rax*4]
mov rbx, [ebp + eax*4]
int 80h
in al, 60h
in ax, dx
out 64h, eax
movss xmm0, xmm14
movsd xmm6, xmm1
ret
ENDPROC TestProc64
%endif