News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Dont Thread The BOX!

Started by StatusQuo, December 07, 2011, 05:45:04 PM

Previous topic - Next topic

StatusQuo

Quote from: Gunner on December 14, 2011, 02:22:44 AM
Yes, I found that out too by running the code through a debugger so I make a number bigger... but you should handle that in code to catch a small number.

Yet CURPOS isnt supposed to push anything. The only purpose I have done in CURPOS is to just locate the cursor within the box.
Then God sad, "In the beginning....There was SCOPE!", Then I asked, "What is Scope?", and God said...."A Stack Frame, geeze I forgot to include you with common sense, BUT a prototype you are, too wierd to live, to rare to die...", and it was written....

Gunner

I meant to type FORMAT..  I was looking at the CURPOS proc on the other monitor when I was typing the reply
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

StatusQuo

Quote from: Gunner on December 14, 2011, 02:32:52 AM
I meant to type FORMAT..  I was looking at the CURPOS proc on the other monitor when I was typing the reply

Still though, FORMAT's purpose is to put the window title there. Apperently I am still doing it wrong compared to my previous endavour. I got the box to work in an earlier example. with the color, and border. Yet now I feel as if i am forced to go back to the drawing board.
Then God sad, "In the beginning....There was SCOPE!", Then I asked, "What is Scope?", and God said...."A Stack Frame, geeze I forgot to include you with common sense, BUT a prototype you are, too wierd to live, to rare to die...", and it was written....

Gunner

FORMAT PROC szFmtName:DWORD
INVOKE WriteConsoleOutput, Handler1, szFmtName, DWORD PTR BufSize,
DWORD PTR Starter, OFFSET WINDESC
CALL WriteScreenTitle
RET
FORMAT ENDP

This expects 1 parameter on the stack, a pointer to a string.
CURPOS PROC
INVOKE GetConsoleCursorInfo, Handler1, ADDR Curs
MOV Curs.bVisible, TRUE
INVOKE SetConsoleCursorInfo, Handler1, ADDR Curs
CALL FORMAT ;<<<<<<<<<<<<<<<<<<<<<<<<<  LOOK your not pushing a pointer to a string, the stack pointer is messed up!
RET
CURPOS ENDP
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

StatusQuo

Quote from: Gunner on December 14, 2011, 02:40:43 AM
FORMAT PROC szFmtName:DWORD
INVOKE WriteConsoleOutput, Handler1, szFmtName, DWORD PTR BufSize,
DWORD PTR Starter, OFFSET WINDESC
CALL WriteScreenTitle
RET
FORMAT ENDP

This expects 1 parameter on the stack, a pointer to a string.
CURPOS PROC
INVOKE GetConsoleCursorInfo, Handler1, ADDR Curs
MOV Curs.bVisible, TRUE
INVOKE SetConsoleCursorInfo, Handler1, ADDR Curs
CALL FORMAT ;<<<<<<<<<<<<<<<<<<<<<<<<<  LOOK your not pushing a pointer to a string, the stack pointer is messed up!
RET
CURPOS ENDP


Okay I fixed it far enough that a box does appear for it. If it doesnt work for any of you, please let me know so that perhaps I can convince myself that my eyes arent playing tricks on me.
Then God sad, "In the beginning....There was SCOPE!", Then I asked, "What is Scope?", and God said...."A Stack Frame, geeze I forgot to include you with common sense, BUT a prototype you are, too wierd to live, to rare to die...", and it was written....