The MASM Forum

General => The Campus => Topic started by: John on October 21, 2020, 09:54:30 PM

Title: Newbie here! Need guide
Post by: John on October 21, 2020, 09:54:30 PM
I am new in the programming world. I want to learn how to code programs  using Win32 and masm but the problem is I cant seem to find any videos or guides that uses Masm32. Are there any guides that I can use as a beginner so I can answer my Training manual? I also attached the problems that I want to solve. Thank you!
Title: Re: Newbie here! Need guide
Post by: Mikl__ on October 21, 2020, 10:05:00 PM
Quote from: JohnI also attached the problems that I want to solve. Thank you!
Hi, John!
Do you think that you are more cunning than others? Did you read the masm32 forum rules (http://masm32.com/board/index.php?board=14.0) carefully?
QuoteThe NO HOMEWORK Rule
9. The forum is a technical help forum for assembler language programmers, it will not be used as a location for grovelling to get someone to do your homework. Members who are learning assembler programming at school or similar are welcome but they must do their own work. In this context they will receive assistance if they need it but any dumping of problems in the forum will be removed. Also note that 16 bit DOS code will be moved to the 16 bit DOS forum as this forum is primarily a 32 bit Windows assembler forum.
Title: Re: Newbie here! Need guide
Post by: John on October 21, 2020, 10:15:15 PM
I'm not implying to solve the examples. I just want to show the kind of problem that I want to solve because some gave me a book for Tasm or A examples of program that doesn't use consoles. I'm looking for a book or guide that teaches the basics of assembly using masm and consoles. Sorry my english is kinda bad so it is hard to express what I want.
Title: Re: Newbie here! Need guide
Post by: jj2007 on October 21, 2020, 10:25:42 PM
Hi John,

Welcome to the Forum :thup:

Mikl is right about the homework rules, but since you write that you are new to programming, I don't believe that you are trying that. The problem is that what you have posted is way over your head. It is difficult even for members who have ten years of experience...

Feasible but requires a thorough knowledge of the registry, less of assembly:
QuoteExercise 2:
Create a console based program that will create an entry in the registry key "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" for the file in Exercise 1. It has to create an entry similar to this:

QuoteExercise3:
Create a console based program that will accept a parameter. It will then search the registry key "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" for a value Name similar to the parameter and delete that entry in the registry. It will also notify you if no entry exists.
Win32 Programming
Create a Win32 program that simulates the capabilities of the DIR command in the Windows Command Prompt. The following are the program specifications:
    1. The program should be able to accept and process command-line parameters.
    2. It should display all the contents of the current directory if there are no filters specified.
    3. The directory listing should contain the following information (in no particular order):
        a. File name
        b. File attributes (R, S, A, H. D is optional)
        c. File size (in decimal)
        d. Date created
    4. The program should be able to accept an optional command-line parameter that specifies the search filter. Examples of search filters are the following:
        a. *.*   - all files with all extensions
        b. *.xxx   – all files with particular extension xxx (e.g. exe, dll, etc)
        c. *32*.*   - all files with "32" in its filename.
    5. If the command-line parameter /s is present, it should also include in the listing all entries in the subdirectories.
    6. Include syntax error checking.
    7. All command-line parameters should be case-insensitive and can be cascaded in any order.
Title: Re: Newbie here! Need guide
Post by: John on October 21, 2020, 10:33:10 PM
Thanks for the answer! I'll watch other programming tutorials first then try to convert it to Masm. Just to be clear I'm over 40 years old so I don't need any homework  :rofl:
Title: Re: Newbie here! Need guide
Post by: jj2007 on October 21, 2020, 10:56:21 PM
That's what I suspected :mrgreen:

Check Masm32: What you absolutely need to get started (http://www.jj2007.eu/Masm32_Tips_Tricks_and_Traps.htm). The Help and tutorials, recommended reading section may have a few broken links, but it's basically what you need to get started. Once you have written your own exercises, and stumble over the inevitable problems, you'll find help here :thup:

Title: Re: Newbie here! Need guide
Post by: hutch-- on October 21, 2020, 11:19:31 PM
Hi John and welcome to the forum. It will depend on what your programming background is. If you have mastered decent compilers and have a good grasp of addressing memory, you may have enough background to start on assembler but if not, assembler is not a good starting point, you need to know how to write Windows API functions and master the Intel instructions to write working executables.
Title: Re: Newbie here! Need guide
Post by: Vortex on October 22, 2020, 03:57:36 AM
I checked the attached document. It mentions about creating an entry in :

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

Any specific reason to select this particular registry key?
Title: Re: Newbie here! Need guide
Post by: TouEnMasm on October 22, 2020, 05:01:57 AM

After reading your exercise,perhaps is there words that you can use in the search box of the forum to have answers.
--stop----
Title: Re: Newbie here! Need guide
Post by: mineiro on October 22, 2020, 07:27:51 AM
hello sir John; welcome.
Link below have a bit of exercise 3 ideas.
http://masm32.com/board/index.php?topic=8855.msg96631#msg96631
Title: Re: Newbie here! Need guide
Post by: LordAdef on October 22, 2020, 08:13:35 AM
Welcome John,
If you really want to learn masm, these guys here are monsters! But be aware that the word "Malware" is taken seriously around here. And since your attachment deals with Malware analysis, just bare this in mind
If you need a reference book, I would suggest Modern x86 Assembly Language Programming, by Daniel Kusswurm. I bought my copy at Amazon.

Title: Re: Newbie here! Need guide
Post by: daydreamer on October 22, 2020, 08:05:35 PM
welcome to forum John :thup:
art of assembly,especially like MMX chapters
but there are many examples in masm32 package and ichelionz tutorials for windows programming
@Alex
its great to be a 'monster' it save some bucks when its halloween on customes and masks so we can buy latest 'monster' cpu aka 4.5ghz AMD ryzen threadripper :greenclp:
Title: Re: Newbie here! Need guide
Post by: LordAdef on October 23, 2020, 04:24:50 AM
Quote from: daydreamer on October 22, 2020, 08:05:35 PM
@Alex
its great to be a 'monster' it save some bucks when its halloween on customes and masks so we can buy latest 'monster' cpu aka 4.5ghz AMD ryzen threadripper :greenclp:
Magnus, at least you will have a very fast halloween, without any byte code slow language