untio 36 Light Poster

Hi once more,

The problem solves writing setResizable(false) before pack().

And this solution works in the two versions (awt and swing).

Thanks once more.

untio 36 Light Poster

Hi,
May be, os.system() is useful to you:
Click Here
Forgive me if I am wrong.

untio 36 Light Poster

Hi,
I think that you need to change
var c=document.getElementById("myCanvas");
Into
var c=document.getElementById("canvas1");
myCanvas for canvas1.
canvas1 is the id that you have done to it.

untio 36 Light Poster

Hi,
Look at:
http://www.scalprum.eu/cdecl_and_stdcall_calling_conventions.html
or look at:
http://en.wikipedia.org/wiki/X86_calling_conventions
or at:
http://www.hackcraft.net/cpp/MSCallingConventions/
Who is wrong?.
Another comment is that string opcodes are slower than a well optimized algoritm. Which is not the reference code.
The problem of restoring ebx can be solved using another register, maybe edx.

Cheers.

Ancient Dragon commented: Yes, I was incorrect +36
untio 36 Light Poster

Hi,
You need a complete course on assembly language.
You try to declare a variable inside the text section. Text section is for machine instructions.
If you must reserve space for variables, you can achieve it in:
data section if the variable is initialized.
bss section if the variable in not initialized.
In this case data will reside in the bss section. Do reserve space in the bss section, nasm have this method:

[section .bss]
	 K : resd 1
	 D : resd 1

before the text section
The 'd' means dword, four bytes.
In assembly language there is not a ':=' operator. If you need to assign a value, you can do it like 'mov eax, ebx'. It will copy the value inside ebx into eax.
Another big error is in the imul operands. imul multiplies with sign the operand by eax and put the result in edx:eax.

mov edx, 0
mov eax, 2
mov ebx, 3
imul ebx

edx contains 0 and eax contains 6.
A bigger error is:

sub K, 1

In x86 it is not possible to operate with two places in memory. The assembler will complain with a message: invalid combination of opcode and operands.
You must write something like this:

mov eax, K
sub eax, 1
mov K, eax

And, finally, do you wish to try this code - with nasm syntax-:

;;
	;; Register usage:
	;; EAX Sum
	;; ECX Original value of …