negut 发表于 2022-5-2 07:21:32

[Question]Topic : Stack pointer SP

Hi.I am fully clear how VP must be used.
How SP is to be used ?
Can provide someone an example ? How can check the stack boundary ?

沃特玛贞帥斯基 发表于 2022-5-2 13:25:35

SP is a description pointer, which is used for real-time serial port commands to change the properties of the display control. Occupies the same address as the VP. For example, if the SP address is set to 5000 in the text display, then the command to make the font red is 5A A5 05 82 5003 F800.

negut 发表于 2022-5-2 16:31:09

本帖最后由 negut 于 2022-5-2 16:41 编辑

沃特玛贞帥斯基 发表于 2022-5-2 13:25
SP is a description pointer, which is used for real-time serial port commands to change the properti ...
Hi i found the docs.Yes is the same with VP , but at different addresses.I was expecting to find some push /pop routine in template for this.The use of SP is with read and write and need to keep trace of boundaries for not overlapping.A second problem different , for not have another post is for baud rate in
SFR definition in UART there are used different names BODE_DIV_H & BODE_DIV_L   and SRELOH & SRELOL.What mean SRE and BODE(seems like stability characteristic name) and also why are different names ?

沃特玛贞帥斯基 发表于 2022-5-2 20:51:20

I'm so sorry I didn't understand what you meant. What exactly do you want to achieve with SP? The common function of SP is to change the properties of display variables.

negut 发表于 2022-5-2 22:40:51

本帖最后由 negut 于 2022-5-3 00:10 编辑

沃特玛贞帥斯基 发表于 2022-5-2 20:51
I'm so sorry I didn't understand what you meant. What exactly do you want to achieve with SP? The co ...
That is exactly what i want to do.
Let say my display has a red square.
So i need some memory space for pushing color and coordinates.(in 22.bin)
After pushing color and coordinates, i writein 14.bin the new color green and (x,y) values for square and i leave it on screen for 30 minutes.After that i need to make the red square as it was initialyby poping the pushed values.
That is the problem.
Meanwhile i find the documentation about how that is to do.Ok
In my post there is a second question about registers name signifiance.

Bensenl 发表于 2022-5-5 11:40:25

negut 发表于 2022-5-2 22:40
That is exactly what i want to do.
Let say my display has a red square.
So i need some memory space ...
Hello, you can refer to the code below for baud rate definition





negut 发表于 2022-5-5 18:23:20

Bensenl 发表于 2022-5-5 11:40
Hello, you can refer to the code below for baud rate definition

Thanks , is not what is asked for.
The questionpoint to stack manipulation, mean SP .Usually , even if it is high level language , formally stack = LIFO queue(Last Input First Output) is a temporary area for saving variables value and getting this back.The usual instruction for achiving this are push() and pop().But as a handy way you could treat stack SP pointer as VP , which is not recommandable because (VP , read, write) is a handling proper way for VP and (SP, push,pop)is the proper way of handling the stack.
页: [1]
查看完整版本: [Question]Topic : Stack pointer SP