News:

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

What next?

Started by frktons, July 26, 2010, 12:43:03 PM

Previous topic - Next topic

frktons

According to your experience, after learning the basic of a programming language
like C or MASM, would you go deeper in the direction of the language itself, or
maybe dive for a while in the API world and try to interact with the OS for the usual
tasks of input data from keyboard, mouse, files, output data to display, printer, files,
and so on.

For my personal feeling, I think it'd better to deal for a while with some WIN API
and to have some program doing things that I can "see" [like things displayed, or
files created] instead of trying to deal with more complex algorithms and mnemonics.

What would you suggest or warn about?

Thanks
Mind is like a parachute. You know what to do in order to use it :-)

GregL

frktons,

I think you are right, start writing programs, you will learn more about the language in the process.


frktons

Quote from: Greg Lyon on July 26, 2010, 03:40:52 PM
frktons,

I think you are right, start writing programs, you will learn more about the language in the process.

Thanks Greg. I guess that is the direction anyway.  :U
Mind is like a parachute. You know what to do in order to use it :-)

Geryon

I agree with Greg, you need a bit "coding" experince. Play with Api and don't forget to take look Four-F's KMD tutorials. Also some of Tanenbaum's book could help too
"Some people have got a mental horizon of radius zero and call it their point of view." --D.Hilbert

Yuri

From my experience, I recommend writing a text editor. I wrote it in C, then re-wrote in GoAsm. By the way, the C source was 32 KB and the GoAsm source was 33 KB, so no big difference in the amount of typing.

frktons

Quote from: Geryon on July 27, 2010, 04:56:46 AM
I agree with Greg, you need a bit "coding" experince. Play with Api and don't forget to take look Four-F's KMD tutorials. Also some of Tanenbaum's book could help too


Thanks Geryon. I think this tutorial is beyond the scope of my actual interests. I'll have
a look at it anyway.

Quote from: Yuri on July 27, 2010, 07:25:02 AM
From my experience, I recommend writing a text editor. I wrote it in C, then re-wrote in GoAsm. By the way, the C source was 32 KB and the GoAsm source was 33 KB, so no big difference in the amount of typing.

Good idea. Did you use a lot of Windows API? Could you post the result, not
necessarily the source if you don't want to show it, to have an idea of the functionalities
you could push into 32 Kb.

Thanks to both for your suggestions.  :U
Mind is like a parachute. You know what to do in order to use it :-)

Yuri

Yes, that was a good training in using API, since you have to work with files, with the clipboard, the registry, create a window menu, keyboard accelerators and so on. It's not so advanced an editor but has some features convenient personally for me.

As for its functionality, I use it to write and test short snippets of code in scripting languages like JScript, VBScript, AutoHotkey, etc, and for short texts like replies on forums. It's actually a pad of Edit controls, all of which are hidden except the active one. When I create a new page, the file for it is created automatically with a random name in a special folder. No need to choose a name and location, though it's possible if needed. As the files are short, they are loaded all at once when the editor starts. So I don't have to open them manually, just go to the needed one. Also I can quickly launch the code on the page without manually saving it. According to its type, the open command for it will be found in the registry and executed on a temporary file deleted later. Also it works with the clipboard in a more clever way. On a multilingual system there are some quirks in how the clipboard manages text, and as a result sometimes it gets spoiled by the wrong encoding. In my own editor I can easily fix that.

Those were the utilitarian goals, but the main one, of course, was practice in Windows API and the language I was learning.

jj2007

Quote from: Yuri on July 27, 2010, 07:25:02 AM
From my experience, I recommend writing a text editor. I wrote it in C, then re-wrote in GoAsm. By the way, the C source was 32 KB and the GoAsm source was 33 KB, so no big difference in the amount of typing.

http://www.masm32.com/board/index.php?topic=10796.msg97379#msg97379 (28k, with source)

frktons

Quote from: jj2007 on July 27, 2010, 12:29:34 PM
Quote from: Yuri on July 27, 2010, 07:25:02 AM
From my experience, I recommend writing a text editor. I wrote it in C, then re-wrote in GoAsm. By the way, the C source was 32 KB and the GoAsm source was 33 KB, so no big difference in the amount of typing.

http://www.masm32.com/board/index.php?topic=10796.msg97379#msg97379 (28k, with source)

Invaluable help JJ, thanks!  :U

Quote from: Yuri on July 27, 2010, 12:23:32 PM
Those were the utilitarian goals, but the main one, of course, was practice in Windows API and the language I was learning.

Thanks yuri, could you post the EXE to have a look at it? The C one or The Goasm one
if you don't mind.
Mind is like a parachute. You know what to do in order to use it :-)

Yuri

Well, but it's all in Russian (menus, dialogs and message boxes). I don't have an English version. Moreover, not all menu items work and some can even crash the program, and only I know which. :wink That's because I never planned to distribute it even among Russians, so it has always been in permanent half-baked state. I really doubt it would be of any use for you.

Btw, I no longer have the C version, since it was lost when my previous computer died. Now I only have GoAsm code with practically no comments (all for the above reason).

frktons

Quote from: Yuri on July 27, 2010, 02:27:49 PM
Well, but it's all in Russian (menus, dialogs and message boxes). I don't have an English version. Moreover, not all menu items work and some can even crash the program, and only I know which. :wink That's because I never planned to distribute it even among Russians, so it has always been in permanent half-baked state. I really doubt it would be of any use for you.

Btw, I no longer have the C version, since it was lost when my previous computer died. Now I only have GoAsm code with practically no comments (all for the above reason).

Thanks Yuri.

The strings in the prog can be translated, I've a russian friend here where I live,
and mnemonics are mnemonics, except if they are written in Cyrillic?
Ih that last case Google translator could help as well. Half-baked is always better
that no-baked at all. If I have then proc to study, instead of 20, it's learning
material the same.

By the way, do whatever you feel the better.   

Frank
Mind is like a parachute. You know what to do in order to use it :-)