The MASM Forum

General => The Campus => Topic started by: rrr314159 on January 01, 2015, 12:32:35 PM

Title: I am not a spambot ...
Post by: rrr314159 on January 01, 2015, 12:32:35 PM
Hi everyone, just joined and am complying with the requirement to post something human. I'm reminded of Patrick McGoohan (#6) shouting "I am not a number!" (If you don't remember that, congrats on your low age.)

I've been reading your posts for quite a while and they've been very valuable (or, "invaluable" - which curiously enough means the same, instead of the opposite). Thanks hutch for your site and for Masm32; I'd thank many others also but would inevitably leave someone out. Still, dedndave deserves special mention. Thanks All!

Long ago I was a world-class 8080 programmer. There were no decent assemblers; I knew the octal codes by heart. Since then I've used various languages but have now returned to "machine language". It's always been the best. HLL's are like showering with a raincoat on, or eating with knife and fork; with assembler we get down to the nits and grits. I know 32-bit and am just getting into 64; may ask some dumb q's on that forum one of these days.

Ok - no bot could write those 3 paras. (Altho within 100 years, perhaps less, they will be able to.)

Title: Re: I am not a spambot ...
Post by: jj2007 on January 01, 2015, 12:44:26 PM
That was a nice intro :t
Happy New year, and welcome to the forum :icon14:
Title: Re: I am not a spambot ...
Post by: Gunther on January 01, 2015, 12:57:05 PM
Hi rrr314159,

welcome to the forum and my best wishes for a good year 2015. So you're back to the roots now.

Gunther
Title: Re: I am not a spambot ...
Post by: anunitu on January 01, 2015, 12:59:05 PM
I am old enough to know that is from the "prisoner" and might even be older than yourself.

And Dedndave is our "Special" little guy..(Sorry Dave,but I know even you would fine that funny)
Title: Re: I am not a spambot ...
Post by: hutch-- on January 01, 2015, 01:25:59 PM
Hi rrr,

good to hear the voice of experience.  :biggrin:
Title: Re: I am not a spambot ...
Post by: dedndave on January 01, 2015, 03:24:30 PM
welcome to the forum   :t

and, thanks for the mention, but others are probably more deserving
i learned from them, afterall
i simply have a little more free time than some of the others,
so i can take the time to explain some basics
Title: Re: I am not a spambot ...
Post by: hutch-- on January 01, 2015, 04:53:32 PM
He was an interesting guy Patrick McGoohan, I am old enough to have watched that series on TV but I best remember him as as the king on Mel Gibson's Brave Heart, Edward "Longshanks". I was even more impressed with Sophie Marceau and having seen here in a much later movie, she is just as impressive.

(https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcScHWygXtoLapUX-TIkhlNKwuI9E8Qn9q5k06yTH5UCkctArSaRgg)

(https://static.yts.re/attachments/braveheart_(1995)/N5xEQ_large.png)
Title: Re: I am not a spambot ...
Post by: Siekmanski on January 01, 2015, 10:45:02 PM
Welcome to the forum and a Happy New Year.
Title: Re: I am not a spambot ...
Post by: dedndave on January 02, 2015, 04:03:01 AM
Sophie will always be a favorite   :P
Title: Re: I am not a spambot ...
Post by: rrr314159 on January 02, 2015, 09:56:12 AM
Hello and Happy New Year!

jj2007 - thanks!

gunther - I may soon be asking dumb q's on the 64-bit forum, c u there; hope qword takes it easy on me :)

anunitu - u may well have me beat - I'm 63 and proud of it ...

Dedndave - hope I didn't annoy anyone equally deserving, but when I was a noobie yours was definitely the most noticeable presence. True, others know more about certain topics (such as 64-bit) and are generous with their time. BTW we're very lucky retirees to have such a hobby to fill up those "unforgiving minutes"; I know some who are slowly going out of their minds with boredom.

hutch - Yes, Sophie is a lot easier on the eyes than McGoohan

- Siekmanski, thx - if that's your picture u must be getting tired of nostalgia by now

Meanwhile I'm wrestling with SSE, AVX, JWasm, VC13, Pelles, Wininc, ML64 (which, as it turns out, seems redundant). Reminiscing is fun but this stuff is better. Hope to soon be able to help answer q's from even-newer noobies.

Title: 4 hours ...
Post by: rrr314159 on January 02, 2015, 03:13:09 PM
Update - I just spent 4 hours getting this darn thing to say "hello world" in 64-bit-ese, and am beginning to think 32 bits is good enough! We used to get the job done with 8 bits, after all ... and the salary was a lot better. The stack was easy to handle - just keep it aligned to 1 byte. I went thru most of the posts in the 64-bit forum; you guys are so far ahead it's scary. Oh well, maybe things will look brighter in the morning ...
Title: Re: I am not a spambot ...
Post by: dedndave on January 02, 2015, 03:47:31 PM
64-bit code is a bit tricky, mainly due to stack alignment
but - good to learn, i guess
even though i am no big fan of 64-bit, it seems inevitable that everything will be 64-bit in the near future

32-bit code is a bit easier to learn, so may still be a good starting point
Title: Re: I am not a spambot ...
Post by: hutch-- on January 02, 2015, 07:50:41 PM
rrr,

JWASM seems to be the best of the lot so far in 64 bit but like everyone else, I have yet to put enough time into getting used to the quirks of 64 bit stack alignment. I still have a lot to do in 32 bit and its far more elegant within its capacity.
Title: Re: I am not a spambot ...
Post by: Siekmanski on January 02, 2015, 08:23:41 PM
Quote from: rrr314159 on January 02, 2015, 09:56:12 AM

- Siekmanski, thx - if that's your picture u must be getting tired of nostalgia by now

It just reminds me how handsome i was 35 years ago.   :biggrin:
Title: Re: I am not a spambot ...
Post by: Gunther on January 03, 2015, 02:26:47 AM
Hi  rrr314159,

or should I say Pi? If you're real interested in 64-bit windows programming, you could use that thread (http://masm32.com/board/index.php?topic=1892.0) as a starting point. There are other useful threads, too. You should give a try 64-bit coding.

Gunther
Title: Re: I am not a spambot ...
Post by: rrr314159 on January 03, 2015, 05:11:02 PM
Thanks all .. after a good night's rest I put in an all-dayer, and got over the hump ... starting to convert some of my old projects. It's challenging, but what else am I going to do with all this free time? BTW Siekmanski, that was a great haircut.
Title: Re: I am not a spambot ...
Post by: jj2007 on January 03, 2015, 07:24:09 PM
Quote from: hutch-- on January 02, 2015, 07:50:41 PMI still have a lot to do in 32 bit and its far more elegant within its capacity.

I fully agree. Quote from an old post: (http://masm32.com/board/index.php?topic=402.msg7769#msg7769)
Quote
64-bit certainly is the future, but 32-bit will be around for a long while. I am still using 16-bit apps, even on a Win7-64 system in a VM.

As to speed, it still has to be proven that 64-bit apps are faster. You rarely run out of registers, especially in fast innermost loops that won't call slow Win APIs. And 64-bit code eats up cache, so on balance it's hard to prove that 64-bit code is "faster". Of course, there will be quite a number of applications that can be done faster, e.g. for videos or image processing.

But the transition 32->64 cannot be compared to the (still incomplete) 16->32 bit transition. When porting 16-bit code to 32 bits, you get a huge speedup, and the address space jumps from a tiny 65K to 4 gigs. To visualise that step: a typical 500*600 pixel JPG fits into 65k (so 16 bits of address space are indeed a little bit tight :(). The largest Hubble image so far is 15852*12392 pixel, that requires a 3x2.5 meter screen. To fill the 4 gigs of 3-bit mode address space, you need a 180x150 meter screen. I can afford my notebook, but I cannot afford a screen as large as two football camps...

IMHO it's 99% a marketing trick to force users buying new hardware. And 32-bit code still runs absolutely fine on Windows, and will continue to run fine throughout this century :biggrin:
Title: Re: I am not a spambot ...
Post by: Gunther on January 04, 2015, 02:12:32 AM
Jochen,

Quote from: jj2007 on January 03, 2015, 07:24:09 PM
IMHO it's 99% a marketing trick to force users buying new hardware. And 32-bit code still runs absolutely fine on Windows, and will continue to run fine throughout this century :biggrin:

that's debatable. What you call a marketing trick is in most cases brutal reality. Please, try to buy a computer without a 64-bit operating system pre-installed, at least here in Germany. Perhaps there's another situation in Italy. Of course, we could clean the entire disk from the pre-installed garbage and configure the machine to our taste. But the average user can't do this, I think.

Gunther
Title: Re: I am not a spambot ...
Post by: daydreamer on January 04, 2015, 04:16:40 AM
welcome m314159
Title: Re: I am not a spambot ...
Post by: rrr314159 on January 05, 2015, 01:34:08 PM
Good 2 meet u, daydreamer2!

Re 32 vs 64, must admit that originally I thot 64 bit was necessary for XMM/YMM registers; that's why I particularly wanted it. Turns out that's not the case, but still, 32-bit ML gives me only the first 8 YMM's; ML64 (or equivalent) does all 16. That's a hardware limitation, not just crippled software, I believe (please correct me if wrong). The extended REX.R encoding (or whatever it is) requires 64-bit mode to provide the extra bit to specify the top 8 registers. There also seem to be some extra instructions available - but not sure, I'll be able to tell you in a while. Unfortunately 64-bit does NOT seem to support (most) integer ops on YMM, and no FMA, scatter/gather, etc. I thot they'd come with ML64 (or, as it turns out, I'm using JWasm); but, I'm afraid, they're not in the hardware at all. At any rate, the extra 8 YMM registers is a huge plus. And of course, the extra 8 GPR's are very nice also (twice the width, too). jj2007, I can't agree that "You rarely run out of registers" with the old 8. Don't forget that's really just 6, since ebp and esp are usually dedicated elsewhere; the increase is not merely 8 to 16, but 6 to 14. I constantly find (I mean, found) myself juggling them, and "spilling" them, and wishing there were more.

Then there's the much simpler 64 architecture; only fastcall, no stdcall or anything else! (Full disclosure - I never knew or cared anything about this until recently, reading 64-bit propaganda, but you've got to admit it's a good thing). No segment registers, direct addressing of more bytes than you'll ever need. Let's face it, 2GB is not enough. But again, must admit I've never actually used more than a fraction of that. And then there's stack alignment, and no doubt other issues waiting to bite me... jj2007, u cld be right that altho these things sound great, in practice the benefit may not be all that much.

So I'll stick with my first point only: those xtra registers (both YMM and GPR) are really liberating (i'm talking inner loop, of course). Like taking off a suit 2 sizes too small and putting on one that fits.

Another reason: all my computers, even old retired ones, are 64-bit. Writing in 32 bits is like having a Ferrari you only drive 30 mhp (48.2803 kph, Gunther) around town; sooner or later you want to take it out on the highway. Edmund Hillary, asked why he wanted to climb Mt Everest, replied "because it's there". He was right!

Bottom line, 32-bit is also good; the difference between that and 64 is much less than 16 up to 32, or 8 to 16. That will change within a decade when peripherals (such as screens) start to require much more memory, but currently, 32 is adequate. So, u pays your money and u takes your choice ...
Title: Re: I am not a spambot ...
Post by: hutch-- on January 05, 2015, 02:08:54 PM
I see 64 bit as the future but perhaps not the version we have at the moment, its something like what happened with the shift from 16 to 32 bit, a lot of hybrid code for a long time and silly limits to what you could do. A i386 could just handle 32 bit instructions but we did not see 32 bit code until early WinNT and Win95 for the consumer market when just about everyone was running an early Pentium.

On current 64 bit there is not enough memory, you need terabytes to make it viable where 32 gig is not up to scratch. Then you need full long mode 64 bit, not half and half hybrids. 32 bit code is not without its virtues but there are a number of disciplines that make register usage a non issue. No stack frame procs where it matter give you EBP as well and up to 3 register FASTCALL (roll your own) removes the stack corrections required with a no stack frame procedure. With Win32 you could do STDCALL, C and FASTCALL, in Win64 you are strangled with the horrible stack corrections and hybrid FASTCALL/STACK combinations. This means you have 7 GP registers, 8 MMX and 8 XMM registers and if you have late enough hardware, the later versions as well.
Title: Re: I am not a spambot ...
Post by: habran on January 05, 2015, 02:21:40 PM
Hi rrr314159 :biggrin:
I think that you are a very advanced bot,because you have a great sense of humor and ability to think logically,  so welcome to the forum :t
You are perfectly right when choosing 64 bit (Ferrari) and JWasm
The JWasm will take care of a stack alignment for you and many other things
If you payed attention to what is happening on this forum you will realize that my version of JWasm is much more advanced than original
and I am still working on improvement of it
32 bit is like driving an old car from sixties with no power steering, no air bags, using 20 liters of fuel for 100k and polluting the environment
I prefer the new Ferrari  on highway :t
Title: Re: I am not a spambot ...
Post by: jj2007 on January 05, 2015, 07:54:09 PM
Quote from: habran on January 05, 2015, 02:21:40 PM
32 bit is like driving an old car from sixties with no power steering, no air bags, using 20 liters of fuel for 100k and polluting the environment
I prefer the new Ferrari  on highway :t

Habran, my old friend, you are exaggerating a little bit! Benchmark-wise, your Ferrari is at most (on special highways) 2-3% faster than my trusty old Volkswagen, and comfort-wise, I would always prefer the Golf :bgrin:

Besides, with all those speedlimits around, I would never have an occasion to use the 2-3% more...
Title: Re: I am not a spambot ...
Post by: habran on January 05, 2015, 08:32:27 PM
Hey jj2007 :biggrin:
What about air conditioner, here is now between 35 and 45 Celsius, you would die in your trusty old Volkswagen
Golf is good car if it is a new one :t
It is not 2-3% faster, it is like you are using one hand instead of both, my old friend :P
:greenclp: this is 64 bit
:eusa_clap: this is 32 bit
Title: Re: I am not a spambot ...
Post by: Siekmanski on January 05, 2015, 08:47:29 PM
I'm still driving very fast in my 64 bit BMW Mini Cooper S with 32 bit fuel on the Dutch highways.
Maybe in the future i'll fill it up with 64 bit fuel and test it on the German highways.  8)
Title: Re: I am not a spambot ...
Post by: habran on January 05, 2015, 09:42:00 PM
Are German highways still with unlimited speed?
40 years ago people would drive Porsches 250K(64bit), passing my sister's second hand Audi 100S witch was going top speed of 170K(32bit), like we were parked on the right side of the highway (Minhen-Salsburg) :lol:
Title: Re: I am not a spambot ...
Post by: habran on January 05, 2015, 10:01:56 PM
This is coming with AVX-512:
Quote
ZMM0     YMM0     XMM0
ZMM1     YMM1     XMM1
ZMM2     YMM2     XMM2
ZMM3     YMM3     XMM3
ZMM4     YMM4     XMM4
ZMM5     YMM5     XMM5
ZMM6     YMM6     XMM6
ZMM7     YMM7     XMM7
ZMM8     YMM8     XMM8
ZMM9     YMM9     XMM9
ZMM10   YMM10   XMM10
ZMM11   YMM11   XMM11
ZMM12   YMM12   XMM12
ZMM13   YMM13   XMM13
ZMM14   YMM14   XMM14
ZMM15   YMM15   XMM15
ZMM16   YMM16   XMM16
ZMM17   YMM17   XMM17
ZMM18   YMM18   XMM18
ZMM19   YMM19   XMM19
ZMM20   YMM20   XMM20
ZMM21   YMM21   XMM21
ZMM22   YMM22   XMM22
ZMM23   YMM23   XMM23
ZMM24   YMM24   XMM24
ZMM25   YMM25   XMM25
ZMM26   YMM26   XMM26
ZMM27   YMM27   XMM27
ZMM28   YMM28   XMM28
ZMM29   YMM29   XMM29
ZMM30   YMM30   XMM30
ZMM31   YMM31   XMM31
Title: Re: I am not a spambot ...
Post by: Siekmanski on January 05, 2015, 10:49:44 PM
As far as I know if there are no other signs than this one,
(http://static.autoblog.nl/images/wp2008/autobahn-bord.jpg)
you can drive as fast as you want.

We have to ask Gunther if there's still no speed limit auf der autobahn.
Title: Re: I am not a spambot ...
Post by: hutch-- on January 05, 2015, 11:51:33 PM
The hardware is usually well in front of the software, the i386 was hot stuff in 1989 but it was strangled by DOS. Having lots of registers is fine but saddling it with 64 bit current Windows strangles it. When we have terabytes of memory, win64 will be a big deal but at the moment the OS design cannot fully use the x64 architecture.
Title: Re: I am not a spambot ...
Post by: anunitu on January 06, 2015, 12:38:38 AM
I am thinking not unlike some things that just "came along" out of nowhere(They really only hit the public after many years) something is coming down the pike that will likely change everything. Funny thing sometimes,just one little innovation can unlock a whole flood of advancement in many areas.
A coming together in a sense,I think its called the "Internet of things" now.
http://www.theguardian.com/technology/2014/jun/08/internet-of-things-coming-together-tech-revolution

also the singularity   http://en.wikipedia.org/wiki/Technological_singularity


Lets all welcome the terminator,and realize it is US!!
Title: 45.254834 bits
Post by: rrr314159 on January 06, 2015, 12:59:31 PM
habran, thanks for your kind words! (9 posts ago). Re: sense of humor, Marcus Aurelius said a man should never joke, because no one wld respect him; some truth to that.

My attitude regarding 32 vs. 64 hasn't changed, after another day's experience under my belt. I like 64; but I can't agree that everybody shld switch. Consider the stack alignment issue, which I've got under control now. At first I couldn't understand why people have such a problem with it, but I believe I've figured it out: it all depends what you intend to do with MASM.

I use assembler to investigate things like statistical properties of prime numbers, diffeq solutions, physics simulations. I want speed, significant digits, registers - raw power.  The OS - be it Windows, Linux, whatever - is, from my perspective, a necessary evil. I need a few dozen essential functions: input and output: screen, files, keyboard, joystick etc. With a wrapper to provide necessary shadow/parameter space, I can use them for years, never touch them again. Similarly, if I want to be called from C++, a crude interface to pass a few numbers back and forth is fine. So 95% of the time I don't have to obey Windows calling conventions. I jmp when I can, call when I must, never use procs; don't need data hiding, or OOP (altho of course STRUCTS and Macros are great). No one else needs to understand my code, and it always makes sense to me. Once in a while I get bit by some variable being modified a thousand lines away, but rarely; small price to pay. With this approach I have very little trouble with the stack.

OTOH, most people here are into systems software, and commercial packages, etc. They're constantly involved with OS: paging tables, MBRs, SEH, OLE, sockets, etc. They love interfacing with C; in fact many of them are C programmers primarily. So they have to obey Windows x64 calling convention, like it or not - unless, of course, they stick with 32-bit.

There's a lot more to it than just stack alignment, but you get the idea. For me, not much trouble to get the xtra power; for them, headaches for no good reason (at least, they could see it that way). Ferraris are great, but an old Camaro has its charms too. Just an opinion; I still have a lot to learn about the situation.

anunitu: something is coming down the pike ... that will hit the public after many years (quoting u out of context). I'm afraid you're quite right. It's not an internet of things, tho; it's a small amount of hydrogen.