From: Frank Kotler on
o//annabee wrote:

> Talk is cheap Master PDF.

And machine code don't lie. (and it's pretty cheap, too!) I don't doubt
that the code does what you say, on your machine (that does a CR on
"shift-M"), but I was so "flabbergasted" that I had to try it myself.
Maybe I didn't get it right - the RosAsm macro is expanded from memory
of what you posted (too lazy to go back and look). Is that correct? I
put the "align"s where I thought they should be, too. I'm thinking that
maybe the right thing to do is to "cpuid" (or some other serializing
instruction?) before the ending rdtsc, too? Anyway, here's what I came
up with. Results differ from yours: 7751h vs 4E89h (pretty consistant)

Best,
Frank

global _start

%assign COUNT 10000

section .text
_start:

nop


; "Wannabee's loop"
cpuid
rdtsc
push eax

mov ecx, COUNT
xor eax, eax
align 16
top:
cmp ecx, 0
jna endw
add eax, ecx
dec ecx
jmp top
endw:

rdtsc
pop ebx
sub eax, ebx
call showeaxh

mov al, 10
call putc


; "Randy's loop"

cpuid
rdtsc
push eax


mov ecx, COUNT
xor eax, eax
jecxz endw2
align 16
top2:
add eax, ecx
dec ecx
jnz top2
endw2:

rdtsc
pop ebx
sub eax, ebx
call showeaxh

mov al, 10
call putc

exit:
mov eax, 1
xor ebx, ebx
int 80h
;----------------------

; Linux cruft from here

;---------------------------
putc:
push edx
push ecx
push ebx
push eax

mov eax, 4
mov ebx, 1
mov ecx, esp
mov edx, 1
int 80h

pop eax
pop ebx
pop ecx
pop edx
ret
;-----------------------------


;------------------------------
showeaxh:
push eax
push ebx
push ecx
push edx

sub esp, 10h

mov ecx, esp
xor edx, edx
mov ebx, eax
..top:
rol ebx, 4
mov al, bl
and al, 0Fh
cmp al, 0Ah
sbb al, 69h
das
mov [ecx + edx], al
inc edx
cmp edx, 8
jnz .top
mov ebx, 1
mov eax, 4
int 80h

add esp, 10h

pop edx
pop ecx
pop ebx
pop eax
ret
;------------------------------
From: sevagK on

o//annabee wrote:
> På Wed, 15 Mar 2006 01:49:42 +0100, skrev sevagK <kahlinor(a)yahoo.com>:
>
> >> < http://rosasm.org >
>
> > You and your
> > cronies can blurt out this or that without a shred of evidence, at
> > least what I say can be found on this newsgroup by anyone who looks.
>
> When did I blurt out something without a shred of evidence?


Well, let's see, just a few from this very thread:

"Fastest assebler" - benchmarks prove otherwise.
..
"Best source organization" - more like the worst.

"Best macros" - when this illusion was shattered, you changed your tune
and claimed you're not interested in sophisticated macros and Rosasm
macros are good enough for you. Good enough does not equal "best
macros"

The sad fact is, you've become so entrenched in this warfare that you
only see what you want to see. Anything that contradicts with your
limited viewpoint is thrown out and conveniently forgotten. That's why
you endlessly bring out the same tired arguments as soon as the
counter-arguments against them fall off the bottom of the thread list.


-sevag.k
www.geocities.com/kahlinor

From: o//annabee on
På Wed, 15 Mar 2006 04:40:36 +0100, skrev Frank Kotler
<fbkotler(a)comcast.net>:

> o//annabee wrote:
>
>> Talk is cheap Master PDF.
>
> And machine code don't lie. (and it's pretty cheap, too!) I don't doubt
> that the code does what you say, on your machine (that does a CR on
> "shift-M"), but I was so "flabbergasted" that I had to try it myself.
> Maybe I didn't get it right - the RosAsm macro is expanded from memory
> of what you posted (too lazy to go back and look). Is that correct? I
> put the "align"s where I thought they should be, too. I'm thinking that
> maybe the right thing to do is to "cpuid" (or some other serializing
> instruction?) before the ending rdtsc, too? Anyway, here's what I came
> up with. Results differ from yours: 7751h vs 4E89h (pretty consistant)

Ok. I test it on the athlon as well later on. I have an old intel P3 in
parts as well, maybe I can test there as well.

In any case, a "master of assembly", should know that there are diffrences
between processors, and not makes claims like this !#"¤!"#¤"!# does. I
take your words for the test as gospel for now. Mine is 100% autentic. Its
tested on an AMD64 - 3700, running win32.

Now I got a more interessting question for you Frank.

I need some win32 skeleton file for NASM. Just want to have a minimum
skeleton. Single file. Is that possible? I look at at 3 forums yet no
luck. I didnt find anything of use in the docs or the download. I am a bit
impatient, sorry.

It must show how to import an API function.

Could you make me a file equivalent to this one, for Win32 ?
This is a RosAsm win32 code, fuly running skeleton.
I dont care of the NASM is longer, I just need to see it.
In the mean time I try to find something on my own.

_______________________________________

[OneEquate 100
SizeOf_Array 256]

[ByteVariable: b$ 0
WordVariable: w$ 0
Dword: D$ 0
Float: F$ 1.0
Real: r$ 2.2

ArrayOfByte: b$ 0 #SizeOf_Array ]

main:
mov al b$ByteVariable
mov bx w$WordVariable
mov ecx D$DWord
mov edx F$Float
fild D$Float
fistp D$Float
fld r$Real
ftp r$Real
call 'kerneø32.ExitProcess' 0
_______________________________________




>
> Best,
> Frank

Hei! Is this sort of "before I have asked, you have answered trick?
Will this run compile as win32 file? I check it out. Thanks.

> global _start
>
> %assign COUNT 10000
>
> section .text
> _start:
>
> nop
>
>
> ; "Wannabee's loop"
> cpuid
> rdtsc
> push eax
>
> mov ecx, COUNT
> xor eax, eax
> align 16
> top:
> cmp ecx, 0
> jna endw
> add eax, ecx
> dec ecx
> jmp top
> endw:
>
> rdtsc
> pop ebx
> sub eax, ebx
> call showeaxh
>
> mov al, 10
> call putc
>
>
> ; "Randy's loop"
>
> cpuid
> rdtsc
> push eax
>
>
> mov ecx, COUNT
> xor eax, eax
> jecxz endw2
> align 16
> top2:
> add eax, ecx
> dec ecx
> jnz top2
> endw2:
>
> rdtsc
> pop ebx
> sub eax, ebx
> call showeaxh
>
> mov al, 10
> call putc
>
> exit:
> mov eax, 1
> xor ebx, ebx
> int 80h
> ;----------------------
>
> ; Linux cruft from here
>
> ;---------------------------
> putc:
> push edx
> push ecx
> push ebx
> push eax
>
> mov eax, 4
> mov ebx, 1
> mov ecx, esp
> mov edx, 1
> int 80h
>
> pop eax
> pop ebx
> pop ecx
> pop edx
> ret
> ;-----------------------------
>
>
> ;------------------------------
> showeaxh:
> push eax
> push ebx
> push ecx
> push edx
>
> sub esp, 10h
>
> mov ecx, esp
> xor edx, edx
> mov ebx, eax
> .top:
> rol ebx, 4
> mov al, bl
> and al, 0Fh
> cmp al, 0Ah
> sbb al, 69h
> das
> mov [ecx + edx], al
> inc edx
> cmp edx, 8
> jnz .top
> mov ebx, 1
> mov eax, 4
> int 80h
>
> add esp, 10h
>
> pop edx
> pop ecx
> pop ebx
> pop eax
> ret
> ;------------------------------

From: o//annabee on
P? Wed, 15 Mar 2006 04:55:14 +0100, skrev Isaac Bosompem
<x86asm(a)gmail.com>:

> I do think it is a very good idea to use a scripting language to code
> game logic. It makes it easy to debug and maintain.

The only scripting language for games should be assembly language. I think
assembly language should be the scripting language for Visual Basic as
well.

I'd like to add a smiley, but I am serious.



From: o//annabee on
P? Wed, 15 Mar 2006 06:46:14 +0100, skrev sevagK <kahlinor(a)yahoo.com>:

>
> o//annabee wrote:
>> P? Wed, 15 Mar 2006 01:49:42 +0100, skrev sevagK <kahlinor(a)yahoo.com>:
>>
>> >> < http://rosasm.org >
>>
>> > You and your
>> > cronies can blurt out this or that without a shred of evidence, at
>> > least what I say can be found on this newsgroup by anyone who looks.
>>
>> When did I blurt out something without a shred of evidence?
>
>
> Well, let's see, just a few from this very thread:
>
> "Fastest assebler" - benchmarks prove otherwise.

Which benchmark is that?

> "Best source organization" - more like the worst.

No it IS the best. What on earth makes you say its the worst?

> "Best macros" - when this illusion was shattered, you changed your tune
> and claimed you're not interested in sophisticated macros and Rosasm
> macros are good enough for you. Good enough does not equal "best
> macros"

The macros I like are the best macros !

> The sad fact is, you've become so entrenched in this warfare that you
> only see what you want to see.

Not at all, I see you as well.

> Anything that contradicts with your
> limited viewpoint is thrown out and conveniently forgotten.

If so, why you are still here?

> That's why
> you endlessly bring out the same tired arguments as soon as the
> counter-arguments against them fall off the bottom of the thread list.

:))) Hehehe. What a nerd you are SevagK!


>
>
> -sevag.k
> www.geocities.com/kahlinor
>