Home > other >  What is the difference between assembly language code and codes segment?
What is the difference between assembly language code and codes segment?

Time:04-02

Abnormal memory read and write the following code executes:
386
.The model flat, stdcall

Codes segment
Start: mov eax, 0123 h
Codes ends

The end start

I put the codes segment instead. The code can be executed correctly:
386
.The model flat, stdcall

The code
_start: mov eax, 0123 h

End _start

What is this why?

CodePudding user response:

, in addition to the name, no essential difference between abnormal, speaking, reading and writing as for execution, the second I'm afraid it is the same, because they are not the end of the process of operation, is usually called ExitProcess (API) system,

CodePudding user response:

reference 1/f, zara's reply:
in addition to the name, no essential difference between, as for the abnormal, speaking, reading and writing is executed, the second I'm afraid it is the same, because they are not the end of the procedure of operation, is usually called ExitProcess (API) system,


This is the first and second debug runtime screenshots,

CodePudding user response:

The first:


The second:

CodePudding user response:

The difference between two figure, is the problem of how to populate the rest of the interval, the first, is 00 fill, this is the default data segment; The second is 0 CCH (int3), is this code; So the difference between the main and assembly program links about it, I am masm32v8/v14 and vc2008 link. Exe didn't fill in the gap to the code int3 even to code the public 'code', don't know whether have what choice didn't mind,

CodePudding user response:

Masm32 v14? With this version

CodePudding user response:

I recently from the vs2019, there is a post also talked about,
  • Related