Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Vorlath
  • Order by date
  1. Vorlath

    Converting Hex to Int

    ...inc edx ; increment string pointer test bl, bl ; check if zero jne mainloop ; if not zero, continue loop pop edx pop ebx ret end ********** Basically, the algorithm brings down the values of 'A' to 'F' down by 7, so that all values are contiguous from 48 to 63. Then you can just...
  2. Vorlath

    Write zeros to Hard Drive.....

    If you want direct access, you should read the ATA and/or ATAPI specs. Try reading sectors first, because writing to the wrong drive would cause disaster. This requires polling or using interrupts. Not exactly noobie stuff. Especially if you've never done interrupts or I/O ports before. If...
  3. Vorlath

    Why is self-modifying code bad?

    1. If the instruction being modified is already in the pipeline, the changed instruction won't get executed or there will be a hefty stall to reload the pipeline and cache. It'll all depend on how the processor is designed. 2. Most 32 bit CPUs now have protection mechanisms or paging that...
  4. Vorlath

    Probably a really dumb question displaying hex number

    you have to do cmp sbb and das for each bit I think. How about this: mov bl, al shr al, 4 ; get high order hex digit xor ah, ah ; clear ah add al, 48 ; add ascii code for '0' cmp al, 58 ; check if ascii code is beyond '9' cmc ; if it is beyond '9', carry will be clear, so...
  5. Vorlath

    self modify code , this example don't work

    it's because your label is in a different asm block. And I'm not sure taking it out of the block and making it a normal label would help. You could compile to assembler and then cut&paste that function into its own .asm file assuming you have tasm or the pro or above version of builder. A...
  6. Vorlath

    SSE Spline Evaluation Optimization - newbie question

    ...the run-time by much, but it's all I can offer without doing some tests. 1. Have you tried calculating each part of the equation piecewise? *cv0++ * b0 in one loop. + *cv1++ * b1 in the next, etc. You could calculate up to 8 vector pieces at a time (if you keep the b0,b1,b2,b3 splatted...
  7. Vorlath

    Could not link "vcl60.#00"

    What are these files anyways? I always assumed they were modifications of the vcl to include installed components or precompiled headers. I have hundreds of them and I occasionally delete them. I don't suggest being as destructive as I am. But I'd really like to know what these files are...
  8. Vorlath

    Help with this code, no compile errors

    May I interject and offer some suggestions? Hope you don't mind. When you open the second file for writing, if it fails, you may want to close the already open input file handle fhandle_in. Inside your while loop, you check if fhandle_in!=NULL, but fhandle_in is never assigned anything after...
  9. Vorlath

    Several Questions about Component Creation

    Yeah, sorry. You can't statically allocate a VCL component. I was thinking in terms of general class creation. Using operator overloading on components isn't something I've ever seen done and I'm not sure if it's advisable. Yeah, dereferencing components would look ugly. But I think...
  10. Vorlath

    Questions that no one could answer in the new groups.

    In the above, replace char *line = bitmap->Scanline[y]; with int *line = (int*)bitmap->ScanLine[y]; A programmer is a device for converting Coke into software.
  11. Vorlath

    Several Questions about Component Creation

    ...event. Here's an example from an audio component I wrote (it's an event that gets triggered when play stops): typedef void __fastcall (__closure *TEndPlay)(TObject *Sender, int ms); Add whatever arguments you want after Sender. I used 'ms' for the number of milliseconds that it was...
  12. Vorlath

    Questions that no one could answer in the new groups.

    ...has to stay the same as what your screen is set to. If you want to convert it manually, you can access individual pixels from a bitmap with: char *line = bitmap->Scanline[y]; int pixel = line[x]; This is assuming 32 bit graphics: bitmap->PixelFormat = pf32bit; The above will convert your...
  13. Vorlath

    linking non-c++ libs in Borland C++

    You have to know what format your object files are. If they're coff (very good chance that they are), you can use the borland tool coff2omf to convert the object files so that Borland can use them. A programmer is a device for converting Coke into software.
  14. Vorlath

    Declaring char array problem

    butthead: What supernat03 meant is that if you have a string that DOESN'T have a nul terminator, you can't use strcpy() on it reliably. In C, any string declared with double quotes automatically has a nul terminator, so your example is not valid. Sherak: I'd listen to what itsgsd said. You...
  15. Vorlath

    Creating an irc client in bcb 5

    Dunno about code, but you might be interested in rfc1459. http://rfc.sunsite.dk/rfc/rfc1459.html I think it's section 4 that describes the commands. From the looks of it, you need these commands to start off: USER NICK JOIN When receiving, check for PRIVMSG, NOTICE and PING. Then start...
  16. Vorlath

    button

    ...the Button3Click() function. Now we need the code. CUT from this line all the way to the very END of your Button3Click() function: TStringList* display = new TStringList; The above line is included in the CUT. PASTE all these lines at the end of your ProcessData() function after the...
  17. Vorlath

    Modal Dialog and processing messages from other window.

    That's brilliant! I will definitely try that. Thank you so much! A programmer is a device for converting Coke into software.
  18. Vorlath

    button

    You need to create another function that takes a pointer or an array. You can cast it to a two dimensional array afterwards if you want. Make sure that the final variable you use is called 'Data' and that it's a 2 dimensional array. In this function, put everything that's in the...
  19. Vorlath

    NEWBIE QUESTION ABOUT C/C++

    Couple other notes: - C forces you to declare all your variables at the beginning of your functions. Very annoying once you're used to C++ and use scope (especially in for loops). - In C, you cannot overload operators or functions. - In C, you gotta use malloc() and free(). Can be cumbersome...
  20. Vorlath

    Modal Dialog and processing messages from other window.

    Thanks for the reply. However, I fail to understand how I'm supposed to retrieve only certain messages. If I synchronize Application->ProcessMessages(), won't it block my thread if it tries to pop up another modal dialog? I really don't know how to check for certain messages and leave others...

Part and Inventory Search

Back
Top