Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
10 crawler(s) on-line.
 31 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 _ThEcRoW:  28 mins ago
 zErec:  32 mins ago
 amigagr:  52 mins ago
 zipper:  1 hr 27 mins ago
 Templario:  1 hr 42 mins ago
 NutsAboutAmiga:  2 hrs 6 mins ago
 clint:  2 hrs 14 mins ago
 arktek3dstudio:  2 hrs 18 mins ago
 amigakit:  2 hrs 53 mins ago
 MEGA_RJ_MICAL:  3 hrs 39 mins ago

/  Forum Index
   /  Amiga Development
      /  Assembly abuse seriously damages (mental) health
Register To Post

Goto page ( Previous Page 1 | 2 )
PosterThread
saimo 
Re: Assembly abuse seriously damages (mental) health
Posted on 4-Jul-2023 22:47:40
#21 ]
Elite Member
Joined: 11-Mar-2003
Posts: 2466
From: Unknown

@Karlos (but replying to everybody, really)

Quote:
@NutsAboutAmiga

Quote:
When is it really needed? (beyond micro optimizing)


I think I see the root of your confusion. Using assembler is not micro optimising. It's what you do when your best efforts to improve the performance of high level code has hit a wall.

Normally you start by choosing the best algorithm and implementing it in your HLL of choice. Then you discover it's still too slow for what you need, so you do some performance analysis, refactor it a bit, test again, micro optimise, change data structures etc.

If after all that, it's still to slow, you are probably already looking at the output assembly to see why. Sometimes this gives you an insight into changes you can make in the HLL to avoid a bottleneck.

For modern CPUs you area almost always hitting some IO limit before you get to the point of needing assembler but for 68K CPUs this isn't the case.

I wholeheartedly agree, but one piece is missing - and you indirectly added it in your next post:

Quote:
It didn't come from that at all. Assembler was popular among Amiga developers in Europe because most of them had graduated from 8 bit machines for which machine code (assembler if you were lucky) was the only realistic choice for implementing games worth playing.

The piece is: when every cycle and/or every byte is needed, assembly is the only way to go.

I often noticed - and this is one of the cases where it happened - that one thing is constantly overlooked: most (or maybe all) of us wouldn't have been here if the Amiga had not had the (relative) success it had, and the success it had was also thanks to the games and the demos, the most astounding of which (i.e. those who contributed most to the Amiga's success) exploited the limited resources of the machine precisely thanks to assembly (and, perhaps even more importantly, direct hardware-hitting).

Disclaimer - I'm not saying that:
* it is _always_ necessary to exploit every cycle and every byte;
* the Amiga succeeded _only_ thanks to the technically remarkable games/demos;
* games/demos which are not entirely/partially written in assembly cannot be amazing.


Quote:
It didn't come from that at all. Assembler was popular among Amiga developers in Europe because most of them had graduated from 8 bit machines for which machine code (assembler if you were lucky) was the only realistic choice for implementing games worth playing.

Languages like C weren't well suited to the task because running C, even a tiny version like DICE on a floppy only system was pure agony. People with expanded machines could of course use it.

Then you get into the performance of it. C isn't particularly slow, but all things are relative. Old compilers didn't optimise code particularly well and unless you were careful to make your code word oriented, wouldn't necessarily be particularly well tuned for vanilla 68000 as 32-bit integers would be thrown around for almost everything.

So you had people already used to controlling the hardware directly using assembler because that's what they were used to already. They weren't "beginners" to assembler.

Sounds plausible - and I'm saying just that only because I don't have the information to confirm it, but I do believe it to be correct.

My personal story is rather different (and I guess kind of peculiar), though - if you have got time to waste with a piece of low-quality narrative, read on...
As a kid, I lived in a small town in the middle-south of Italy. I had a C64 and its (pitifully translated) user manual - and nothing else. No other programming resource, neither friends/contacts who were into programming, neither even the idea that such things as assemblers and compilers existed. As you can imagine, I never managed to achieve much - but I did learn the basics (heh) of programming and create some little proggies.
When I was 16, in 1993, I got an A1200. I was still in the same place and the conditions were the same, but one day a friend told me that he knew somebody who had an Amiga and that he could provide me with a programming environment. Days later, he gave me a copy of AMOS Professional. AMOS Professional enabled me to make the jump to the next level: not only because of what the language offered, but also because of the documentation, which touched on the Amiga hardware (now I can see the flaws of that documenation, but still back then it helped a lot). A few months later, I got to know the owner of the package, who also owned an A4000/040 loaded with all the top software of the day (all in their glorious boxes): AMOS Professional, DevPac, Deluxe Paint IV, Imagine, Art Department Pro, Vista Pro and maybe something else I can't remember. The man (he was 12 years older than me) wasn't into programming, but he had also an M68000 instruction set reference pocket booklet and a book about assembly programming. Given that I had so much to learn and I was far from reaching the limits allowed by AMOS, I started looking into assembly only sometime in 1995. Initially, I did not do much with it. Then, I started making some little experiments and mixing assembly with AMOS. Late that year, I moved city to go to university. The labs of said university opened yet another world to me as, through the internet, I got access to the Amiga hardware documentation. That's when I decided to write my first 100% assembly game, accessing directly the hardware.
Switching to assembly made me realize its power and how it allows to achieve what in other languages is even unthinkable (and also how fun it can be).

Disclaimer: what I say about assembly in this post is relative to the context of machines with limited resources like Amiga, C64 and the likes; things are a bit different on powerful, resourceful machines - but that's another story.

Sad side note: eventually, that A4000 and all the software got stolen :(

_________________
RETREAM - retro dreams for Amiga, Commodore 64 and PC

 Status: Offline
Profile     Report this post  
agami 
Re: Assembly abuse seriously damages (mental) health
Posted on 5-Jul-2023 3:02:21
#22 ]
Super Member
Joined: 30-Jun-2008
Posts: 1718
From: Melbourne, Australia

@machine

I only ever saw 6502 assembly back in my high-school days, when a friend was improving parts of his C64 game.

While most people should never need to know or apply assembly for a given CPU, such are the benefits of upward on onward improvements in technology, there should always be a subset of engineers who are intimate with assembly.

Even fiddling with m68k assembly is relevant in further priming one’s mind for other assembly work, just like that esoteric math in high-school for which you questioned its future applicability.

_________________
All the way, with 68k

 Status: Offline
Profile     Report this post  
cdimauro 
Re: Assembly abuse seriously damages (mental) health
Posted on 5-Jul-2023 5:42:31
#23 ]
Elite Member
Joined: 29-Oct-2012
Posts: 3760
From: Germany

I've started on '82 with BASIC, but then I quickly moved to machine language because BASIC was too much limited and very slow performer with the limited resources available with the home computers of the time. And so on...

Anyway, very old story. Other times, other needs / requirements.

Fortunately the IT progress allowed to get much more resources, more higher level languages, and we, developers and/or software engineers, had the chance to choose which tools to use to solve our problems.


@Karlos

Quote:

Karlos wrote:
@cdimauro

Quote:
Which you are rewriting... in C. 


Only bits of it. I don't consider it likely that the whole thing will be reimplemented, just the parts that make sense.

Which... makes sense.


@kamelito

Quote:

kamelito wrote:
For reverse engineering stuff on Amiga assembly is necessary and using it train my brain so it is good for my health.

I think that it's needed for general reverse engineering.


BTW, the guy still continues with his holy war. I don't know if he's a troll, idiot, or both, but definitely his statements gets me feel dismayed... Probably he's driven by his delirium of omnipotence.

 Status: Offline
Profile     Report this post  
Goto page ( Previous Page 1 | 2 )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle