If you think a simple tutorial can teach you assembly programing,
then maybe are misunderstanding something. There are 3 parts of
assembly programming:
Which, seems odd to me that a boolean operation that always returns FALSE would be the result, but hey, I didn't write the code explorer - I'm just testing it (someone is going to have to explain that one to me!). :)
Which returns, surprise!
main:
xor eax, eax
ret
There is no "compilation error", but it says "Compiler returned: 0",
which, I guess, maybe, perhaps, I dunno, is that an error or did it work?
It's what everyone would want who is a noob who just wants a working set of examples (aka a tutorial) on the most common computer platform there ever was.
Back to the original need, I will endeavor to find a tutorial that
works on the most common computer platform in the world, using
whatever assembler that tutorial suggests.
Just as a person can hike an existing trail that someone else dug out and
put all the steps and bridges and maps in place years before, I just want to "walk the trail" of an existing assembly language programming tutorial.
Just as a person can hike an existing trail that someone else dug out and put all the steps and bridges and maps in place years before, I just want to "walk the trail" of an existing assembly language programming tutorial.re4ASM with its macrolibraries might be the right "trail" for you.
Just as a person can hike an existing trail that someone else dug out
and put all the steps and bridges and maps in place years before, I
just want to "walk the trail" of an existing assembly language
programming tutorial.
When I asked the question originally, I had no idea it would be this
hard.
I figured it would be like any freshman level physics lab.
1. You check out the equipment (e.g., a capacitance tester)
2. You grab a ziplock bag of pre-prepared capacitors of various types
3. You measure their capacitance, and write up a report
Notice that the lab is designed to work.
The student simply follows the steps.
The learning is in watching it work.
The reason I dropped the comp sci curriculum was syntax, where every
language does the same damn thing using completely different syntax.
For example, Fortran's trenchant yet precise syntax resulted in a
terse "Error 50", which you had to look up in a book in the computer
room locked down to a table with half the pages missing.
On the
opposite side of the spectrum, COBOL was downright loquacious, with
bombastic divisions and gabby data types.
Somewhere in between was
PL/1 but my point is they all do the same damn thing, but with
completely different syntax.
I swore I'd never learn another programming language in the early
seventies, and I stuck to my word,
and even now, I don't want to learn assembly language just like I
don't want to learn how to design a microprocessor.
I don't want to write my own assembly language programs.
I just want to watch it happen which is why I seek a tutorial.
In my not too distant past, I had, like everyone did, all the SAMS
books,
I just want to learn about assembly language by running a simple tutorial.
On Wed, 20 Jan 2021 13:04:01 GMT, paul
[]
Back to the original need, I will endeavor to find a tutorial that
works on the most common computer platform in the world, using
whatever assembler that tutorial suggests.
Sorry we couldn't help; x86 is ancient technology that requires a lot of effort to get into. I doubt there's much impetus to create a slick modern streamlined tutorial.
On 20.01.2021 13:47, paul wrote:
...
I just want to learn about assembly language by running a simple
tutorial.
windoze is NOT simple. In terms of easy programming it is the WORST.
I'm a low level programmer and know x86 instructions very well, but
ASM tools are all different therefore I've gone the pure metal
hex-way. And once (1999) I needed to learn about windoze in general
because a paying client asked for such.
similar to your problem I had no idea where to start and how to get
info about available M$-functions.
I found RosAsm (for 32bit windoze) and a lot of tutorials within it.
With some help of alt.asm and clax I figured the basics of it.
So after a few weeks I could sell my very first (also my last)
win-app. Not sure if the RosAsm forum is still active. just check on
it.
Nasm is merely used by Loonix coders, Fasm(Fasmw) is fine for windoze.
Masm is M$-crap (you already figured that)
Masm32 is/was? an attempt to replace Masm.
__
wolfgang
The Basics weren't much to tell. Bernhard could do a few lines on it :)
On 20.01.2021 13:47, paul wrote:
...
I just want to learn about assembly language by running a simple tutorial.
windoze is NOT simple. In terms of easy programming it is the WORST.
Paul,
I press the Windows key & the "r" key, and then I type "cmd"
and then I press the "enter" key. Whatever CLI that happens to
be called, is what I want the program I assemble to work inside of.
The problem is that you can run true (16-bit) DOS programs[1] (using INT 21h >and whatnot) as well as CLI (Command Line Interface - Windows Console) >programs (using the full gamut of Windows DLLs) in there.
[1] Caveat emptor: I'm using Win XP myself. I have no idea if still works >under Win10.
All I'm asking for is a working noob tutorial, with an assembler, on the
most common desktop platform on the planet.
Rod Pemberton wrote:
This is a return to the 8-bit microprocessors of the 1980's.
Yes. (IMHO)
All I'm asking for is a working noob tutorial, with an assembler, on
the most common desktop platform on the planet.
All I want is a working noob tutorial with a working freeware
assembler (on the most common home desktop computing platform on the
planet).
Rod Pemberton wrote:
This is a return to the 8-bit microprocessors of the 1980's.
Yes. (IMHO)
All I'm asking for is a working noob tutorial, with an assembler, on
the most common desktop platform on the planet.
Rod Pemberton wrote:
This is a return to the 8-bit microprocessors of the 1980's.
Yes. (IMHO)
All I'm asking for is a working noob tutorial, with an assembler, on the
most common desktop platform on the planet.
You're jumping in after decades of microprocessor development.
No. (IMHO).
The reason for the yes and for the no is...
Nothing has actually changed even when everything seems to have changed.
Nothing has really changed even when everything seems to have changed.
All I'm asking for... is the lab.
Labs always work.
In a well-designed lab, the learning is in watching it work.
1970's? Which language did you decide was your last to learn? E.g.,
(a) BASIC <== I wrote plenty in the early days of "home computers"
(b) Pascal <== never touched the stuff
(c) Fortran <== of course - every engineer learned Fortran
(d) Cobol <== why I took COBOL then still astounds me today
(e) Lisp <== no but many interpreted software interfaces are similar
(f) C <== no but we used to have to run Makefiles more often then than now >(g) Logo <== never even heard of it
(h) Snobol <== no, thank God
(i) PL/I <== yes, of course - but we called it PL/1 (Pea El One)
(j) Assembly Language <== everyone learned the IBM Assembly language
(k) Shell scripting <== didn't we all learn c-shell & tsh
I used to love Forest Mims' simplicity of TTL code where everybody had the >yellow Texas Instruments books next to the blue National Semiconductor books >for digital and analog chips of the early days of ICs.
The problem is that a noob can't sensibly write anything in assembler
for a modern 64-bit chip.
Whether or not you care to admit it, LOTS
of things have changed since the old days. You say you learned IBM
assembler (700? 360?) ... if you remember any of it that is a good
start, but a modern x86 has a vastly larger instruction set.
You really do need to start with something simpler and work up. There
are plenty of good guides for 8086 assembler. Set up a virtual
machine running DOS or an old version of Windows[*] and learn on that.
Once you get reasonably good at 8086, then tackle 80386.
I teach about 70 noobs every year to write something in assembler for
a modern 64-bit chip, so I obviously disagree.
There may be fewer good guides; but using a search engine ("assembler guide"), I find on the first page two IA-32 guides, one AMD64 guide,
some for other architectures, none for 8086.
Given that, what do you think of this "Understanding Windows x64 Assembly? >https://sonictk.github.io/asm_tutorial/
And, what do you think of these Windows x64 assembly language guides? >https://sonictk.github.io/asm_tutorial/#additionalresources
Yet the guy (sonictk) claims the starting environment only needs to have:
(1) A Windows 10 PC (x64)
(2) He claims we need Emacs https://github.com/sonictk/lightweight-emacs
But, due to muscle memory, I'd vastly prefer editing in GVim (aka "vi")
https://www.vim.org//download.php/#pc
I think it's crazy to need "Visual Studio" just to assemble on a Windows x64 >PC
Anton Ertl wrote:
I teach about 70 noobs every year to write something in assembler for
a modern 64-bit chip, so I obviously disagree.
At some point, rather soon, I'm going to have to give up on asking and just start following _somebody's_ tutorial on my X64 Windows 10 desktop.
Given that, what do you think of this "Understanding Windows x64 Assembly? https://sonictk.github.io/asm_tutorial/
Anyway, I'll write my own tutorial - but it's crazy that I have to do that. All I'm asking in this post is if the sonictk site seems reasonable to you.
Given that, what do you think of this "Understanding Windows x64 Assembly? >> https://sonictk.github.io/asm_tutorial/
now there you got your win64 hello world tutorial :)
Anyway, I'll write my own tutorial - but it's crazy that I have to do that. >> All I'm asking in this post is if the sonictk site seems reasonable to you.
good luck.
Given that, what do you think of this "Understanding Windows x64 Assembly? >>https://sonictk.github.io/asm_tutorial/
Whether it works as a tutorial, is probably
up to you to determine; I have no checklist for assembly tutorials.
wolfgang kern wrote:
Given that, what do you think of this "Understanding Windows x64 Assembly? >>> https://sonictk.github.io/asm_tutorial/
now there you got your win64 hello world tutorial :)
We already had a hello world working in this thread on January 18th.
Message-ID: <ru342u$p8t$1@gioia.aioe.org>
But, as others may recall, it didn't use Microsoft MASM but MASM32 from
http://www.masm32.com/
Which came with its own linker
C:\mypath\masm32\bin\ml.exe /c /Zd /coff hello.asm
C:\mypath\masm32\bin\Link /SUBSYSTEM:CONSOLE hello.obj
Which worked fine following the steps in this hello world tutorial
https://doc.lagout.org/operating%20system%20/Windows/winasmtut.pdf
But that used "MASM32" and not Microsoft MASM (nor NASM).
Nobody responded when I had asked if that's a decent assembler & linker.
For example, can we use _that_ linker instead of the MS Visual C link.exe?
The linker is the important step as it has to work with the assembler.
*Can someone clarify where we can get a decent linker for object modules?*
Success (of sorts), at last (I think) for the 10-step hello world
tutorial.
Following the previous instructions from "Tavis Ormandy" to check the "Individual components" Visual Studio Community 2019 checkbox for
"MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.28)", I finally have
the necessary Microsoft "link.exe" linker installed (I think).
Here's where I am while trying to faithfully follow the tutorial at https://sonictk.github.io/asm_tutorial/
(1) Onto my Win10 x64 20H2 computer, I install the latest Nasm from
https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-installer-x64.exe
(2) I then install the latest Microsoft link.exe from
https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16
(3) After installing Nasm, I check the version of nasm on Windows 10 x64
nasm -v
NASM version 2.15.05 compiled on Aug 28 2020
(4) Then I download the "hello_world.asm" text file to my Win10 x64 system
https://github.com/sonictk/asm_tutorial/blob/master/hello_world.asm
(5) I then assemble that asm file into a hello_world.obj object module
nasm -f win64 -o hello_world.obj hello_world.asm
(6) Then I try the Microsoft Visual Studio Community 2019 linker
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64\link.exe" hello_world.obj /subsystem:console /entry:main /out:hello_world_basic.exe
(7) Drat. Errors result even when I follow the tutorial exactly.
Microsoft (R) Incremental Linker Version 14.28.29336.0
Copyright (C) Microsoft Corporation. All rights reserved.
hello_world.obj : error LNK2001: unresolved external symbol
ExitProcess
hello_world_basic.exe : fatal error LNK1120: 1 unresolved externals
(8) Given "ExitProcess" is the last line, I commented it out & tried
again,
resulting in no errors and the creation of "hello_world_basic.exe"
(9) Yet, when I ran "hello_world_basic.exe" on the Win10 x64 command line
(or in the Win10 x64 File Explorer GUI), it didn't display the
expected
output (it actually displayed nothing - but no errors came out
either).
(10) I tried "ExitProcess@4" as per this stackoverflow question
https://stackoverflow.com/questions/4123013/error-lnk2001-unresolved-external-symbol-messagebox
But what I simply need now is an assembly language program that works
as the point, at the point of a "hello world" is NOT to be debugging
bad assembly language coding (debugging programs should come way later).
https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2001?view=msvc-160
https://social.msdn.microsoft.com/Forums/vstudio/en-US/71a80e19-4e6a-41fe-b1db-26e331da474d/linking-errors-lnk2001-unresolved-external-symbol-when-compiled-by-nasm
http://www.masmforum.com/board/index.php?topic=15872;prev_next=next
So the hello world is, finally, a bit closer to working with the latest
Nasm
& the latest Visual Studio Community 2019, but the syntax in the hello
world
example is, somehow, still a bit wrong for running at the Windows 10 x64 CLI.
advise for a good beginner windoze assembler?
advise for a good beginner windoze assembler?https://flatassembler.net/
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 03:07:42 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
10 files (20,373K bytes) |
| Messages: | 264,422 |