Assembly Console Programming in Windows

  • Follow


Assembly Console Programming in Windows...

Hi, I am just starting to learn assembly. I thought it might be a good
idea to steer clear of Win32API if possible and try learning to program
console apps (if this will make it any easier).
Does anybody know of a Book/Tutorial written for developing
applications that run in the Windows console screen? I think the term
Curses might have something to do with it and have read somewhere that
Windows has an API for this type of thing.

Just a note:
I also know of HLA (that is a quick glance), but am a little sceptical
of this approach as by first impressions it has syntax similarities of
other HHLs to make programming easier (I suppose) and I am already
learning C for this purpose. I am also learning assembly because I want
to understand how computers actually work (the nitty gritty crap).
Learning assembler is more of an exercise I suppose. Although I hope to
eventually use assembly within C and sometimes when appropriate just
write a program in assembly.

Thanks for your time.

0
Reply spamtrap2 (1628) 1/13/2006 7:32:15 AM

spamtrap@crayne.org �crivait news:1137137534.981591.175820
@o13g2000cwo.googlegroups.com:

> Assembly Console Programming in Windows...
> 
> Hi, I am just starting to learn assembly. I thought it might be a good
> idea to steer clear of Win32API if possible and try learning to program
> console apps (if this will make it any easier).

Impossible. Even in Console mode, you have to deal with Api
and minimizing their usage does not make the programming
any easier, but, all the opposite, more difficult.

The actual significative PEs able assemlers are:

   * NASM: < http://sourceforge.net/projects/nasm >

   * RosAsm: < http://betov.free.fr/RosAsm.html >

   * FASM: < http://flatassembler.net/ >

   * GoAsm: < http://www.godevtool.com/index.html >

If you plan to keep with PEs, RosAsm is the most advanced
environment, offering tons of stuff (Assembler, Source
Level Debugger, Disassembler-ReAssembler, 2 Megas of Help
System, Resources Editors, specific Sources Editor, and
so on...), all in GPLed Open Sources.


Betov.

< http://rosasm.org >




0
Reply Betov 1/13/2006 10:36:07 AM


On 12 Jan 2006 23:32:15 -0800, spamtrap@crayne.org wrote:

>Assembly Console Programming in Windows...
>
>Hi, I am just starting to learn assembly. I thought it might be a good
>idea to steer clear of Win32API if possible and try learning to program
>console apps (if this will make it any easier).
>Does anybody know of a Book/Tutorial written for developing
>applications that run in the Windows console screen? 

Take a look at grc.com

It takes some reading, but you'll find Steve's  "The Small Is
Beautiful Starter Kit". Windows from asm :-)


-- 
Kind regards,
Gerard Bok

0
Reply spamtrap 1/13/2006 2:14:38 PM

>  Curses might have something to do with it and have read somewhere that
> Windows has an API for this type of thing.

http://www.delorie.com/djgpp/

u can download all u need (i hope) :

- conio reference ;

and u can use 'zip picker' in the site to download :

Unix Curses Emulator (ncurses)

I hope to have been useful you

regards 

claudio

0
Reply Claudio 1/13/2006 5:44:37 PM

"Betov" <spamtrap@crayne.org> wrote in message 
news:XnF974A76F967E0Fbetovfreefr@212.27.42.72...
> spamtrap@crayne.org �crivait news:1137137534.981591.175820
> @o13g2000cwo.googlegroups.com:
>
>[..]
> The actual significative PEs able assemlers are:
>   * NASM: < http://sourceforge.net/projects/nasm >
>
>   * RosAsm: < http://betov.free.fr/RosAsm.html >
>
>   * FASM: < http://flatassembler.net/ >
>
>   * GoAsm: < http://www.godevtool.com/index.html >
>
You might also want to check out the Microsoft Assembler MASM which is now 
freeware and being maintained and extended by volunteers (www.masm32.com). 
Its stable, mature and quite powerful.

Many (most?) examples in books and code snippets on the net are in MASM 
syntax. (Which sucks BTW, but that is another story ;-) )

Another tip: WinAsm Studio, a nice ASM IDE which works for MASM, FASM and 
probably other assemblers too.

Have fun!

Patrick Harsdorf




0
Reply Patrick 1/14/2006 8:55:51 AM

"Patrick von Harsdorf"  <spamtrap@crayne.org> �crivait
news:dqaeas$7el$01$1@news.t-online.com: 

> You might also want to check out the Microsoft Assembler MASM which is
> now freeware

No. The MASM Compiler is NOT freeware. It is property
of MicroSoft, and is distributed with an EULA, that
you should read.

> and being maintained and extended by volunteers
> (www.masm32.com). Its stable, mature and quite powerful.

???!!!...

Try this at ALA...

Betov.

< http://rosasm.org >



0
Reply Betov 1/14/2006 8:20:30 PM

It also fails to install.  It triggers a data execution protection 
violation.

"Patrick von Harsdorf" <spamtrap@crayne.org> wrote in message 
news:dqaeas$7el$01$1@news.t-online.com...
> "Betov" <spamtrap@crayne.org> wrote in message 
> news:XnF974A76F967E0Fbetovfreefr@212.27.42.72...
>> spamtrap@crayne.org �crivait news:1137137534.981591.175820
>> @o13g2000cwo.googlegroups.com:
>>
>>[..]
>> The actual significative PEs able assemlers are:
>>   * NASM: < http://sourceforge.net/projects/nasm >
>>
>>   * RosAsm: < http://betov.free.fr/RosAsm.html >
>>
>>   * FASM: < http://flatassembler.net/ >
>>
>>   * GoAsm: < http://www.godevtool.com/index.html >
>>
> You might also want to check out the Microsoft Assembler MASM which is now 
> freeware and being maintained and extended by volunteers (www.masm32.com). 
> Its stable, mature and quite powerful.
>
> Many (most?) examples in books and code snippets on the net are in MASM 
> syntax. (Which sucks BTW, but that is another story ;-) )
>
> Another tip: WinAsm Studio, a nice ASM IDE which works for MASM, FASM and 
> probably other assemblers too.
>
> Have fun!
>
> Patrick Harsdorf
>
>
>
> 


0
Reply David 1/15/2006 2:07:39 AM

"Betov" <spamtrap@crayne.org> wrote in message 
news:XnF974BDA13BC472betovfreefr@212.27.42.65...
> "Patrick von Harsdorf"  <spamtrap@crayne.org> �crivait
> news:dqaeas$7el$01$1@news.t-online.com:
>> You might also want to check out the Microsoft Assembler MASM which is
>> now freeware
>
> No. The MASM Compiler is NOT freeware. It is property
> of MicroSoft, and is distributed with an EULA, that
> you should read.

Hi Betow,
I quote from the masm32 project license
"The MASM32 project is licenced *freeware* available to any programmer who 
wishes to either learn or write 32 bit Microsoft Assembler."

Isn�t it great that there are so many free assemblers around?

Patrick

ps: rosasm IS cool. 


0
Reply Patrick 1/15/2006 10:44:00 AM

"Patrick von Harsdorf"  <spamtrap@crayne.org> �crivait
news:dqd91o$4r3$00$1@news.t-online.com: 

> 
> "Betov" <spamtrap@crayne.org> wrote in message 
> news:XnF974BDA13BC472betovfreefr@212.27.42.65...
>> "Patrick von Harsdorf"  <spamtrap@crayne.org> �crivait
>> news:dqaeas$7el$01$1@news.t-online.com:
>>> You might also want to check out the Microsoft Assembler MASM which
>>> is now freeware
>>
>> No. The MASM Compiler is NOT freeware. It is property
>> of MicroSoft, and is distributed with an EULA, that
>> you should read.
> 
> Hi Betow,
> I quote from the masm32 project license
> "The MASM32 project is licenced *freeware* available to any programmer
> who wishes to either learn or write 32 bit Microsoft Assembler."

You confuse the _MASM32_ License with the _MASM_ License.

I will not comment here, to not put Chuck in one another
difficult situation. Try to understand by yourself.

:)

> Isn�t it great that there are so many free assemblers around?

Not really, in my humble opinion. I have done my best to try
to _group_ the various efforts, because splitting all of
these efforts would have no end, until each programmer would
have written his own Assembler. Which might be funny at a
pedagogic point of view, but what is surely not a path to
take, seriously.

The very best would have been that we all could have a same
and shared Encoder, at least, that we could re-use and adapt
to the various types of programming. Such an Encoder should
have been something like FASM, but, unfortunately, FASM is
not GPL, and it is now a bit late for rewriting something
like this under GPL (around 2 years of works) given the very
small number of volunteers, and the too many disagreaments
in between the couple guys, who could, effectively, do such
a job (last demonstration, recently, with the much predicted
collapse of the LuxAsm Project).


> ps: rosasm IS cool. 

Thanks from the team.

:)

Betov.

< http://rosasm.org >




0
Reply Betov 1/15/2006 7:34:08 PM

"Patrick von Harsdorf"  <spamtrap@crayne.org> wrote:
>
>"Betov" <spamtrap@crayne.org> wrote:
>> "Patrick von Harsdorf"  <spamtrap@crayne.org> �crivait:
>>
>>> You might also want to check out the Microsoft Assembler MASM which is
>>> now freeware
>>
>> No. The MASM Compiler is NOT freeware. It is property
>> of MicroSoft, and is distributed with an EULA, that
>> you should read.
>
>Hi Betow,
>I quote from the masm32 project license
>"The MASM32 project is licenced *freeware* available to any programmer who 
>wishes to either learn or write 32 bit Microsoft Assembler."
>
>Isn�t it great that there are so many free assemblers around?

Betov is correct.  The MASM32 project, which is *NOT* a Microsoft product,
is freeware, but that only includes the libraries and source files.  The
MASM assembler itself is still property of Microsoft and subject to an
EULA.

Hutch and Microsoft arrived at an understanding which allows him to
redistribute that particular version with MASM32, but it is not accurate to
call MASM "freeware".
-- 
- Tim Roberts, timr@probo.com
  Providenza & Boekelheide, Inc.

0
Reply Tim 1/15/2006 9:08:46 PM

"Betov" <spamtrap@crayne.org> wrote in message 
news:XnF974CD235A6F33betovfreefr@212.27.42.70...
> "Patrick von Harsdorf"  <spamtrap@crayne.org> �crivait
> news:dqd91o$4r3$00$1@news.t-online.com:
>>
>> Hi Betow,
>> I quote from the masm32 project license
>> "The MASM32 project is licenced *freeware* available to any programmer
>> who wishes to either learn or write 32 bit Microsoft Assembler."
>
> You confuse the _MASM32_ License with the _MASM_ License.
>
> I will not comment here, to not put Chuck in one another
> difficult situation. Try to understand by yourself.

I do now and stand corrected.
Cheers,
Patrick 


0
Reply Patrick 1/16/2006 6:13:38 PM

spamtrap@crayne.org wrote:
> Assembly Console Programming in Windows...
>
> Hi, I am just starting to learn assembly. I thought it might be a good
> idea to steer clear of Win32API if possible and try learning to program
> console apps (if this will make it any easier).
> Does anybody know of a Book/Tutorial written for developing
> applications that run in the Windows console screen?

Art of Assembly: http://webster.cs.ucr.edu.

> I think the term
> Curses might have something to do with it and have read somewhere that
> Windows has an API for this type of thing.
>
> Just a note:
> I also know of HLA (that is a quick glance), but am a little sceptical
> of this approach as by first impressions it has syntax similarities of
> other HHLs to make programming easier (I suppose) and I am already
> learning C for this purpose.

So you don't have to learn quite as much. Don't get the (mistaken)
impression that you're learning a HLL rather than an assembly language.
By the time you finish AoA (Art of Assembly), you be writing pure
assembly code. The HLL stuff is just to help you get started, it's not
the final target.


> I am also learning assembly because I want
> to understand how computers actually work (the nitty gritty crap).

In addition to Art of Assembly, you might want to check out my book
"Write Great Code, Volume 1: Understanding the Machine" (No Starch
Press).

> Learning assembler is more of an exercise I suppose. Although I hope to
> eventually use assembly within C and sometimes when appropriate just
> write a program in assembly.

That's the way most people use assembly, yes.


> 
> Thanks for your time.

You're welcome.
Cheers,
Randy Hyde

0
Reply rhyde 1/17/2006 2:11:05 AM

(note: context / order fixup attempted)

On Sat, 14 Jan 2006 18:07:39 -0800, "David J. Craig"  <spamtrap@crayne.org>
wrote:

>"Patrick von Harsdorf" <spamtrap@crayne.org> wrote in message 
>news:dqaeas$7el$01$1@news.t-online.com...

>> Another tip: WinAsm Studio, a nice ASM IDE which works for MASM, FASM and 
>> probably other assemblers too.

>It also fails to install.  It triggers a data execution protection 
>violation.

If you're referring to Antonis Kyprianou's IDE... didn't present a
problem, here.  Well, version 5.0.1.114, anyway.

Jeff

http://jefftturner.com


0
Reply pH 1/17/2006 5:03:38 AM

There have been a number of comments about the MASM32 project which I
maintain that need to be clarified.

The project has its own licence which is at URL
http://www.masm32.com/mlicence.htm

The original Microsoft EULA is enclosed within the project for binaries
owned by Microsoft and is a condition negotiated with Microsoft for its
distribution.

The Microsoft binaries are copyright software that Microsoft supply
which are available without cost to write you own software including
commercial software which you may sell under the terms of the licence.

Microsoft still supply the original DDK that contain the binaries at
this URL.

http://download.microsoft.com/download/win98SE/Install/Gold/W98/EN-US/98DDK.EXE

This proves conclusively that the binaries are available from Microsoft
as FREEWARE and the sense of the term here is you cannot pay for it and
you can use the binaries to build your own commercial software.

You can access masm in a number of different ways, commercially in a VC
based product, as an upgrade for VC6 and in various Device development
kits (DDKs).

It may offend some that the masm32 Project passed the million download
over 3 years ago but programmers tend to vote with their feet and with
the masm32 Project, they have voted hard and often.

Regards,

hutch at movsd dot com
The MASM32 Project
http://www.masm32.com

0
Reply hutch 1/17/2006 4:34:47 PM

I use goASM and its awesome.

0
Reply spamtrap 1/17/2006 7:42:17 PM

hutch <spamtrap@crayne.org> wrote:

> This proves conclusively that the binaries are available from Microsoft
> as FREEWARE and the sense of the term here is you cannot pay for it
> and you can use the binaries to build your own commercial software.

Which still doesn't make it freeware. If MASM was freeware, you
wouldn't have to negotiate with Microsoft to redistribute it. You
would also be allowed to disassemble it, modify it and distribute
your own version (perhaps producing Linux binaries) at your own
terms. 


0
Reply Ole 1/17/2006 11:42:08 PM

Ole,

I am inclined to leave this topic alone in CLAX and address it in ALA
if it has to be done but the basics of the MASM32 Project are that it
is targetted directly at programmers so they can write and own their
own code as their own personal private property and distribute as they
wish including selling it.

They are welcome to use any of the prebuilt source and binary code in
their own applications without royalties, without being forced to
publish their own code and without any requirement of publishing
credits for that code.

If this was not possible with the enclosed EULA, then the project never
would have been started. The licence for the project and the included
Microsoft binaries are essentially that of commercial software which
carries the rights of use of commercial software but with the
difference that none of the project components can be relicenced,
redistributed, bought or sold.

I am correct in asserting in the normal historical sense that the
MASM32 Project is FREEWARE that cannot be paid for and can be used like
commercial software with the same rights as commercial software.

There are other licencing systems available that impose other rights
and limitations on the user but the only licencing method that is
freeware by at least some definitions is public domain software that
can be copyrighted by someone else.

The MASM32 project has no dependency on GPL, FSF or any variants of
this licencing technique and correspondingly has none of its
limitations and restrictions.

For anyone who wants to write assembler code for the Linux x86
platform, I would heartily recommend the GNU Assembler (GAS) as it is
robust, well written and capable of producing numerous object module
formats. For the obvious reason, it produces object modules that are
fully compatible with the GCC compiler and it has an Intel Syntax
option that works fine and is correctly implimented.

Regards,

hutch at movsd dot com

0
Reply hutch 1/18/2006 1:17:08 AM

"Ole Nielsby"  <spamtrap@crayne.org> �crivait news:43cd80cb$0$15795
$14726298@news.sunsite.dk:

> hutch <spamtrap@crayne.org> wrote:
> 
>> This proves conclusively that the binaries are available from 
Microsoft
>> as FREEWARE and the sense of the term here is you cannot pay for it
>> and you can use the binaries to build your own commercial software.
> 
> Which still doesn't make it freeware. If MASM was freeware, you
> wouldn't have to negotiate with Microsoft to redistribute it. You
> would also be allowed to disassemble it, modify it and distribute
> your own version (perhaps producing Linux binaries) at your own
> terms. 

And who is the one who tells you that he has "negotiated
with Microsoft to redistribute it"?

Answer: Hutch--.

Don't ask him to post the agreament. You wil have the
answer: "Non Disclosure Agreament"... fancy!...

:)

Don't ask MicroSoft, either, about the real reason(s)
why they refused to sue Hutch for the trick.

Don't ask Hutch about the reason why he is used to add
confusion on confusion by regulary writting sentences
like "I write MASM32"... and so on.

:)

Betov.

< http://rosasm.org >



0
Reply Betov 1/18/2006 9:06:20 AM

Ole Nielsby wrote:
> hutch <spamtrap@crayne.org> wrote:
>
> > This proves conclusively that the binaries are available from Microsoft
> > as FREEWARE and the sense of the term here is you cannot pay for it
> > and you can use the binaries to build your own commercial software.
>
> Which still doesn't make it freeware. If MASM was freeware, you
> wouldn't have to negotiate with Microsoft to redistribute it. You
> would also be allowed to disassemble it, modify it and distribute
> your own version (perhaps producing Linux binaries) at your own
> terms.

You are confusing OSS licenses such as GPL with freeware. There is no
requirement that freeware be open source, that you have the right to
reverse engineer it, modify it, or distribute your own version.
Freeware is an ill-defined term that basically means "free, as in
beer".  
Cheers,
Randy Hyde

0
Reply rhyde 1/18/2006 2:48:04 PM

There are many definitions of 'freeware'.  There used to be the old 'public 
domain', which meant someone could take it and resell it.  The GPL is not 
'free' either because the license has many restrictions.  They don't bother 
me, but any corporation using GPL source would be stupid if they had a 
commercial product they wanted to protect or were protecting with patents, 
trade secrets, or copyright.

I have been watching this newsgroup for a while and find the interaction 
between you and Hutch interesting.  My baby just turned 34 this week, so it 
brings back memories.

"Betov" <spamtrap@crayne.org> wrote in message 
news:XnF974F67C835A16betovfreefr@212.27.42.80...
> "Ole Nielsby"  <spamtrap@crayne.org> �crivait news:43cd80cb$0$15795
> $14726298@news.sunsite.dk:
>
>> hutch <spamtrap@crayne.org> wrote:
>>
>>> This proves conclusively that the binaries are available from
> Microsoft
>>> as FREEWARE and the sense of the term here is you cannot pay for it
>>> and you can use the binaries to build your own commercial software.
>>
>> Which still doesn't make it freeware. If MASM was freeware, you
>> wouldn't have to negotiate with Microsoft to redistribute it. You
>> would also be allowed to disassemble it, modify it and distribute
>> your own version (perhaps producing Linux binaries) at your own
>> terms.
>
> And who is the one who tells you that he has "negotiated
> with Microsoft to redistribute it"?
>
> Answer: Hutch--.
>
> Don't ask him to post the agreament. You wil have the
> answer: "Non Disclosure Agreament"... fancy!...
>
> :)
>
> Don't ask MicroSoft, either, about the real reason(s)
> why they refused to sue Hutch for the trick.
>
> Don't ask Hutch about the reason why he is used to add
> confusion on confusion by regulary writting sentences
> like "I write MASM32"... and so on.
>
> :)
>
> Betov.
>
> < http://rosasm.org >
>
>
> 


0
Reply David 1/19/2006 4:53:28 AM

"David J. Craig"  <spamtrap@crayne.org> �crivait
news:v-2dnX4dHcXVhlLenZ2dnUVZ_sWdnZ2d@comcast.com: 

> There are many definitions of 'freeware'. 

I know only of two:

* The GPL (and compatible ones)

* The ones that are not GPLed.

:)

> There used to be the old
> 'public domain', which meant someone could take it and resell it.  The
> GPL is not 'free' either because the license has many restrictions. 
> They don't bother me, but any corporation using GPL source would be
> stupid if they had a commercial product they wanted to protect or were
> protecting with patents, trade secrets, or copyright.

Why would a commercial product need to use GPLed Code?
Example? For making money with others' works without
doing anything? What would they sell, then?

For minor re-uses, or libraries, or such, is not the LGPL
there for this?


Betov.

< http://rosasm.org >




0
Reply Betov 1/19/2006 9:16:12 AM

"rhyde@cs.ucr.edu" <spamtrap@crayne.org> wrote:

> You are confusing OSS licenses such as GPL with freeware. There is no
> requirement that freeware be open source, that you have the right to
> reverse engineer it, modify it, or distribute your own version.
> Freeware is an ill-defined term that basically means "free, as in
> beer".

Sorry, I guess I confused "freeware" with "public domain". 


0
Reply Ole 1/20/2006 2:37:21 AM

> > There are many definitions of 'freeware'.
>
> I know only of two:
>
> * The GPL (and compatible ones)
>
> * The ones that are not GPLed.

Hmm, yes. I've never considered any of the BSDs, Apache, or X freeware.
*scratches head*

Actually, you're saying that freeware is either GPL'ed or not? Correct!
As is all software...I'm not sure what you mean.

> Why would a commercial product need to use GPLed Code?
> Example? For making money with others' works without
> doing anything? What would they sell, then?

A commercial product? Like, say, Red Hat? Or Mandrivalinux?

0
Reply spamtrap 1/25/2006 2:51:02 AM

22 Replies
382 Views

(page loaded in 0.125 seconds)

Similiar Articles:


















7/22/2012 11:22:15 AM


Reply: