debuggingdosboxemu8086

Assembly - visualise registers, stack etc


Hej, I was writing my programs on emu8086, and I used it for debugging. However now I need to use floating points, FPU and emu8086 doesn't support them. I need an easy way to see what is in certain place of memory. For example visualise: "dzielna", "dzielnik", the content of register such as ax, bx,.. ; and what is in st(0), st(1) etc. Shall you recommend me a good program to visualise it?

dane1     segment


dzielna     dd 1.3  
dzielnik    dd 6.7
dane1    ends


assume cs:code1, ss:stos1, ds:dane1

stos1    segment stack
dw    400 dup(?)
top1    dw    ?
stos1    ends


code1    segment
.386                        
.387

start1:    mov    ax,seg top1
mov    ss,ax
mov    sp,offset top1

mov ax,dane1
mov ds,ax

finit 
fldpi
fld dword ptr [dzielna]
fld dword ptr [dzielnik]
fsub st(0),st(1)
fstp dword ptr [dzielna]



finish:
    mov ah,4ch
    int 21h


code1    ends




end start1

Solution

  • The program to visualise it is called a debugger. Since you are running in DosBox you need one that can be run there.

    If you can get your hands on Turbo Assembler - it has a debugger TD.exe

    Turbo Debugger in action

    OpenWatcom also has a debugger that can be run in DosBox

    OpenWatcom debugger

    and both allows you to show the FPU registers.