- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
46 Posted Topics
Re: Hi, Can you give a test to this code: .286 .model small .stack 1024h .code start: mov cx, 5 first: mov bl, 2ah mov bh, 1 call drawall loop first mov dx, 5 second: mov bl, 20h mov bh, 0 mov cx, dx call drawall mov cx, 6 sub cx, … | |
Re: Hi, Can you replace a part of your code for this one: mov ecx, SIZEOF msg ;initialize loop counter * I believe the issue starts here??? mov eax, OFFSET msg ;address of msg mov esi, eax ;esi points to start add eax, ecx mov edi, eax dec edi dec edi … | |
Re: Hi, I am not a C++ expert, but I think that when you call scanf you must pass a pointer. The problem is that first is a pointer to char (that is the right parameter), but you are passing a pointer to pointer to char. When you call scanf to … | |
Re: Maybe I am wrong but this could be a first aproach to the solution: xorps xmm0, xmm0 movaps [rbp - 64], %xmm0 mov byte ptr [rbp - 63], 2 mov dword ptr [rbp - 60], 3103850762 mov word ptr [rbp - 62], 20480 lea r14, [rbp - 64] Please, forgive … | |
Re: Hi, Can you tell me what means: passChar[i] - 1; I think that this expression has no effect. Maybe it must be: if(i > 0) { i--; passchar[i] = '\0'; } And, for obtaining a string, remenber to add a zero to the end: passChar[i] = input; passChar[i++] = '\0'; … | |
![]() | Re: Hi, I do not know your level of assembly in 32 bits on windows. I have written a Hello world program and can be compiled using the file build.bat of the masm32 package. May be it surprise you. This is the code: .486 .model flat,stdcall option casemap:none include c:\masm32\include\windows.inc include … ![]() |
Re: Hi, Well, it is the kind of bug that is repeated again and again. Look at these lines: mov dx, offset s1 int 21h jc readError openError: mov ah, 09h The program opens the file. The program reads the file and after "jc readError" it simply continues with the next … | |
Hi, First, thanks for reading this stuff. I am learning java. I recognize that I am a beginner. Last weekend I have coded a clock. Sourcecode is: import javax.swing.JFrame; import java.util.GregorianCalendar; import java.awt.image.BufferedImage; import java.awt.Canvas; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Color; import java.util.TimerTask; import java.util.Timer; import java.awt.BasicStroke; public … | |
Re: Hi, I have neither used into. A have found this: [Click Here](http://www.ctyme.com/intr/rb-0032.htm) Cheers. | |
Re: Hi, First, I am a beginner java programmer. I see in the paths of the files first // and after that /// I think that this can be wrong. Forgive me if I am wrong. Cheers. | |
![]() | Re: Hi, I think that it can be useful an example from Microsoft: [Click Here](http://msdn.microsoft.com/en-us/library/windows/desktop/ms682512%28v=vs.85%29.aspx) Cheers. |
Re: Hi, I think that in these lines: Account[] objAcc = new Account[10]; for(int i=0;i<10;i++){ new Account(i,100); } You create an array of Account, but inside the for loop you are creating once more ten Account variables that you don't assign. Maybe you want to use inside the for loop something … | |
Re: Hi, First, visit this page: [Click Here](http://spike.scu.edu.au/~barry/interrupts.html) Now you employ the 09h to invite the user to press a key. You employ service 01h to read a character You test what is the character and employ the 09h with the apropiate message. Please, forgive me if I am wrong. Cheers. | |
Re: Hi, G_Waddell is right. Form2.textbox1.text = Cstr(Val(Form2.textbox1.Text) - 1) Cheers. | |
Re: Hi, May be, os.system() is useful to you: [Click Here](http://docs.python.org/library/os.html#os.system) Forgive me if I am wrong. | |
Re: 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. | |
Re: Hi, The code in this place: [Click Here](http://www.java2s.com/Code/Java/Development-Class/DateDiffcomputethedifferencebetweentwodates.htm) Can be of some help. Cheers. | |
Re: Hi, I think that this is a html problem. You can look at: [Click Here](http://www.echoecho.com/htmltext05.htm) To resize the text in the paragraph. Please, forgive me if I am wrong. | |
Re: Hi, I don't understand your question very well, but I think that you need a public variable in every form from 1 to 4. You assign the value of input and you get its value from form 5 with a form1.yourvariable. Please, forgive me if I'm wrong. | |
Re: Hi, 1. If you like, you could use a macro to call range and border. Something like: macro mymacro x, y, b range x, y border b endm Saving a lot of writing. But I think that your code can be shorter with some loops. 2.You have started the calculator. … | |
Re: Hi, First, forgive my possible errors. In your code there are a lot of calls to the range macro and after that an "mov ah, 09", a lea instruction and a call to an interrupt. I know that sometimes some of these is not present, but you could create another … | |
Re: Hi, You have my source code of a win32 calendar written with masm32 at: [Click Here](http://joseantonio.comule.com/misproyectos/src/windows/Assembly/JoseCalendar/) Cheers. | |
Re: Hi, I am learning php as probably you. I think that you need to use sprintf to format the string after LIKE. See: [Click Here](http://www.php.net/manual/en/function.sprintf.php) Please, forgive me if I am wrong. | |
Re: Hi, If you are coding with Visual C++, then may be UNICODE is defined. You can try if I am right adding this two lines before any other one: #undef UNICODE #undef _UNICODE And, after that the rest of the code. Cheers. | |
Re: Hi, Please, forgive me if I am wrong, but if you use another register instead of 8, you can increment it adding it 8. [CODE] mov r13, 0 mylabel: mov qword [r14+r13], rsi add r13, 8 cmp r13, YourArrayLimitMultipliedBy8 jb mylabel [/CODE] But you must realize that in this loop … | |
Re: You need to realize that in this code: cmp eax,minVal jge Loop_stat a greater than minVal will cause a jump to Loop_stat and it will never be compared with maxVal. Cheers. | |
Re: Hi, You can use: CMPEQPS And to test if the result is all ones or zeros: MOVMSKPS. I hope that this can be useful. Please, forgive me. I have not read the number version of sse in the post. | |
Hi, Thanks in advance for reading this message. My problem is that I need to write a program that must list the pdf files in a folder that contain a text pattern. The user writes a text and the program list the files that contain the pattern. I know that … | |
Re: Hi, Please, forgive me if I am wrong, but I think that in the next part of your code: getint: popl %ebp movl %esp, %ebp movl $1, %edi call getinpos You really want to write at the first line: pushl %ebp I am wrong? | |
Re: Please forgive me if I am wrong: I use intel sintax and may be I am wrong. At this line: leal values(, %edi,4), %esi If it translate to intel sintax: lea esi, [values + edi*4] Or something like this, you need to realize that "EDI" has a random value. May … | |
Re: Hello, You need realize that if you enter the line: void main You compare every token with the line: "main" with "void main" and "void" with "void main" And them will be always different. You need to isolate the tokens inside the string. I hope that this can be useful. | |
Hi, I am starting to learn JavaScript. But now I need a good IDE to code. Obviously I need a free IDE, I am not planning to make money with my code. Can experts give me some advice. Thanks in advance. | |
Re: Hi, Please, can you tell me what are you looking for reading the stack. You must realize that inside the stack with the parameters there are the returning addresses of your procedures (segment and offset 8 bytes) and you call one procedure from another one that is called from a … | |
Re: Hi, I do not work with at&t syntax but I believe that: movl $0, -4(%ebp)\n\ --You move zero to the first 4 bytes of local space. jmp compare\n\ increment:\n\ movl -4(%ebp), %eax\n\ --You move to eax the value inside the first 4 bytes of local space (zero): movl a(,%eax,4), %eax\n\ … | |
Re: Hi, When you press a special key, you get first a key code with the value 0 (zero). Inmediately you read the second part of the code. I believe that for the arrow up key it is 72. The same issue applies to combinations of standard keys and Control and … | |
Re: Hi, I think that your code is for a linux system. If I am right, you can read this: [URL="http://board.flatassembler.net/topic.php?t=5361"]http://board.flatassembler.net/topic.php?t=5361[/URL] It seems that at the program start the arguments are in the stack: [esp] argc. [esp + 4] argv[0] [esp + 8] argv[1] ... This, of course, if you program … | |
Re: May be you may compare your code with this one: [CODE] #include<stdio.h> int main() { char arg[50]; int c; int count=0; FILE *fp; printf("Name of the file:"); scanf("%s",arg); fp=fopen(arg,"wt"); printf("\t\t%s",arg); printf("Input the text into the file\n"); printf("Press Ctrl+Z and Return on windows to the stop\n"); while((c=getchar())!=EOF) { fputc(c, fp); count++; … | |
Re: Hi, 1. First of all, I advice you calling finit. 2. May be you must set the fpu control word. 3. Suposse you have a real number on st(0) 4. To divide it by an integer you need the address of the integer not the value in a register. You … | |
Re: My mother, what a strange code. This could be done: 1. Moving zero to st0. 2. Pointing ebx to the first real. 3. Looping adding with: fadd [ebx] indicating the size of your real number (may be qword) and adding to ebx the size of your real (may be 8) … | |
Re: Hi, In the x86 processors it is not possible to do an operation between two adresses of memory. Simply it is impossible to copy directly from memory to memory. You need to copy to a register and copy the content of the register to the target address. Cheers. | |
Re: Hi, I give you an advice: If your string is of type char (1 byte), why are you comparing double words (cmpl), may be you need cmpb (byte). Another one: You increment ebx before comparing the first character. I hope that this can be useful. | |
Re: Hi, 'je exit' exits from the loop when bx is equal to zero, je acts like jz. May be you want to write: inc bx cmp eax, -1 Because in you code 'cmp eax, -1' has no effect. Cheers. | |
Re: Hi, The two error messages are because you are working with elements of two diferent sizes. mov bx, al ;bx -> 16 bits. al -> 8 bits. cmp al, ax ; al -> 8 bits. ax -> 16 bits. I hope that this can be useful. Rewrite: I have no … | |
Re: 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 … | |
Re: Hi to all, This is a question that arises many times. In another place, I have answered this question. You can see the answer at: [URL="http://www.programmingforums.org/thread30456.html"]http://www.programmingforums.org/thread30456.html[/URL] As you can see, you divide the number by 10 and save the remainder in the stack and increment the counter. You must do … | |
Re: Hi, The problem is that 'add si, 1' modifies the flags. You can test if bh is equal to zero after adding 1 to si and your code will work right. [CODE] ;cmp bh, 0 - Remove this line add di, 1 ; Flags are affected. add si, 1 ; … |
The End.