WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

Debugging 16-bit code with debug.exe and grdb.exe, with .model type other than TINY, the debug.exe and grdb.exe seem to be totally confused, they execute different code.

guyenWinasm
Quote Post


Active Member
***

Group: Members
Posts: 47
Member No.: 1386
Joined: 22-July 05


with .model type other than TINY, the debug.exe or grdb.exe is totally seem to be confused, they re executing the different codes from the one written in project file? Does anyone know about it? How do I solve it? Thanks!
PMEmail Poster
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2301
Member No.: 160
Joined: 22-June 04


i just had compiled this code with model "small":
CODE
code segment para 'code'
assume cs:code, ds:data, ss:_stack

start: mov ax,data
mov ds,ax
mov ax,_stack
mov ss,ax
lea sp,tos
mov ah,9
lea dx,howdy
int 21h
mov ah,4ch
int 21h
code ends

end start
and opened exe in debug.exe - see picture below.
looks similar.
note:
1."lea sp" --> "mov sp" - optimized replacing by compiler
2. "t" (trace) - executes current instruction, then shows next one
3. after int you do not see "hello" - needs carrige return to not be overwritten on the screen
4. you do not see "mov sp" instruction - cpu does not let interrupts after "mov ss" to keep stack loading correct. next instruction - usually "mov sp" - executing immediatelly, so, debugger works same.

if it is not enough - attach your source and exe where you have problem (preferable as full winasm studio project)

Attached Image
Attached Image
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google