Skip to content

Commit

Permalink
Virtualized Debugger runs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Chourdakis committed Jan 25, 2019
1 parent 275183c commit 69d70de
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
Binary file modified a.img
Binary file not shown.
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 = 0x132
ListWidthPix[0] = 298
ListWidthPix[1] = 466
ListWidthPix[2] = 246
ListWidthPix[0] = 300
ListWidthPix[1] = 465
ListWidthPix[2] = 245
FontName = System
FontSize = -16
MainWindow = 130, 130, 1156, 855
MainWindow = 26, 0, 1052, 722
26 changes: 21 additions & 5 deletions vdebug.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ HEAP 0
include 'struct.asm'



; stack
segment STACK16
USE16

dw 128 dup(0)
stre:

; data
segment DATA16
USE16
Expand Down Expand Up @@ -38,20 +46,26 @@ USE16
back16:

; End
xchg bx,bx
cli
mov ax,STACK16
mov ss,ax
mov eax,stre
mov esp,eax
sti
mov ax,DATA16
mov ds,ax
mov es,ax
mov ax,0x00
mov ax,0x4C00
int 0x21


start16:

; End, not yet working
mov ax,0x4C00
int 0x21

mov ax,STACK16
mov ss,ax
mov eax,stre
mov esp,eax
mov ax,DATA16
mov ds,ax
mov es,ax
Expand All @@ -66,6 +80,7 @@ start16:
mov ax,0x4B01
int 0x21
jc endx
BackExecutable:
mov ax,DATA16
mov ds,ax
cmp [run],1
Expand All @@ -90,6 +105,7 @@ start16:
endx:

; End
mov ax,0x4C00
int 0x21
Expand Down
Binary file modified vdebug.exe
Binary file not shown.
4 changes: 3 additions & 1 deletion vdebug64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ USE64

start64:


; interrupts
lidt [eax]
linear rsp,ste,STACK64
sti

mov ax,0
int 0xF0

Expand All @@ -46,6 +47,7 @@ vmlaunch
hr:

; Back to real mode
cli
xor rcx,rcx
mov cx,CODE16
shl rcx,16
Expand Down

0 comments on commit 69d70de

Please sign in to comment.