• Assembly even in good times

    From Stone Fox@stone@unix.dog to alt.lang.asm on Mon Feb 3 20:00:06 2025
    From Newsgroup: alt.lang.asm

    People use to write everything in Assembly because it was necessary to
    meet computational limitations.

    Now most people write in high level langauges because the computers are powerful enough to permit a lot of wasted bytes. As a result, people
    must use descipline to write everything in Assembly instead of these
    higher level langauges.

    The unsustainability of writing in high level languages might not be
    obvious now, but it will be post-collapse when there is no massive
    corporation left to manufacture the powerful computers that no single
    human could possibly understand or afford to make, making Assembly once
    again necessary for the small 4-bit computers a single human /could/
    afford to make.

    Even in good times (when lots of computational resources are
    available), a squirrel will hide his nuts because winter time (the
    return to limited computational resources) is coming.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to alt.lang.asm on Tue Feb 4 09:24:10 2025
    From Newsgroup: alt.lang.asm

    Fox,

    As a result, people must use descipline to write everything in
    Assembly instead of these higher level langauges.

    There is zero reason to do *everything* in Assembly. Just imagine yourself being told you can't use a car or other transporation method to do your shopping miles away, you *must* always walk. Following that suggestion
    would be a waste of your time and energy.

    There are good reasons to use high(er)-level languages, just as there are
    good reasons to use a pocket calculator instead of depending on our (feeble) minds.

    but it will be post-collapse when there is no massive corporation
    left to manufacture the powerful computers that no single human
    could possibly understand or afford to make,

    My, aren't you the optimistic thinker. :-)

    But I'm afraid that in that case computers will rapidly become the last
    thing on our minds. Locally growing our food, using pointed sticks to open the earth to sow seeds for next-years harvest, will be prevalent in our
    minds.

    Besides, powering the generators that provide electricity for thr computers
    to run will have its own problems (Mel Gibsons "Road Warior" comes to mind).

    No, try to make arguments that a current human (kids and adults alike) can relate to. Like not knowing what your 'puter/program is actually doing
    tends to lead to making bad/wastefull decisions in relation to how to solve
    a programming problem.

    One of my own favorite examples is how I saw someone extract a certain bit from a value by by taking two-to-the-power-of the sought-for bit, dividing
    the value by it and than doing a "mod 2".

    As an Assembly programmer you probably will realize that all of that can be done with a single command, putting the result in the Carry flag.


    No, my more immediate concern is that, as I've been told, glass-fiber will
    go dark when an atomic bomb is detonated near enough to it. When that happens, how will I than be able to watch my wresting shows ? :-)

    Regards,
    Rudy Wieser


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From John Ames@commodorejohn@gmail.com to alt.lang.asm on Tue Feb 4 07:44:08 2025
    From Newsgroup: alt.lang.asm

    On Tue, 4 Feb 2025 09:24:10 +0100
    "R.Wieser" <address@is.invalid> wrote:

    There is zero reason to do *everything* in Assembly. Just imagine
    yourself being told you can't use a car or other transporation method
    to do your shopping miles away, you *must* always walk.

    As with walking, novelty and exercise are reasons!

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to alt.lang.asm on Tue Feb 4 18:44:51 2025
    From Newsgroup: alt.lang.asm


    John

    There is zero reason to do *everything* in Assembly. Just
    imagine yourself being told you can't use a car or other
    transporation method to do your shopping miles away, you
    *must* always walk.

    As with walking, novelty and exercise are reasons!

    In your case I would demand you to stop being a bling-bling hussy as well as to stop being pre-occupied with your health.

    I mean, you get *tired* from walking, which can, I'm told, lead to collapses and even death. Which is a *very* good reason not to engage in it. Unless you have a death-wish ofcourse. :-)

    Regards,
    Rudy Wieser


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Rosario19@Ros@invalid.invalid to alt.lang.asm on Wed Feb 5 18:00:12 2025
    From Newsgroup: alt.lang.asm

    On Mon, 3 Feb 2025 20:00:06 -0000 (UTC), Stone Fox <> wrote:
    People use to write everything in Assembly because it was necessary to
    meet computational limitations.

    Now most people write in high level langauges because the computers are >powerful enough to permit a lot of wasted bytes. As a result, people
    must use descipline to write everything in Assembly instead of these
    higher level langauges.

    The unsustainability of writing in high level languages might not be
    obvious now, but it will be post-collapse when there is no massive >corporation left to manufacture the powerful computers that no single
    human could possibly understand or afford to make, making Assembly once
    again necessary for the small 4-bit computers a single human /could/
    afford to make.
    yes this could happen, because languages not scale well...
    i think that assembly and a subset of C++ has no prblem
    Even in good times (when lots of computational resources are
    available), a squirrel will hide his nuts because winter time (the
    return to limited computational resources) is coming.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Stone Fox@stone@unix.dog to alt.lang.asm on Thu Feb 6 00:21:41 2025
    From Newsgroup: alt.lang.asm

    There is zero reason to do *everything* in Assembly. Just imagine yourself being told you can't use a car or other transporation method to do your shopping miles away, you *must* always walk. Following that suggestion would be a waste of your time and energy.

    There are good reasons to use high(er)-level languages, just as there are good reasons to use a pocket calculator instead of depending on our (feeble) minds.

    I agree. I think it's also important to write Forth. Forth, in your
    analogy, would be like riding a bicycle instead of walking. It's a
    little more convenient while still having many of the benefits of
    walking.

    It's interesting you made that analogy, though, because just yesterday
    I walked a total of 15 miles to visit a few stores around the city,
    because I refuse to use public transportation and cannot yet afford a
    bicycle.

    And I will admit, it was costly, taking up most of my day and energy.
    Though a bicycle would have been preferable, I like the cost because it
    forces me to think how to make the trip worth the effort by adding
    multiple stores along the route, and to make sure I make the most of
    each visit so such an expensive trip is not needed again for a few
    weeks.

    In short, I like how it forces me to think. It makes every trip feel
    like a pioneer journey on the Oregon Trail, something that cannot
    happen often and requires great planning.

    So to make a large program in Assembly or Forth, I must be sure the
    program I'm building is valuable enough to justify the effort.

    But I'm afraid that in that case computers will rapidly become the last thing on our minds. Locally growing our food, using pointed sticks to open the earth to sow seeds for next-years harvest, will be prevalent in our minds.

    Yes, there are many possible scenerios where electronic computers would
    be an impossible burden, even in the simpliest form. But a computer
    programmer could still use a bean computer, that require nothing but
    beans and a floor.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to alt.lang.asm on Thu Feb 6 07:39:53 2025
    From Newsgroup: alt.lang.asm

    Fox,

    I agree. I think it's also important to write Forth.

    I'm sorry, but I simply don't like high(er)-level languages. :-)

    But to be honest, I have no idea what about that language appeals to you, so
    I can't say if it would be important.

    Personally I would suggest to pick up a small microcontroller (low on memory and speed) and program it(s risk based language) using Assembly. You will
    find all kinds of interresting/weird things forcing you to think to find solutions.

    Added bonus : adressing an output pin gives, with a LED or buzzer on it, a direct, visible/audible result - making it less than a purely mental
    exercise.

    It's interesting you made that analogy, though, because just
    yesterday I walked a total of 15 miles to visit a few stores
    around the city,
    ...
    it forces me to think how to make the trip worth the effort by
    adding multiple stores along the route, and to make sure I make
    the most of each visit

    Yep. Considerations that are easily lost when you have a car available.
    Its not bad, It just happens. But realizing the cost of that might make
    some people think a bit about what they're doing, and as a result being more efficient.

    So to make a large program in Assembly or Forth, I must be sure
    the program I'm building is valuable enough to justify the effort.

    For some reason I've never been able to make big programs. I mostly write tools/supporting programs, and those always stay rather small. As such I wonder about what all has been put into hundreds of kilobytes (upto multi-megabyte) tools that I sometimes see.

    Though to be honest, I have no qualms using third-party DLLs (like
    FreeImage, SQLite, OpenSSL, etc), which sometimes are "pretty big" (a meg or so) too.

    But a computer programmer could still use a bean computer, that
    require nothing but beans and a floor.

    I have no idea what a "bean computer" is - other than something predating an abacus - and a quick websearch did not turn up anything either.

    But if you mean an early form of abacus you do realize that you've than
    become a literal "bean counter" ? :-)

    Its also a very environmental-concious use of resources though : if your "computer" crashes you can always eat the beans ...

    Regards,
    Rudy Wieser



    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Stone Fox@stone@unix.dog to alt.lang.asm on Thu Feb 6 15:39:02 2025
    From Newsgroup: alt.lang.asm

    I'm sorry, but I simply don't like high(er)-level languages. :-)

    But to be honest, I have no idea what about that language appeals to you, so I can't say if it would be important.

    Forth is only slightly higher level than Assembly. I like it because
    it's portable and simple to implement, unlike C. I can write a Forth
    system in Assembly for every platform I want to support, and then write
    all the programs in Forth.

    I don't understand Assembly well enough to write a Forth system yet, so
    almost everything I write now is Assembly.

    Personally I would suggest to pick up a small microcontroller (low on memory and speed) and program it(s risk based language) using Assembly. You will find all kinds of interresting/weird things forcing you to think to find solutions.

    Added bonus : adressing an output pin gives, with a LED or buzzer on it, a direct, visible/audible result - making it less than a purely mental exercise.

    Yep! I'm doing that now with a Raspberry Pi Zero. I have an ST
    microcontroller too, but I have yet to find a plain text manual for it;
    I can't read PDF in my terminal. If feels good to do simple task like
    blink LED in Assembly, because it depends on nothing except propertary bootloader and Assembler.

    I have no idea what a "bean computer" is - other than something predating an abacus - and a quick websearch did not turn up anything either.

    But if you mean an early form of abacus you do realize that you've than become a literal "bean counter" ? :-)

    Its also a very environmental-concious use of resources though : if your "computer" crashes you can always eat the beans ...

    I don't remember the website, but I do know it was the permacomputing
    rabbit hole that led me to it. There was also something about computing
    by moving blocks to make shadows, very creative ways to do computing
    with basic items.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From wolfgang kern@nowhere@never.at to alt.lang.asm on Fri Feb 7 06:53:50 2025
    From Newsgroup: alt.lang.asm

    On 06/02/2025 16:39, Stone Fox wrote:
    I'm sorry, but I simply don't like high(er)-level languages. :-)

    me too, I hate detouring bloatware producing HLL.
    welcome to the world where things are made from real things :)

    I even discarded almost all ASM tools because they all got restrictions
    and are of limited use because they think to be smarter than a human but
    may compile lots of unwanted lines or need ~20 directives to behave.
    SO, my way was/still is bare metal coding in byte-wise hexadecimal.
    THIS IS absolutely free of any restrictions and I've done it for a vast
    amount of different 4/8/16/32-bit MCU's and finally also for 64-bit
    CPU's. All I had to do was to create my own tools [on Z80 and AMD86..]
    __
    wolfgang
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to alt.lang.asm on Fri Feb 7 08:26:53 2025
    From Newsgroup: alt.lang.asm

    wolfgang,

    I'm sorry, but I simply don't like high(er)-level languages. :-)

    me too, I hate detouring bloatware producing HLL.
    welcome to the world where things are made from real things :)

    I even discarded almost all ASM tools because they all got restrictions
    and are of limited use because they think to be smarter than a human but
    may compile lots of unwanted lines or need ~20 directives to behave.

    I'm assuming the ASM in the above was ment to be C{something} .(?)

    That, the "I'm so smart, I can rewrite your code so its smaller/faster. Oh look, I think you are not even using that part, lets remove it", is why I
    I'm suspicious of compilers.

    My Assembler does have a couple of features (procedure wrappers and
    arguments on the same line as the call to them), but those don't try to rewrite what I penned down. If (when) I write something stupid than that is what it will put in the executable. And that is what I expect it to be doing.

    SO, my way was/still is bare metal coding in byte-wise hexadecimal.

    I've done that a few times (in my early x286 years), but as I can-and-did go thru the listing file my Assember generates and see that exacly converts
    what I've written I didn't continue on that path.

    THIS IS absolutely free of any restrictions and I've done it for a vast amount of different 4/8/16/32-bit MCU's and finally also for 64-bit CPU's. All I had to do was to create my own tools [on Z80 and AMD86..]

    If need be I can always insert them as a sequence of bytes. Similar to what the ASM directive in C{something} does.

    (Gripe, gripe, gripe) ... though I *really* could have used a method to put differently-sized values (byte word, double, string, etc) on the same data line. That would have looked *sooo* much better (here feature-creep, where are you ?) :-)

    All I had to do was to create my own tools [on Z80 and AMD86..]

    Although I've written disassemblers for a few processors/micro-controllers,
    I never felt the need to featurise them. Other than creating a version
    which "traced" a program, generating a listing with assembly code and byte data.

    Bottom line, although I thoroughly enjoy writing assembler code, its always
    as a means to a(nother) goal.

    Regards,
    Rudy Wieser


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From wolfgang kern@nowhere@never.at to alt.lang.asm on Fri Feb 7 10:14:21 2025
    From Newsgroup: alt.lang.asm

    On 07/02/2025 08:26, R.Wieser wrote:

    I even discarded almost all ASM tools because they all got restrictions
    and are of limited use because they think to be smarter than a human but
    may compile lots of unwanted lines or need ~20 directives to behave.

    I'm assuming the ASM in the above was ment to be C{something} .(?)

    No, I never used C and never ever will use that crap.
    I meant inline ASM, like these stupid variations in Power-Basic and
    friends. I also meant MASM,TASM,NASM,BASM,QASM,etc...

    I liked early RosAsm for 32 bit windoze because it allowed me to enter
    DB xx xx ... hex-lines anywhere in between other assembler lines.
    __
    wolfgang
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to alt.lang.asm on Fri Feb 7 11:44:35 2025
    From Newsgroup: alt.lang.asm

    wolfgang,

    I'm assuming the ASM in the above was ment to be C{something} .(?)

    No, I never used C and never ever will use that crap.

    I've used several versions of it, including on a RPi (GCC). Not much mind you, but enough to get a bit of a feeling for it.

    I meant inline ASM, like these stupid variations in Power-Basic and
    friends.

    I've never used that. I did use QBasic (which came free with my thanwhile
    DOS version), where you had to do a bit of work to "load" the program data
    and call it. It allowed me to add mouse (and other) stuff.

    I also meant MASM,TASM,NASM,BASM,QASM,etc...

    Oh whait a minute there : you're not going to trash-talk my Borlands Tasm
    (16 and 32 versions), are you now ? :-)

    I liked early RosAsm for 32 bit windoze because it allowed me to enter DB
    xx xx ... hex-lines anywhere in between other assembler lines.

    I took the avalailability of DB and DW as a given. I can't remember an assembler (X86 or otherwise) which refused them when encountered in a code block.

    Regards,
    Rudy Wieser


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From wolfgang kern@nowhere@never.at to alt.lang.asm on Fri Feb 7 19:59:13 2025
    From Newsgroup: alt.lang.asm

    On 07/02/2025 11:44, R.Wieser wrote:

    I'm assuming the ASM in the above was ment to be C{something} .(?)
    No, I never used C and never ever will use that crap.

    I've used several versions of it, including on a RPi (GCC). Not much mind you, but enough to get a bit of a feeling for it.

    I meant inline ASM, like these stupid variations in Power-Basic and
    friends.

    I've never used that. I did use QBasic (which came free with my thanwhile DOS version), where you had to do a bit of work to "load" the program data and call it. It allowed me to add mouse (and other) stuff.

    I also meant MASM,TASM,NASM,BASM,QASM,etc...

    Oh whait a minute there : you're not going to trash-talk my Borlands Tasm
    (16 and 32 versions), are you now ? :-)

    TASM is for sure the worst I ever checked on :)
    NASM and FASM were/are better by several magnitudes.

    I liked early RosAsm for 32 bit windoze because it allowed me to enter DB
    xx xx ... hex-lines anywhere in between other assembler lines.

    I took the avalailability of DB and DW as a given. I can't remember an assembler (X86 or otherwise) which refused them when encountered in a code block.

    Yeah DB were available on almost all assemblers, but (I don't remember
    which ones) some couldn't work on DB blocks and had to use single byte
    DB per line while others "embraced" every DB with push/pop or destroyed (ax/dx) registers.

    just try this on your TASM_16:
    DB 0x66
    MOV ax,0x0001
    DW 0x8000
    __
    wolfgang
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to alt.lang.asm on Fri Feb 7 22:09:52 2025
    From Newsgroup: alt.lang.asm

    wolfgang,

    Yeah DB were available on almost all assemblers, but (I don't remember
    which ones) some couldn't work on DB blocks and had to use single byte DB per line while others "embraced" every DB with push/pop or destroyed
    (ax/dx) registers.

    I've worked with an Atmel Mega32, which stores strings two chars a time in "code space" (opcodes where .. 18 bits a piece?) The Assembler always
    aligned the strings on a two-byte boundary, meaning I could not create a multi-string list (A Windows term? - a list of zero-terminated strings terminated by a zero byte) when any string had an even length (odd when including the string terminatior). The microcontollers forum members didn't even seem to understand what I was talking about. In the end I wrote a (rather simple) pre-processor which would stitch strings together when I
    would put them in a block. (using delimitor peudo-commands).

    It also removed un-used bytes, which could make the difference between a progam /just/ fitting or not. :-)

    just try this on your TASM_16:
    DB 0x66
    MOV ax,0x0001
    DW 0x8000

    Doesn't that 0x66 cause EAX to be loaded instead of just AX, with the 0x8000 becoming the higher part of the constant ?

    Regards,
    Rudy Wieser


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From wolfgang kern@nowhere@never.at to alt.lang.asm on Sat Feb 8 03:44:24 2025
    From Newsgroup: alt.lang.asm

    On 07/02/2025 22:09, R.Wieser wrote:

    I've worked with an Atmel Mega32, ...

    AMtel ?

    I could tell funny things about my solutions on 1802, 2650 and 6201 MCs.

    just try this on your TASM_16:
    DB 0x66
    MOV ax,0x0001
    DW 0x8000

    Doesn't that 0x66 cause EAX to be loaded instead of just AX, with the 0x8000 becoming the higher part of the constant ?

    yeah it should compile to:

    66 b8 01 00 00 80 mov eax,0x08000_0001

    but I doubt that ye olde TASM would do that :)
    __
    wolfgang
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to alt.lang.asm on Sat Feb 8 08:20:26 2025
    From Newsgroup: alt.lang.asm

    wolfgang,

    I've worked with an Atmel Mega32, ...

    AMtel ?

    This one :

    https://www.alldatasheet.com/datasheet-pdf/pdf/77378/ATMEL/ATMEGA32.html

    yeah it should compile to:

    *Assemble* if you please ! :-)

    66 b8 01 00 00 80 mov eax,0x08000_0001

    but I doubt that ye olde TASM would do that :)

    I just checked, and my Borlands Tasm v1.01 from 1989 as well as Tasm32 v5
    1998 does that. I guess my assemblers do exactly as they are told ? :-)

    But, can you tell me whats special about it ? I was thinking your
    assemblers perhaps collapsed (how ? No idea) the 0x0001 into a single byte (causing the value to become 3 bytes instead of 4, throwing everything off), but that doesn't even happen in 32-bit assembly when loading EAX.

    I could tell funny things about my solutions on 1802, 2650 and 6201 MCs.

    I could tell you a few sad things about my Borland Tasm32 v5. Like when I create a so-called "struct" and name two fields the same (copy-pasting and forgetting to change) the assembler just crashes. :-(

    I've gathered a number of "gotcha"s over the years. Than again, I'm aware
    of them (or at least quick enough to remember what is happening), so all is good, right ? :-\

    Regards,
    Rudy Wieser


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From wolfgang kern@nowhere@never.at to alt.lang.asm on Sat Feb 8 12:52:09 2025
    From Newsgroup: alt.lang.asm

    On 08/02/2025 08:20, R.Wieser wrote:

    I've worked with an Atmel Mega32, ...
    AMtel ?
    This one :

    https://www.alldatasheet.com/datasheet-pdf/pdf/77378/ATMEL/ATMEGA32.html

    thx I never heard of it before.


    yeah it should compile to:
    *Assemble* if you please ! :-)

    :) assembler tools "compile" what the programmer ass samples.

    66 b8 01 00 00 80 mov eax,0x08000_0001

    but I doubt that ye olde TASM would do that :)

    I just checked, and my Borlands Tasm v1.01 from 1989 as well as Tasm32 v5 1998 does that. I guess my assemblers do exactly as they are told ? :-)

    seems I checked on it some years earlier (~1984)
    it just didn't compile it (source error).

    I'll be out for a while ...
    __
    wolfgang


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to alt.lang.asm on Sat Feb 8 13:38:48 2025
    From Newsgroup: alt.lang.asm

    wolfgang,

    https://www.alldatasheet.com/datasheet-pdf/pdf/77378/ATMEL/ATMEGA32.html

    thx I never heard of it before.

    I liked the one with the actual 0.1 inch (2.54 mm) spaced-apart pins, as
    those where easy to use on breadboards and to design (single-layer) layouts for. Yup, electronics whas also a hobby of mine.

    *Assemble* if you please ! :-)

    :) assembler tools "compile" what the programmer ass samples.

    I heard the difference being explained thus : when you assemble everything
    you gather is present in the result (nothing is omitted, nothing is
    changed). When you compile you gather everything, extract what you think it means and return that as the result. Pretty-much exactly the difference between what aan Assembler and Compiler does.

    seems I checked on it some years earlier (~1984)
    it just didn't compile it (source error).

    Maybe that was one of those where you couldn't mix data pseudo-ops with code
    ?

    Regards,
    Rudy Wieser


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm on Sat Mar 1 11:25:56 2025
    From Newsgroup: alt.lang.asm

    On Sat, 8 Feb 2025 12:52:09 +0100
    wolfgang kern <nowhere@never.at> wrote:
    []

    I'll be out for a while ...

    Back yet, or was that a paraphrase of Captain Oates's last words?
    --
    Bah, and indeed, Humbug
    --- Synchronet 3.21d-Linux NewsLink 1.2