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

Never mind i figured it out lol. This is the entire file.
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....

StatusQuo

Okay guys I cant downgrade it anymore than this, if you see any futher actions of downgrading that I have missed, please let me know. Also, I wonder if I broke them right for I cant test this program on the computers i am currently using.
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....

dedndave

parameters are pushed in right-to-left order

also, the terms "handle" and "handler" have distinctly different meanings

the term "handle" is used as the name of a unique identification number for objects like files, buffers, etc
the console input and output handles provide you a way to specify which device or objext is to be used
as an example, you can use multiple screen buffers
each buffer will have a different handle
you may fill one up with data while another one is being displayed
then, switch to the newly updated buffer
this gives the appearance of fast screen updating

the term "handler" is generally used to refer to a section of code that responds to some event, like a hardware event
for example, when you press a key on the keyboard, the BIOS and operating system execute handler code

mineiro

you are doing the pushes by hand, so, change lines like:
PUSH   ADDR BTitle
to
PUSH   offset BTitle



StatusQuo

Then I shall change the variable, ill probably call it Handit lol. Ive made changes in my fourth test run, and right now I am trying to get it to run in a regular make32, opposed to Masm32. Take a look, let me know the foul ups so I can redeem myself.
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....

dedndave

i am doing some clean-up   :P

StatusQuo

Quote from: dedndave on December 09, 2011, 02:16:06 AM
i am doing some clean-up   :P

Define Clean Up, that sounds kinda dirty :p :lol
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....

Magnum

You have got both 16 and 32 bit code, so it won't assemble correctly.

Have a great day,
                         Andy

dedndave


dedndave

Rafael,
i am going to put a high-voltage electrode on your tab key   :bdg
every time you hit that sucker, you will jump out of your chair and your hair will get curly(er)

mineiro

You need preserve the sensitivity of names, so Myvar and myvar are not equal.(this is default in masm32, included inside masm32rt.inc
Do not mix ms-dos interruptions with windows.
Your exit macro need be:
exit macro
push 0
call ExitProcess
endm
You have named a procedure with the same name of one variable, this confuses the assembler and the reader(your teacher)
You need review/check the right to left parameters order.
Have some "[" opened but not closed.
Have some variables inside code, but not defined.
...

StatusQuo

Quote from: mineiro on December 09, 2011, 02:48:42 AM
You need preserve the sensitivity of names, so Myvar and myvar are not equal.(this is default in masm32, included inside masm32rt.inc
Do not mix ms-dos interruptions with windows.
Your exit macro need be:
exit macro
push 0
call ExitProcess
endm
You have named a procedure with the same name of one variable, this confuses the assembler and the reader(your teacher)
You need review/check the right to left parameters order.
Have some "[" opened but not closed.
Have some variables inside code, but not defined.
...


Thanks Bro, but actually that EXIT MACRO was to insult the professor at the time, I did it for no apprent reason and it is irrelivant, but that information I did not know, and I will add it to memory.  Yet your last comment left me at a riddle, can you please go into through detail into that, so I make not the same mistakes.

You need review/check the right to left parameters order.
Have some "[" opened but not closed.
Have some variables inside code, but not defined.

What do you mean? Ive never heard of that. BTW Dave, I am just following orders, WHICH COMES TO SHOW YOU about my professor. As you can see he perfers that OLD SCHOOL T, or organizing my program. So its EAX TAB THREE TIMES then variable...Last time he litterarly expressed his dislike in me when he took off 10 points for "bad organization & structure." and that was my mid-term. I really want to get out of this class....
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....

StatusQuo

Quote from: Magnum on December 09, 2011, 02:21:58 AM
You have got both 16 and 32 bit code, so it won't assemble correctly.



How so? I mean I know why, and I understand your theory, but when I had it a little bit more advanced using the invoke, not broken down to PUSH & CALLS, it still worked lovely at my laptop which has MASM32, but the schools computer it woudlnt for obvious reasons. I thought it wouldnt matter if the 16 & 32 bit codes are mixed up as long as it can coincide with eachother. If wrong, please let me know why, i love asking dumb questions, makes me that much smarter. Yet to ask what you know is polite  :bg lol.
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

What Dave is saying, don't use tabs, or convert them to spaces.  A space is a space.  Your tab might be equal to 5 spaces, someone else - 3.  
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

mineiro

WINDESC            SMALL_RECT<>   ;you put this in .data section
WINDESC            PROC ;the same name to reference a procedure, but now, this is code
...
Curs   CONSOLE_CURSOR_INFO <> ; first letter Uppercase = Curs
PUSH   OFFSET curs                        ;first letter here is not Uppercase = curs
...
;               INVOKE   SetConsoleWindowInfo, Handit1, TRUE, ADDR WINDESC
push offset WINDESC        ;push last one at right -->Question: What it need push? the WINDESC SMALL_RECT structure or the offset of WINDESC procedure?
push TRUE                       ;push before last one
push Handit1                    ;push before before last one
call SetConsoleWindowInfo
...