News:

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

Planning my 1st program

Started by sydetys, September 27, 2008, 09:06:19 PM

Previous topic - Next topic

sydetys

Hi!

I got Masm32 and thought to leran lil bit coding....and how my PC works.

I wan´t to make simple windows program. The thing would be: extracting tempertature information from my CPU or from one of my motherboard´s diodes.

Is that easy or hard?

How should I start this? What extra info I need to dig from internet?

BTW I use vista x64, can I CROSS-compile with masm32 so I can use it with x64 system? Or better yet, any free good assembler programs which are 64bit? or both 32 AND 64bit? Keyword was: free, tis hoppy not living.

dsouza123

Hard, unless you can get an
API call or dll and API call to get temperature.

32 bit Windows programs run on 64 bit Windows.

Vista x64 means it uses 64 bit x86 instructions.
Regular XP Pro uses 32 bit x86 instructions.

flat assembler supports x86 32 bit and x86 64 bit.
flatassembler.net


sydetys

hm, I see...

I thought to use HLA free program, and for 64bit in future, fasm.

but I have a problem with RadASM and HLA combo....RadASM can´t find HLA anywhere, only assembler choice is html.

Yes HLA.exe is located c:\hla (I use vista) any hints? I have overlooked something?

jdoe

Quote from: sydetys on September 28, 2008, 12:20:05 AM
RadASM can´t find HLA anywhere, only assembler choice is html.
Yes HLA.exe is located c:\hla (I use vista) any hints? I have overlooked something?

I'm not sure RadASM support HLA. Instead, you could HIDE which is the HLA IDE.

http://sevag.krikorian.googlepages.com/hide


BlackVortex

RadAsm supports HLA, but you need to put the correct programming pack in its folder.

Check here :
http://www.radasm.com/

zooba

Quote from: sydetys on September 27, 2008, 09:06:19 PM
The thing would be: extracting tempertature information from my CPU or from one of my motherboard´s diodes.

Is that easy or hard?

Very hard. You really need to be running in kernel mode to have any hope of achieveing this. Something like finding prime numbers or some other algorithm is where assembly really shines over higher level languages.

Cheers,

Zooba :U

BlackVortex

Quote from: zooba on September 28, 2008, 02:14:12 AM
Quote from: sydetys on September 27, 2008, 09:06:19 PM
The thing would be: extracting tempertature information from my CPU or from one of my motherboard´s diodes.

Is that easy or hard?

Very hard. You really need to be running in kernel mode to have any hope of achieveing this. Something like finding prime numbers or some other algorithm is where assembly really shines over higher level languages.

Cheers,

Zooba :U
Maybe the motherboard drivers/program expose the temperature information.

About your uses for assembly, you lack imagination, haha !

zooba

Quote from: BlackVortex on September 28, 2008, 02:28:22 AM
Maybe the motherboard drivers/program expose the temperature information.

In which case it is a simple DeviceIoControl, assuming you can determine/find the control codes and verify that the machine you are running on supports that code (and that it doesn't mean "hard shutdown" or something else).

My suggestions are for someone writing their first program, not an advanced developer looking for a challenge. They are also designed to encourage learning assembly language for what it is still useful for, rather than simply learning API calls.

Cheers,

Zooba :U

sydetys

Ok, I borwse neewbie manuals around net and stick to those for awhile.

I think, if hla doesn´t start working, I will do what I was doing ="masm32"...but tell me, is object oriented programming really really necessary for later when making more advanced programs,
or would that be c++ area of expertice...

zooba

Quote from: sydetys on September 28, 2008, 11:11:12 AM
is object oriented programming really really necessary for later when making more advanced programs,

Technically no, though it has some advantages in terms of organising your project.

When you start moving on to non-trivial projects, it is definitely worth the investment of time to separate your code into multiple files (I prefer to use multiple compilation units, ie. you compile each one separately then link together, while others prefer to use a master .asm file and include the others in). While you are beginning, though, there's no need to worry about this side of things.

Also, GUI programming makes a lot more sense in a proper OO environment, rather than the psuedo-OO provided by the Win32 API.

Cheers,

Zooba :U

sydetys

Good to know that because,

I´m done with HLA and RadAsm, I haven´t the patience, 1.5h wasted, Masm32 is easier.
I found ObjASM32 project, so that will do nicely.

ecube

Even though I hate how annoying getting the new radasm setup is, once I did I love it! I like how it lists all the procedures on the side and you can double click em to jump to that point in the code. The intellisense, ofcourse color highlighting are all fun too :D

Mark Jones

Quote from: sydetys on September 28, 2008, 12:07:06 PM
I´m done with HLA and RadAsm, I haven´t the patience, 1.5h wasted...

Just for perspective, I've spent days, weeks even, converting projects between MASM32 and GoASM. Assembler does take a certain amount of patience (a lot really.) Part of the difficulty in getting a particular setup working is due to the lack of an IDE developed around a compiler (which in essence "holds our hand" in the build process) -- everything in assembler IDEs must be configured by hand. Granted that often, any documentation is marginal at best. At first, this seems like a major pain in the arse, but over time, once a person finds a configuration that works for them, this ends up being more valuable because the developer has complete control over every step of the build process.

In any case, if one particular combination of tools and configuration isn't working, by all means try another. Everyone here has done the same thing, and arrived at a combination of tools and settings that worked best for them.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08