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 SkipVought 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

    Here's some nasm code. Tested and everything. Couldn't understand why you would use jumps inside the loop when they're unecessary. BITS 32 SEGMENT _TEXT ALIGN=4 PUBLIC USE32 CLASS=CODE GLOBAL _HexToInt align 4 _HexToInt: ; edx is string pointer ; eax is final integer ; ebx is used...
  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

    There are two things that I noticed about this algorithm. 1. It loads from 4 locations and stores into another one. 2. It calculates 4 vectors at a time. These suggestions may not increase the run-time by much, but it's all I can offer without doing some tests. 1. Have you tried calculating...
  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

    Oh boy! I'll try to answer what I know, but component creation takes a lot of patience. And I'm no expert, but I do build components on a regular basis. 1) this one I'm not too sure on. It seems like you want to be able to do something like this: comp1 = comp2+comp3; If your components are...
  12. Vorlath

    Questions that no one could answer in the new groups.

    You want to convert color images to monochrome? Depends on how you access pixels. If you have a TBitmap, you can just set the bitmap->Monochrome = true. Then you can set it back to false and use whatever pixelformat you want. With a TImage, it's image->Picture->Bitmap->Monochrome = true...
  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

    Ok, I'll start again. I don't usually do this, so this'll be a one time deal. Plus, I'm really bored right now ;) NOTE: As a previous post says, you can just call the code for Button3, but it wouldn't be the data from Button2. The Data would get overwritten. So there are TWO ways to do...
  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