Home > other >  A confusing point of assembly
A confusing point of assembly

Time:12-07

I am beginner assembly still hope everyone a great god answer!
I in to the program stack space, found that I don't care the data into 30 h, or 20 h, when you use the debug for memory will always be more out of a line, which makes me very fan, because according to the thinking of the book, my program begins offset 0, the first line is the data, the following line is to obtain the stack space, normally line is instructions below again, but without reason of empty out a line, why? It is best to go into more detail about, thank you! I don't have a lot of points, please don't abandon

The following is a code and images:

Assume cs: code

Code segment

Dw 0123 h, 0456 h, 0789 h, 0 abch, 0 defh, 0 fedh, 0 cbah, 0987 h
Dw 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

Start: mov ax, cs
Mov ss, ax
Mov sp, 20 h

Mov bx, 0

Cx, mov 8
S: push cs: [bx]
The add bx, 2
Loop s

Mov bx, 0

Cx, mov 8
S0: pop cs: [bx]
The add bx, 2
Loop s0

Mov ax, 4 c00h
Int 21 h

Code ends

The end start
  • Related