Skip to content

Commit

Permalink
VMWare Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Chourdakis committed Jan 30, 2019
1 parent 53cd0f3 commit 3f38140
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 11 deletions.
6 changes: 3 additions & 3 deletions asmtest.vbox
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.15-windows">
<Machine uuid="{a436033c-67f8-4e9f-b0fe-0a7efbadb84d}" name="asmtest" OSType="Other_64" snapshotFolder="Snapshots" lastStateChange="2019-01-23T03:55:56Z">
<Machine uuid="{a436033c-67f8-4e9f-b0fe-0a7efbadb84d}" name="asmtest" OSType="Other_64" snapshotFolder="Snapshots" lastStateChange="2019-01-30T21:43:48Z">
<MediaRegistry>
<DVDImages>
<Image uuid="{e6514449-af13-4958-9628-33af9ee8fa81}" location="d.iso"/>
Expand All @@ -17,7 +17,7 @@
</MediaRegistry>
<ExtraData>
<ExtraDataItem name="GUI/LastCloseAction" value="PowerOff"/>
<ExtraDataItem name="GUI/LastNormalWindowPosition" value="0,23,640,522"/>
<ExtraDataItem name="GUI/LastNormalWindowPosition" value="450,261,720,442"/>
</ExtraData>
<Hardware>
<CPU count="3">
Expand Down Expand Up @@ -45,7 +45,7 @@
</Network>
<AudioAdapter driver="DirectSound" enabled="true" enabledIn="false"/>
<GuestProperties>
<GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="en_US" timestamp="1548215661025663900" flags=""/>
<GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="en_US" timestamp="1548884628564704400" flags=""/>
</GuestProperties>
</Hardware>
<StorageControllers>
Expand Down
2 changes: 1 addition & 1 deletion asmtest.vbox-prev
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.15-windows">
<Machine uuid="{a436033c-67f8-4e9f-b0fe-0a7efbadb84d}" name="asmtest" OSType="Other_64" snapshotFolder="Snapshots" lastStateChange="2019-01-23T03:54:20Z">
<Machine uuid="{a436033c-67f8-4e9f-b0fe-0a7efbadb84d}" name="asmtest" OSType="Other_64" snapshotFolder="Snapshots" lastStateChange="2019-01-30T21:43:48Z">
<MediaRegistry>
<DVDImages>
<Image uuid="{e6514449-af13-4958-9628-33af9ee8fa81}" location="d.iso"/>
Expand Down
8 changes: 4 additions & 4 deletions bx_enh_dbg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ isLittleEndian = TRUE
DefaultAsmLines = 512
DumpWSIndex = 0
DockOrder = 0x123
ListWidthPix[0] = 740
ListWidthPix[1] = 636
ListWidthPix[2] = 544
ListWidthPix[0] = 556
ListWidthPix[1] = 468
ListWidthPix[2] = 400
FontName = System
FontSize = -16
MainWindow = -8, -8, 1928, 1058
MainWindow = 208, 208, 1648, 975
2 changes: 1 addition & 1 deletion config.asm
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ RESIDENT_OWN_LM_STACK = 1


VDEBUG = 0
MDEBUG = 1
MDEBUG = 0

1 change: 1 addition & 0 deletions debuggee.asm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ start16:
mov dx,m1
int 0x21


mov ax,0x4C00
int 0x21

Expand Down
8 changes: 8 additions & 0 deletions vdebug.asm
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ start16:
mov dx,m1
int 0x21

mov eax,1
cpuid
bt ecx,5
jc VMX_Supported
mov ax,0x4C00
int 0x21
VMX_Supported:

RequireDMMI

; dism pos
Expand Down
Binary file modified vdebug.exe
Binary file not shown.
154 changes: 152 additions & 2 deletions vdisplay.asm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ disp4:
stosb
ret

mmhelp db 'Commands: ',0xd,0xa,' (?) - help',0xd,0xa,' (g) - go',0xd,0xa,' (r) - registers',0xd,0xa,' (t) - trace',0xd,0xa, "$"
mmhelp db 'Commands: ',0xd,0xa,' (? or h) - help',0xd,0xa,' (g) - go',0xd,0xa,' (r) - registers',0xd,0xa,' (t) - trace',0xd,0xa, "$"
mmj db 40,0
db 50 dup (0)
show dq 4096 dup (0)
Expand Down Expand Up @@ -163,7 +163,7 @@ ShowDism:

ret

ShowRegs:
ShowRegs64:

push64
linear r15,vregs,STACK64
Expand Down Expand Up @@ -317,6 +317,153 @@ ShowRegs:

ret


ShowRegs:

push64
linear r15,vregs,STACK64
linear rdi,show,CODE64
cld

;rax - rdx
mov eax,'EAX ';
stosd
mov rcx,5
mov al,' '
rep stosb
mov eax,'EBX ';
stosd
mov rcx,5
mov al,' '
rep stosb

mov eax,'ECX ';
stosd
mov rcx,5
mov al,' '
rep stosb

mov eax,'EDX ';
stosd
mov rcx,5
mov al,' '
rep stosb

mov eax,'ESI ';
stosd
mov rcx,5
mov al,' '
rep stosb

mov eax,'EDI ';
stosd
mov rcx,5
mov al,' '
rep stosb

mov eax,'EBP ';
stosd
mov rcx,5
mov al,' '
rep stosb

mov eax,'ESP ';
stosd
mov rcx,5
mov al,' '
rep stosb

mov ax,0x0D0A
stosw

mov rax,[r15 + 0x00]
call disp32
mov al,' '
stosb

mov rax,[r15 + 0x08]
call disp32
mov al,' '
stosb

mov rax,[r15 + 0x10]
call disp32
mov al,' '
stosb

mov rax,[r15 + 0x18]
call disp32
mov al,' '
stosb

mov rax,[r15 + 0x20]
call disp32
mov al,' '
stosb

mov rax,[r15 + 0x28]
call disp32
mov al,' '
stosb

mov rax,[r15 + 0x30]
call disp32
mov al,' '
stosb


vmr rax,0x681C ; Guest RSP
call disp32
mov al,' '
stosb



mov ax,0x0D0A
stosw


; RIP
mov rax,'CS:EIP: ';
stosq
vmr rax,0x802 ; Guest CS
call disp16
mov al,':'
stosb
vmr rax,0x681E ; Guest RIP
call disp32
mov al,' '
stosb

call guestlinear
call disp32
mov al,' '
stosb

mov al,' '
stosb

call ShowDism

mov ax,0x0D0A
stosw

mov al,'$'
stosb
mov dx,show
mov si,CODE64
shl esi,16
mov ebp,0x900
mov ax,0x421
int 0xF0

pop64

ret


ShowPrompt:
push64
linear rdi,show,CODE64
Expand Down Expand Up @@ -356,6 +503,9 @@ WaitForInput:
cmp byte [rdx + 2],'?'
jz .CmdHelp

cmp byte [rdx + 2],'h'
jz .CmdHelp

cmp byte [rdx + 2],'r'
jz .CmdRegs

Expand Down

0 comments on commit 3f38140

Please sign in to comment.