News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Real APPS real fast with MASM

Started by Raistlin, February 18, 2019, 05:35:16 AM

Previous topic - Next topic

Raistlin

So I did ask the hutch-ism and I believe,
this might be the place for it. Writing
absolutely PURE assembler always for
things others say are impossible or very
implausible. Thus always assembler from
start to finish. The idea is to encourage
style, best practice, anal retentiveness
and obviously the spectacular results. 😈 
I will endeavour to lead by example but
will most probably be overtaken by more
supposedly insane people like me....... 
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

jj2007

Yeah, sounds good :P

Just for curiosity: Are there people out there who have major sources (>10,000 lines) written entirely in assembly?

Raistlin

LOL. jj2007 - dude, obviously me and you and hutch and siekmanski and daydreamer and aw and sinsi and most of the old school guys, the list is thankfully still long; changing  their avatars and names are not going to change coding style. To them: You guys do know your code and personality are one  But anyhow let's see where this leads. REAL code and real results. The moto.
CRAP: jj2007 I hate you (not truely) right now, soooooo
And to continue..for people that have written more than 10k... biterider, NAN, rrr, fhilpe, vortex, bogadan-something, raymond... eish need alcohol now. Dude really ?
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

jj2007

Yes, the list is still long; the usual suspects. DednDave, MichaelW, FORTRANS, Guga come to my mind. I wonder if anybody who has a major source did not become a member here. Maybe in the NASM & FASM communities, but I doubt it.

Raistlin

But that all does present an interesting idea. Major apps in less than 10k lines anyone?  :icon_rolleyes: Just had to ask. 
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

jj2007

Check this one: http://masm32.com/board/index.php?topic=6953.msg74716#msg74716

guga

Raistlin, what do you mean with "Major apps" ?

There are several apps made with assembly that you may consider "major' written with less then 10 k lines such as some examples on the old fellows of demoscene who writes amazing demos with less then 10 kb. https://www.assembly.org/summer18/demoscene .


I don´t know exactly how many "lines" of actual code (not counting the comments) we did in RosAsm the past decade, but...it contains something around 36322 code labels, 9176 data labels, source size = 5163423 bytes, total amount of code instructions = 153420. RosAsm was written completelly in assembly language since the early beginning when it was called SpAsm where the original author (René Tournois) made it also in pure assembly.

14 years ago, Martin, a former RosAsm user made an very good app called "Nessie", a Nintendo - NES Emulator entirely with RosAsm with something around 3000 lines of code without using one single embedded library as well. GGes also has made pretty good games (Arcade stylish) with few lines of code and the list goes on.

And there are the guys who also writes video plugins using assembly for VirtualDub or even Sony Vegas, for example.

JJ made an amazing work with his MasmBasic and RichMasm as well. Hutch also has made a increadible work with masm etc etc. As JJ said, there are still the people on Fasm and Nasm community, not to mention Jeremy Gordon with GoAsm, Bondgan Ontanu the author of SunOS and Hostile Encounters (In 2002), dedndave, the guys at Test Department and even Iczelion as well who pushed the asm community almost 20 years ago.

Siekmanski also do a wonderfull work on code optimizations (A master on that field, IMHO).

I believe this encouragement you said is what we all here are doing since a loooong time :icon_mrgreen: We are old dogs, you know :icon_mrgreen: :icon_mrgreen:
Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

jj2007

Hi Guga, is René still around? On the net you can find this: https://news.ycombinator.com/item?id=14932935

guga

WOW. Nice finding JJ :t :t :t

René has retired a long time ago. The last time i talked to him was in 2008/2009 if i remember well, then i continued with RosAsm trying to updated it from time to time.

I wonder how is he doing today. Just hope he is fine. He was a good friend.
Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

HSE

Quote from: Raistlin on February 18, 2019, 06:49:53 AM
But that all does present an interesting idea. Major apps in less than 10k lines anyone?  :icon_rolleyes: Just had to ask.
1- Have you a counter?
2 - If you have a library used in different projects: how you count that?
3 - If you have an extremely conditional code: what do you do?
Equations in Assembly: SmplMath

Raistlin

Sorry for the delayed response - GMT+2 over here (needed sleep)  ;)

@HSE+guga: Ok, a bit of explaining. Going on to the major informative forums (Quora, scribd, tutorialspoint, wiki etc.)
you'll find assembler is discouraged for any "serious" work. It's all so much easier, faster (development time) and maintainable
in a high-level language. Then also why put yourself through hell - when the compiler does such a "brilliant" job at optimizing
your code. The same holds true from the IT academia I regularly rub shoulders with - never to mind they haven't written a
line of code in years. "We all know assembly language, is the programming language of last resort and only in special
circumstance, mostly only good for inline optimization, if anything" <--- This all gets my noodle  :icon_confused:

I might not have expressed myself well. jj2007 introduced the 10K lines concept, to his auspicious mind, I suspect (ca'nt speak for the man)
the benchmark of large ASM projects. I got pulled in and well... apologies for the misdirection. Now to try and salvage the questions posed.
Although this was never the intention, I must have contracted foot in proverbial mouth syndrome. :icon_rolleyes:
1) Have you a counter ?: Lines of source code can be calculated using COCOMO or Function Points. Only non-automated code,
thus source lines of code (SLOC) should be counted when planning/scheduling/costing a software development. The rule of thumb is to use
thousands of lines of source code (KLOC) as input into the various algorithms.
2) If you have a library used in different projects: how you count that?: they do count, but are normally seen as value-added
code, that promotes re-usability. If you wrote it yourself that is. Calling system/utility type libs only counts the actual effort to write the API interaction.
3) If you have an extremely conditional code: what do you do? : Not sure I understand the question, sorry, could you rephrase ?

PPS: Thanks for the demo-scene links reminder, it's what got me into asm in the first place (1986). I can spend hours watching these over and over again.
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

jj2007

Quote from: Raistlin on February 18, 2019, 05:19:01 PMjj2007 introduced the 10K lines concept, to his auspicious mind, I suspect (ca'nt speak for the man) the benchmark of large ASM projects.

Any measure of "large" or "serious" projects is at best a proxy. Counting the lines of a source that you've written yourself (i.e. not counting the lines of the include files of the Masm32 SDK, for example) is very easy, your editor displays it for you. And in the case of assembly: one line = one instruction, so it's a reasonable proxy for the volume, complexity, whatever of the executable.

Now the question arises of course, where does "large" or "serious" start? Let's have a look at "big" \Masm32\Examples:
1,100 \Masm32\examples\exampl04\jacts\jacts.asm
  945 \Masm32\examples\exampl04\listview\listview.asm
  630 \Masm32\examples\exampl01\qikpad\qikpad.asm


But these are still "examples", not months or years of coding efforts to produce a major application.

What's your opinion on this? Where does a "major", where does a "serious" assembly application start?

daydreamer

#12
Raistlin, I am trying my best to make a great app,why do you think my tiny programs are mostly 3k+?
one of my goal is 1k or 4k or 64k demo one day

suggestions are welcome howto use the remaining 1k+,from less than 3072bytes to 4096bytes
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

HSE

No problem Raistlin. I think you was pondering some stats to take the world  :biggrin:

I used Cocomo almost 20 years ago. It's usefull in self evaluation of a project (asm or not). Specifically in asm, comparing different projects and programmers is misleading, I think. To make that kind of thing you need a more complex method.

Thanks.
Equations in Assembly: SmplMath

aw27

Real programmersTM can do up to 250 keystrokes per minute.
Assuming an average 40 characters per line, to allow for line breaks and white space lines to count as full lines, Real programmersTM can produce 10000 lines of code in a couple of days maximum (yes, they need to sleep well, have relaxed meals and have some time for fun. After all Real programmersTM are also humans).
PS: Of course, Real programmersTM don't produce bugs, so no need to reserve more time.