Search Results

Search found 63 results on 3 pages for 'lego69'.

Page 1/3 | 1 2 3  | Next Page >

  • conversion of assembly

    - by lego69
    hello, can somebody please explain is it possible to convert this snippet of the code to assembly of pdp11? movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl -16(%rbp), %eax cltq leaq 0(,%rax,4), %rdi movq -8(%rbp), %r8 movl -12(%rbp), %eax cltq leaq 0(,%rax,4), %rcx movq -8(%rbp), %rsi movl -16(%rbp), %eax cltq leaq 0(,%rax,4), %rdx movq -8(%rbp), %rax movl (%rdx,%rax), %eax addl (%rcx,%rsi), %eax movl %eax, (%rdi,%r8) movl -12(%rbp), %eax cltq leaq 0(,%rax,4), %rdi movq -8(%rbp), %r8 movl -16(%rbp), %eax cltq leaq 0(,%rax,4), %rcx movq -8(%rbp), %rsi movl -12(%rbp), %eax cltq leaq 0(,%rax,4), %rdx movq -8(%rbp), %rax movl (%rdx,%rax), %edx movl (%rcx,%rsi), %eax subl %edx, %eax movl %eax, (%rdi,%r8) movl -16(%rbp), %eax cltq leaq 0(,%rax,4), %rdi movq -8(%rbp), %r8 movl -16(%rbp), %eax cltq leaq 0(,%rax,4), %rcx movq -8(%rbp), %rsi movl -12(%rbp), %eax cltq leaq 0(,%rax,4), %rdx movq -8(%rbp), %rax movl (%rdx,%rax), %edx movl (%rcx,%rsi), %eax subl %edx, %eax movl %eax, (%rdi,%r8) leave ret it is only small part of all code that I have...

    Read the article

  • unknown error in shell

    - by lego69
    can somebody explain me what does this error mean: > ./rank lines.in 'nknown option: `- Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ]. this is my script rank: #! /bin/tcsh -f set line = `cat ${1}` echo $line I think that the problem I have is with first row #! /bin/tcsh -f I'm working on Windows! but after I wrote script on windows editor, I converted it using dos2unix rank, what can be the problem, thanks in advance for any help

    Read the article

  • scripts on Cshell

    - by lego69
    hello, I've got some problem, I have list of data in the file: 053-37878 03828008 Moskovitch James 500 052-34363 01234567 Mendelson Kippi 450 053-32322 03828008 Jameson Shula 350 054-39238 03333333 Merden Moshe 300 is it possible rewrite this list in the same file (without using temporary file) but without last number thanks in advance for any help (I'm talking about C-Shell scripts)

    Read the article

  • problems with openGl on eclipse

    - by lego69
    I'm working on Windows XP I have portable version of Eclipse Galileo, but I didn't find there glut so I decided to add it using this link I made all steps and and now I'm trying to compile this code #include "GL/glut.h" #include "GL/gl.h" #include "GL/glu.h" /////////////////////////////////////////////////////////// // Called to draw scene void RenderScene(void) { // Clear the window with current clearing color glClear(GL_COLOR_BUFFER_BIT); // Flush drawing commands glFlush(); } /////////////////////////////////////////////////////////// // Setup the rendering state void SetupRC(void) { glClearColor(0.0f, 0.0f, 1.0f, 1.0f); } /////////////////////////////////////////////////////////// // Main program entry point void main(int argc, char* argv[]) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(800,600); glutCreateWindow("Simple"); glutDisplayFunc(RenderScene); SetupRC(); glutMainLoop(); } and I have this errors Simple.o: In function `RenderScene': C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:16: undefined reference to `_imp__glClear' C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:20: undefined reference to `_imp__glFlush' Simple.o: In function `SetupRC': C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:27: undefined reference to `_imp__glClearColor' Simple.o: In function `main': C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:34: undefined reference to `glutInit' C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:35: undefined reference to `glutInitDisplayMode' C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:36: undefined reference to `glutInitWindowSize' C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:37: undefined reference to `glutCreateWindow' C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:38: undefined reference to `glutDisplayFunc' C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:42: undefined reference to `glutMainLoop' collect2: ld returned 1 exit status please can somebody help me, thanks in advance

    Read the article

  • how does pipe work

    - by lego69
    hello, explain me please how exactly pipe works, for example I have this snippet of the code set line = ($<) while(${#line} != 0) if(${#line} == 5) then echo line | sort | ./calculate ${1} endif set line = ($<) end I need to choose all rows with 5 words and after sort it and after transfer, but I'm confused, how will it work, first of all 'while' will take all information and after that transfer it to sort, or every iteration 'while' will do sort? thanks in advance

    Read the article

  • background colour in opengl

    - by lego69
    I want to change background color of the window after pressing the button, but my program doesn't work, can somebody tell me why, thanks in advance int main(int argc, char* argv[]) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(800, 600); glutInitWindowPosition(300,50); glutCreateWindow("GLRect"); glClearColor(1.0f, 0.0f, 0.0f, 1.0f); <--- glutDisplayFunc(RenderScene); glutReshapeFunc(ChangeSize); glutMainLoop(); system("pause"); glClearColor(0.0f, 1.0f, 0.0f, 1.0f); <--- return 0; }

    Read the article

  • from C to assembly

    - by lego69
    how can I get assembly code from C program I used this recommendation and I use something like this -c -fmessage-length=0 -O2 -S in Eclipse, but I've got an error, thanks in advance for any help I have this error **** Internal Builder is used for build **** gcc -O0 -g3 -Wall -c -fmessage-length=0 -O2 -S -oatam.o ..\atam.c gcc -oatam.exe atam.o D:\technion\2sem\matam\eclipse\eclipse\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:atam.o: file format not recognized; treating as linker script D:\technion\2sem\matam\eclipse\eclipse\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:atam.o:1: syntax error collect2: ld returned 1 exit status Build error occurred, build is stopped Time consumed: 281 ms.

    Read the article

  • warning in Eclipse

    - by lego69
    hello, I have some problems with Eclipse, I have structure struct Account{ const char* strLastName; //Client's last name const char* strFirstName; //Client's first name int nID; //Client's ID number int nLines; //Number of lines related to account double lastBill; //Client's last bill for all lines List linesDataBase; }; And I can't compile my code eclipse gives me an errors: Syntax error before List no semicolon at end of struct or union ISO does not allow extra ";" outside a function I have no idea how to change it, thanks in advance for any help

    Read the article

  • swap on assembly

    - by lego69
    I wrote swap on assembly, but I'm not sure that my code is right, this is the code swap: mov r1, -(sp) mov (sp) r1 mov 2(sp) (sp) mov r1 2(sp) mov (sp)+, r1 rts pc swap receives pointer from stack

    Read the article

  • strange behavior

    - by lego69
    I wrote simple script test echo hello <-- inside test if I press one time enter after hello, my script will run, if I don't press - it will not, if two times I'll receive my hello and + command was not found, can somebody please explain me this behavior thanks in advance

    Read the article

  • Question on Addressing Modes in PDP-11 Assembler

    - by lego69
    I have small question about pdp-11(simulator), I have this command (it begins from the address 1000) add 2500, #2500 and this initial list: register/address - initial value pc 1000 sp 600 2500 3000 and I want to know how this small snippet exactly runs, in my booklet I found that: firstly it reads inforamtion from the address 1000, inside this address we have value 066727, after we read number from the address 1002, AND VALUE MUST BE 2500(because of add 2500, #2500), but in my booklet I have 1474 without any explanations why, I know that I have here relative addressing mode, but why 1474 inside the address 1002 and not 2500, thanks in advance for any help

    Read the article

  • assembly of pdp-11(simulator)

    - by lego69
    I have this code on pdp-11 tks = 177560 tkb = 177562 tps = 177564 tpb = 177566 lcs = 177546 . = torg + 2000 main: mov #main, sp mov #kb_int, @#60 mov #200, @#62 mov #101, @#tks mov #clock, @#100 mov #300, @#102 mov #100, @#lcs loop: mov @#tks,r2 aslb r2 bmi loop halt clock: tst bufferg beq clk_end mov #msg,-(sp) jsr pc, print_str tst (sp)+ clr bufferg bic #100,@#tks clr @#lcs clk_end:rti kb_int: mov r1,-(sp) jsr pc, read_char movb r1,@buff_ptr inc buff_ptr bis #1,@#tks cmpb r1,#'q bne next_if mov #0, @#tks next_if:cmpb r1,#32. bne end_kb_int clrb @buff_ptr mov #buffer,-(sp) jsr pc, print_str tst (sp)+ mov #buffer,buff_ptr end_kb_int: mov (sp)+,r1 rti ;############################# read_char: tstb @#tks bpl read_char movb @#tkb, r1 rts pc ;############################# print_char: tstb @#tps bpl print_char movb r1, @#tpb rts pc ;############################# print_str: mov r1,-(sp) mov r2,-(sp) mov 6(sp),r2 str_loop: movb (r2)+,r1 beq pr_str_end jsr pc, print_char br str_loop pr_str_end: mov (sp)+,r2 mov (sp)+,r1 rts pc . = torg + 3000 msg:.ascii<Something is wrong!> .byte 0 .even buff_ptr: .word buffer buffer: .blkw 3 bufferg: .word 0 Can somebody please explain how this part is working, thanks in advance movb r1,@buff_ptr inc buff_ptr bis #1,@#tks cmpb r1,#'q bne next_if mov #0, @#tks next_if:cmpb r1,#32. bne end_kb_int clrb @buff_ptr mov #buffer,-(sp) jsr pc, print_str tst (sp)+ mov #buffer,buff_ptr

    Read the article

  • problems with cut (unix)

    - by lego69
    hello everybody, I've got strange problem with cut I wrote script, there I have row: ... | cut -d" " -f3,4 >! out cut recieves this data (I checked it with echo) James James 033333333 0 0.00 but I recieve empty lines in out, can somebody explain why?

    Read the article

  • problems with scanf

    - by lego69
    hello, I've got some problems with this snippet of the code while(scanf("%d",&numOfPlayers)!=1){ printf("Please enter the right number of players"); } my purpose is to take the number from the user but if number is not int, I must ask him one more time, when I check this snippet and print 'r' for example I receive eternal loop, what may be the problem, how can I improve it? thanks in advance

    Read the article

  • simple question on C

    - by lego69
    I have this snippet of the code char *str = “123”; if(str[0] == 1) printf("Hello\n"); why I can't receive my Hello thanks in advance! how exactly compiler does this comparison if(str[0] == 1)?

    Read the article

  • assets in dreamweaver

    - by lego69
    can I add to assets in dreamweaver tag <td> I added successfully <table>, but I just can't figure out how can I add <td>, thanks in advance for any help (I'm talking about adding to the library) and can someone recommend way to add to the library new asset using menu

    Read the article

1 2 3  | Next Page >