Monthly filing: December 2013

Peter Chen's Way

As time goes by, we will keep recalling the past, which is probably a journey of forgetting. By chance, many sentimental stories have sprung up in Peter Chen's "A Road", and we will eventually find that all the techniques are not worth mentioning. Those faint melodies and ethereal harmonies make you look back briefly as if you were standing at the crossroads where the seasons change and continue on the road. I didn't find the audio of this song on the Internet, so I had to switch to an MP3 player and put it on my blog, listen to it occasionally, and stay in some clips of time.

One way
Lyricist, composer and singer: Peter Chen
No trace of fallen leaves along the road
Walk past me Walk past you
I want to ask your footprints
The mountain is silent, the water is silent
Walk through spring and four seasons
Walk through spring, walk through myself

Quietly I went from the past
Come here
I carry the wind and rain on my shoulders
Want to know my purpose
Walk through spring and four seasons
Through the spring, through myself

Read on

Stack mechanism of cpu

The 8086 CPU provides stack in and stack out operations, push [stack in] pop [stack out], push ax, that is, the data of ax is sent to the top of the stack, pop ax, and the data is taken from the top of the stack and sent to ax. For these two operations, stack in and stack out are performed in words. There are two registers in the 8086 CPU, segment register SS and register SP. At any time, SS: SP points to the top element of the stack.

The execution of push ax is divided into the following two steps

1. SP=SP-2 SS: SP points to the current new stack top

2. Send the contents in ax to the memory unit pointed to by SS: SP

Pop ax execution process

1. Send the content pointed by SS: SP to ax

2. SP=SP+2, pointing to the new stack top

[Question] How to use 10000H-1000F as stack space

mov ax,1000H

mov ss,ax

mov sp,0010

The key point here is that if you use a section of space as the stack space, you can only set the initial position of the top of the stack. However, when you use a section of space as the stack space, you need to pay attention to the specific position when programming. Read on