Discussion:
*Which freeware assembler would you suggest a noob use on Windows nowadays?*
(too old to reply)
Arlen Holder
2020-04-19 01:08:03 UTC
Permalink
*Which freeware assembler would you suggest a newbie use on Windows nowadays?*

It's a one-time use model, where instructions will be provided most likely,
so that others can also assemble this code into a binary executable.

To that end, source code was kindly provided today on the msdos batch ng:
<http://tinyurl.com/alt-msdos-batch>
That source appears to be Intel X86 assembly language code (AFAICT):
<https://groups.google.com/d/msg/alt.msdos.batch/JZMlGo_2__E/T18O5XWjAwAJ>

The question is:
*Which freeware assembler would you suggest a newbie use on Windows nowadays?*

Also, are these the correct newsgroups to be asking this type of question?
<https://groups.google.com/forum/#!forum/comp.lang.asm.x86>
<http://tinyurl.com/alt-lang-asm>
<http://tinyurl.com/alt-comp-freeware>

*Which freeware assembler would you suggest a newbie use on Windows nowadays?*
--
This is the source code:

winmain::
jsr.l (GetCommandLine)
; skip program name
eor.l r1,r1 ; not within "" flag
dec.l r0
_20: inc.l r0
cmp.b #0,(r0)
beq.b _10
cmp.b #'"',(r0)
bne.b _30
not.l r1
_30: or.l r1,r1
bne.b _20
cmp.b #' ',(r0)
bne.b _20
inc.l r0

_10: eor.l r5,r5
move.l #5,r4 ; default: SW_SHOW
_50: movu.bl (r0),r1
inc.l r0
or.b r1,r1
beq.b _40
sub.b #'0',r1
bcs.b _50
cmp.b #9,r1
bhi.b _50
mulsq.l #10,r5,r5
add.l r1,r5
eor.l r4,r4
br.b _50
_40: or.l r4,r4
beq.b _60
move.l r4,r5

_60: jsr.l (GetConsoleWindow)

move.l r5,-(sp)
move.l r0,-(sp)
jsr.l (ShowWindow)

moveq.l #0,-(sp)
jsr.l (ExitProcess) ; exit program
B. R. 'BeAr' Ederson
2020-04-19 07:12:29 UTC
Permalink
Post by Arlen Holder
*Which freeware assembler would you suggest a newbie use on Windows nowadays?*
It's a one-time use model, where instructions will be provided
If instructions are provided, then (as someone unfamiliar with assembly
language) you should use the very assembler, for which the code was
originally written for. Else, you not only would need to familiarize
yourself with the usage of the assembler, but also with the specifics
of different notation styles. This is especially the case, if the used
mnemotics and notation differ considerably from the ones usually used
[...]
Post by Arlen Holder
<https://groups.google.com/d/msg/alt.msdos.batch/JZMlGo_2__E/T18O5XWjAwAJ>
| winmain::
| jsr.l (GetCommandLine)
| ; skip program name
| eor.l r1,r1 ; not within "" flag
| dec.l r0
| _20: inc.l r0
| cmp.b #0,(r0)
| beq.b _10
| cmp.b #'"',(r0)
| bne.b _30
| not.l r1
| [...]

This is syntax specific to the assemblers written by Herbert Kleebauer,
himself. In this case probably Windela.

Apart from this, the code was posted as a (for most people) really extreme
approach to a problem, which already has lots of other possible solutions,
as you know from your main thread(s) about hiding a console window on
execution. Therefore, for anybody not interested in the beauty of creating
solutions in assembly language, this approach is otios to begin with.
Post by Arlen Holder
Which freeware assembler would you suggest a newbie use on Windows nowadays?
A whole different question and will provide lots of suggestion, depending
on who you're asking. NASM can be considered a good starting point, though:

https://www.nasm.us

BeAr
--
===========================================================================
= What do you mean with: "Perfection is always an illusion"? =
===============================================================--(Oops!)===
Arlen Holder
2020-04-21 04:27:50 UTC
Permalink
In response to what "B. R. 'BeAr' Ederson"
Hi BeAr Ederson,

We go way back over the years, where I thank you very much for your
purposefully helpful response letting me know what assembly language the
original code was written in (which I had not recognized as you did).

Bear in mind, I learned the IBM assembly language way back in the 70s, and
then when the AT came out, I used the classic Peter Norton & Jeff Duntemann
references back in the day of paper books as shown here from my shelves:
<Loading Image...>

Other than building Motorola 68701-based wire-wrapped microcontrollers in
the mid 80s from SAMS books, I haven't touched assembly language (or hex
code) since; so almost all has been forgotten.

I will take your NASM advice as I already tried MASM and failed to install
just the bare-bones MASM (i.e., outside of Visual Studio), as shown here:
<https://www.microsoft.com/en-us/download/details.aspx?id=12654>
Name: MASMsetup.EXE
Size: 317712 bytes (310 KiB)
SHA256: C0EA31A8D37C789530B5FC2A21DD9801DCBD1CBD6174F9F76219485DC621A35F

I will try NASM where, decades ago, I had used masm, wasm, dasm, & chasm;
but all I want now is to assembly a simply x86 hello-world program.
<https://stackoverflow.com/questions/12574924/hello-world-using-nasm-in-windows-assembly>
--
Note the duplicate threads were my mistake because I hadn't realized one ng
was moderated, which caused a day delay between sending the article & it's
receipt on this newsgsroup (I mistakenly thought it was the newsserver).
Loading...